@charset "utf-8";
/* CSS Document */ 

:root {
  --bg: #071022;
  --panel: #111827;
  --muted: #94a3b8;
  --accent: #7dd3fc
}
html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: #e6eef6
}
header {
  padding: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .03), transparent);
  display: flex;
  align-items: center;
}
main {
  display: flex;
  height: calc(100% - 56px);
  overflow: hidden
}
.controls {
  width: 330px;
  padding: 12px;
  box-sizing: border-box;
  background: rgba(8, 12, 18, .88);
  display: flex;
  flex-direction: column;
}
#tabsContainer {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 24px;
}
#tabButtons {
  display: flex;
  gap: 6px;
  margin-bottom: 8px
}
#tabButtons button {
  flex: 1;
  padding: 8px;
  border: 0;
  background: #202833;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px
}
#tabButtons button.active {
  background: #2c3a47;
  color: #fff;
  font-weight: 600
}
.tab {
  display: none;
}
.tab.active {
  display: block
}
label.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  color: var(--muted)
}
input[type=range], input[type=color], select {
  width: 100%;
  margin-top: 6px
}
.btnrow {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap
}
button.action {
  padding: 8px 10px;
  border-radius: 8px;
  border: 0;
  background: linear-gradient(180deg, var(--accent), #38bdf8);
  color: #042;
  cursor: pointer
}
button.ghost {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: transparent;
  color: var(--muted);
  cursor: pointer
}
.small {
  font-size: 12px;
  color: var(--muted)
}
#canvasWrap {
  position: relative;
  flex: 1;
  background: #06101e
}
canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none
}
.colorRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0
}
.hint {
  margin-top: 6px
}
.modeBadge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: #203040;
  color: #cfe7ff;
  margin-left: 6px;
  font-size: 12px
}
#palettePresetsContainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.preset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.preset-swatches {
    display: flex;
}
.preset-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: -4px;
    border: 1px solid rgba(0,0,0,0.5);
}

.mobile-only-btn {
    display: none;
    padding: 6px 10px;
    border-radius: 8px;
    border: 0;
    background: #202833;
    color: var(--muted);
    cursor: pointer;
}

#closeMenuBtn {
    width: 100%;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .controls {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease-out;
        background: var(--panel);
        box-shadow: 4px 0 15px rgba(0,0,0,0.5);
    }
    .controls.is-visible {
        transform: translateX(0);
    }
    .mobile-only-btn {
        display: block;
    }
    header > strong, header > span {
        font-size: 14px;
    }
    #canvasWrap {
        width: 100%;
        flex: 1 1 100%;
    }
}