﻿body {
    background: linear-gradient(180deg, #faf8fc 0%, #f4f1f8 100%);
}
.draw-workspace {
    display: grid;
    grid-template-columns: 650px 500px 260px;
    gap: 18px;
    padding: 28px;
    align-items: start;
}

/* ===== PANELS ===== */
#block-a,
#block-c,
.info-section {
    width: 100%;
    max-width: 100%;
    border-radius: 24px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(2px);
}

/* ===== PALETTE ===== */
#block-a {
    position: relative;
    background: linear-gradient(180deg, #faf8fc 0%, #f4f1f8 100%);
    margin-top: 10px;
    overflow: hidden;
    padding: 24px;
}

    #block-a::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 30% 20%, rgba(155, 8, 237, 0.08), transparent 32%), radial-gradient(circle at 70% 70%, rgba(0, 140, 255, 0.05), transparent 30%);
        pointer-events: none;
    }

.draw-panel-title-palette {
    position: relative;
    z-index: 1;
    font-size: 22px;
    font-weight: 700;
    color: #151515;
    margin: 85px 0 20px 0;
    letter-spacing: 0.2px;
}

/* ===== SHADE RANGE ===== */
#block-c {
    grid-column: 2;
    min-width: 0;
    overflow: hidden;
    padding: 120px 28px 28px 28px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
    overflow-y: auto;
    /* smooth scrolling feel */
    scrollbar-width: thin;
}

    #block-c .draw-panel-title {
        margin: 0 0 18px 0;
        font-size: 22px;
        font-weight: 700;
        color: #151515;
        letter-spacing: 0.2px;
    }

/* ===== INFO PANEL ===== */
.info-section {
    grid-column: 3;
    background: linear-gradient(180deg, #fafafa 0%, #f2f3f6 100%);
    padding: 120px 24px 24px 24px;
}

    .info-section h2 {
        font-size: 22px;
        font-weight: 700;
        color: #151515;
        margin: 0 0 24px 0;
        letter-spacing: 0.2px;
    }

.color-preview {
    height: 180px;
    width: 100%;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #000000;
    margin-bottom: 28px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.08);
}

.color-meta {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .color-meta p {
        margin: 0;
        font-size: 16px;
        line-height: 1.45;
        color: #1a1a1a;
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 14px;
        padding: 12px 14px;
    }

    .color-meta strong {
        font-weight: 700;
        color: #111;
    }

#selectedHex,
#selectedRgb,
#selectedShade,
#selectedTarget {
    font-family: Consolas, monospace;
    font-size: 15px;
}

/* ===== GENERIC TITLES ===== */
.draw-panel-title {
    font-size: 22px;
    font-weight: 700;
    color: #151515;
    margin: 20px 0 18px 0;
    letter-spacing: 0.2px;
}

/* ===== HEXES ===== */
.hex {
    transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

    .hex:hover {
        transform: translateY(-2px) scale(1.04);
        z-index: 5;
        filter: brightness(1.04);
    }

    .hex.selected {
        transform: scale(1.08);
        z-index: 20;
        filter: brightness(1.12);
        outline: 3px solid rgba(255, 255, 255, 0.96);
        box-shadow: 0 0 0 4px rgba(155, 8, 237, 0.18);
        opacity: 1 !important;
    }

/* ===== TABLE ===== */
#table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    text-align: left;
}

    #table th {
        font-size: 14px;
        font-weight: 700;
        color: #111;
        padding: 6px 0 10px 0;
        border-top: 2px solid #8f10e8;
    }

        #table th:nth-child(1) {
            width: 60px;
        }

        #table th:nth-child(2) {
            width: 180px;
        }

        #table th:nth-child(3) {
            width: 110px;
        }

    #table td {
        font-size: 16px;
        color: #222;
        padding: 0;
        height: 30px;
        line-height: 30px;
        vertical-align: middle;
    }

        #table td:first-child {
            padding-right: 12px;
            color: #1b1b1b;
        }

        #table td:last-child {
            padding-left: 8px;
            font-family: Consolas, monospace;
            font-size: 15px;
        }

    #table tr {
        transition: background 0.15s ease;
    }

        #table tr:hover {
            background: rgba(155, 8, 237, 0.05);
            cursor: pointer;
        }

.color-block {
    display: block;
    width: 240px;
    height: 30px;
    margin: 0;
    border: none;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

#table tr.selected .color-block {
    outline: 2px solid #111;
}

#table tr.active-shade .color-block {
    outline: 2px solid #222;
    outline-offset: -2px;
}

#table tr.active-shade td:first-child,
#table tr.active-shade td:last-child {
    font-weight: 700;
}

/* ===== OPTIONAL VALUE BLOCK ===== */
#colorHex {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: 0.5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .draw-workspace {
        grid-template-columns: 1fr;
    }

    #hex-grid {
        width: 100%;
        max-width: 700px;
        margin: 0 auto;
    }
}

#block-a {
    height: calc(100vh - 40px);
    overflow: hidden;
}

#block-c {
    height: calc(100vh - 30px);
    overflow-y: auto;
}

.info-section {
    height: calc(100vh - 30px);
}

.color-actions {
    margin-top: 18px;
}

.save-color-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(180deg, #9b08ed 0%, #7d06c1 100%);
    box-shadow: 0 10px 24px rgba(155, 8, 237, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

    .save-color-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 28px rgba(155, 8, 237, 0.28);
        filter: brightness(1.03);
    }

    .save-color-btn:active {
        transform: translateY(0);
        box-shadow: 0 8px 18px rgba(155, 8, 237, 0.18);
    }