body {
  background: #111214;
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #18191c;
  border-bottom: 1px solid #23242a;
  padding: 0 2rem;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.tabs {
  display: flex;
  gap: 0.5rem;
}

.tab {
  background: #23242a;
  color: #b0b0b0;
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
  margin-bottom: -1px;
}
.tab.active {
  color: #00bfff;
  background: #18191c;
  border-bottom: 2px solid #00bfff;
  font-weight: 600;
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.card {
  background: #18191c;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  padding: 2rem;
  border: 1px solid #23242a;
  flex: 1;
  min-width: 340px;
}

.oled-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.oled-canvas-box {
  background: #000;
  border-radius: 12px;
  border: 3px solid #23242a;
  box-shadow: 0 0 16px #000a;
  padding: 1.2rem;
  margin-bottom: 1rem;
  position: relative;
}
#oledCanvas {
  display: block;
  background: #000;
  border: none;
  border-radius: 4px;
  image-rendering: pixelated;
}
.oled-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}
.oled-controls button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #00bfff;
  background: #23242a;
  color: #00bfff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.2s;
}
.oled-controls button:hover {
  background: #00bfff;
  color: #18191c;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.menu-item {
  background: #23242a;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #000a;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid #23242a;
  transition: 0.2s;
  position: relative;
}
.menu-item.selected {
  border: 2px solid #00bfff;
  background: #18191c;
}
.menu-item .icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #18191c;
  border-radius: 50%;
  border: 1.5px solid #00bfff;
  overflow: hidden;
}
.menu-item .icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
.menu-item .label {
  flex: 1;
  font-weight: 500;
  font-size: 1.1rem;
}
.menu-item .actions {
  display: flex;
  gap: 0.5rem;
}
.menu-item .actions button {
  background: none;
  border: none;
  color: #b0b0b0;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 6px;
  padding: 0.4rem;
  transition: 0.2s;
}
.menu-item .actions button:hover {
  background: #00bfff22;
  color: #00bfff;
}
.menu-item .font-select {
  margin-left: 0.5rem;
  background: #23242a;
  color: #fff;
  border: 1px solid #23242a;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 1rem;
}
.menu-item .icon-upload {
  margin-left: 0.5rem;
  color: #00bfff;
  cursor: pointer;
  font-size: 1.2rem;
}
.menu-item .icon-upload:hover {
  color: #fff;
}
.menu-item .selected-badge {
  background: #00bfff;
  color: #18191c;
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin-left: 1rem;
  box-shadow: 0 2px 8px #00bfff55;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
}
.desc {
  color: #b0b0b0;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.fullWidth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #23242a;
  color: #00bfff;
  border: 1px solid #23242a;
  border-radius: 12px;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: 0.2s;
  position: relative;
  overflow: hidden;
}
.fullWidth:hover {
  background: #00bfff;
  color: #18191c;
  border-color: #00bfff;
}
.plus {
  font-size: 1.3rem;
  margin-right: 0.7rem;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #23242a;
}
.info-row:last-child {
  border-bottom: none;
}
.info-label {
  color: #b0b0b0;
  font-size: 0.95rem;
}
.info-value {
  color: #00bfff;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: monospace;
}
.hidden { display: none !important; }

/* Screen Editor & Export styles */
.screen-editor, .export-code { display: none; }
.screen-editor.active, .export-code.active { display: block; }
.menu-builder.active { display: flex; }
.menu-builder { display: none; }

.screen-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}
.screen-list li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.screen-list input {
  width: 90px;
  background: #23242a;
  color: #fff;
  border: 1px solid #23242a;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 1rem;
}
.screen-list button {
  background: #23242a;
  color: #00bfff;
  border: 1px solid #23242a;
  border-radius: 6px;
  padding: 0.2rem 0.7rem;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}
.screen-list button:hover {
  background: #00bfff;
  color: #18191c;
}
.screen-canvas-box {
  background: #000;
  border-radius: 12px;
  border: 3px solid #23242a;
  box-shadow: 0 0 16px #000a;
  padding: 1.2rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}
#screenCanvas {
  display: block;
  background: #000;
  border: none;
  border-radius: 4px;
  image-rendering: pixelated;
}
.screen-controls {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}
.export-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.export-controls button {
  flex: 1;
}
textarea {
  width: 100%;
  height: 300px;
  background: #23242a;
  color: #fff;
  border: 1px solid #23242a;
  border-radius: 8px;
  font-size: 1rem;
  padding: 1rem;
  margin-top: 1rem;
  resize: vertical;
}
@media (max-width: 900px) {
  .container { flex-direction: column; gap: 1.5rem; padding: 1.2rem 2vw; }
  .card { padding: 1.5rem 1.2rem; }
  .topbar { padding: 0 1.5rem; }
  .tab { padding: 0.7rem 1.2rem; font-size: 0.95rem; }
} 