:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top, #1a1a1a, #050505 75%);
    color: #f6f6f6;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px auto;
    gap: 14px;
    padding: 18px;
    min-height: 100vh;
}

.theme-panel {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid #2f2f2f;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    padding: 14px;
    transition: transform 200ms ease;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

.theme-panel.collapsed {
    transform: translateX(-228px);
}

.theme-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.theme-header button {
    background: transparent;
    border: 1px solid #3d3d3d;
    color: #f6f6f6;
    border-radius: 12px;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.theme-header select {
    background: #1c1f2b;
    border: 1px solid #323248;
    border-radius: 8px;
    color: #f6f6f6;
    padding: 6px 10px;
}

.theme-preview {
    flex: 1;
    background: linear-gradient(145deg, #1f1f28, #14141b);
    border-radius: 12px;
    border: 1px solid #353545;
    padding: 10px;
    overflow: auto;
}

.theme-preview pre {
    font-size: 0.8rem;
    white-space: pre-wrap;
}

.workspace {
    background: rgba(15, 15, 24, 0.92);
    border-radius: 28px;
    border: 1px solid #1d1f38;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 28px 45px rgba(6, 7, 32, 0.65);
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #f1f4ff;
}

.workspace-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.workspace-header p {
    margin: 4px 0 0;
    color: #a9aacf;
}

.window-actions button {
    background: #26273a;
    border: 1px solid #3d3d3d;
    color: #fff;
    width: 32px;
    height: 32px;
    margin-left: 6px;
    border-radius: 8px;
    cursor: pointer;
}

.color-panel {
    display: flex;
    gap: 32px;
    align-items: center;
    background: rgba(20, 20, 32, 0.95);
    border-radius: 22px;
    border: 1px solid #2f354f;
    padding: 18px;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35);
}

.color-wheel {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.12);
    background: conic-gradient(
        #f94144,
        #f3722c,
        #f8961e,
        #f9c74f,
        #90be6d,
        #43aa8b,
        #4d908e,
        #577590,
        #277da1,
        #4b4bfb,
        #7209b7,
        #f94144);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.color-info {
    flex: 1;
    background: rgba(16, 16, 24, 0.92);
    border-radius: 22px;
    border: 1px solid #303046;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.section-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    color: #a3a7bc;
    margin: 0;
}

.color-info input[type='color'] {
    width: 100%;
    height: 56px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
}

.color-swatch-row {
    display: flex;
    gap: 12px;
}

.color-box.large {
    flex: 1;
    height: 60px;
    border-radius: 16px;
    border: 1px solid #373a4f;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.color-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.color-metadata span {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #7c81ad;
}

.color-metadata strong {
    margin-left: 8px;
    font-size: 1.1rem;
}

.color-metadata button {
    background: #2f72ff;
    border: none;
    border-radius: 8px;
    color: #fff;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.72rem;
}
.color-metadata button.copied,
.palette-card button.copied {
    background: #4ccc97;
    color: #0b2a1c;
}

.palette-section {
    background: rgba(15, 15, 20, 0.9);
    border-radius: 24px;
    padding: 22px 18px 18px;
    border: 1px solid #27293b;
}

.palette-section header {
    margin-bottom: 22px;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.palette-card {
    background: rgba(20, 20, 30, 0.9);
    border-radius: 18px;
    border: 1px solid #30305c;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.palette-card h3 {
    margin: 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.palette-card .palette-colors {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.palette-card .palette-colors span {
    width: 100%;
    padding-top: 100%;
    border-radius: 10px;
    border: 1px solid #1b1b25;
}

.palette-card small {
    color: #9ea1c6;
}

.palette-card button {
    border: none;
    background: transparent;
    color: #54f0b1;
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 960px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .theme-panel {
        order: 2;
    }
}
