/* ============================================================
   Cineviewer Palette v1 — "The Director's Cut"
   Design Tokens from Stitch Design System
   ============================================================ */

/* Google Fonts — loaded via <link> tags in index.html for faster discovery */

/* Design Tokens as CSS Custom Properties */
:root {
    /* Surface Hierarchy */
    --surface:                 #131313;
    --surface-dim:             #131313;
    --surface-bright:          #393939;
    --surface-container-lowest:#0e0e0e;
    --surface-container-low:   #1c1b1b;
    --surface-container:       #20201f;
    --surface-container-high:  #2a2a2a;
    --surface-container-highest:#353535;
    --surface-variant:         #353535;
    --background:              #131313;

    /* Primary */
    --primary:                 #57f1db;
    --primary-container:       #2dd4bf;
    --primary-dim:             #3cddc7;
    --primary-fixed:           #62fae3;
    --primary-fixed-dim:       #3cddc7;
    --on-primary:              #003731;
    --on-primary-container:    #00574d;
    --surface-tint:            #3cddc7;

    /* Secondary */
    --secondary:               #ffb77b;
    --secondary-container:     #fb8c00;
    --secondary-fixed:         #ffdcc2;
    --secondary-fixed-dim:     #ffb77b;
    --on-secondary:            #4c2700;
    --on-secondary-container:  #5f3200;

    /* Tertiary */
    --tertiary:                #8bf088;
    --tertiary-container:      #6fd36f;
    --on-tertiary:             #00390a;

    /* Neutral / Text */
    --on-surface:              #e5e2e1;
    --on-surface-variant:      #bacac5;
    --on-background:           #e5e2e1;
    --outline:                 #859490;
    --outline-variant:         #3c4a46;

    /* Error */
    --error:                   #ffb4ab;
    --error-container:         #93000a;
    --on-error:                #690005;

    /* Inverse */
    --inverse-surface:         #e5e2e1;
    --inverse-on-surface:      #313030;
    --inverse-primary:         #006b5f;

    /* Roundness */
    --radius-sm:  0.25rem;
    --radius-md:  0.5rem;
    --radius-lg:  0.75rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-ambient: 0 20px 40px rgba(0, 0, 0, 0.08);
    --shadow-float:   0 4px 30px rgba(0, 0, 0, 0.4);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--on-surface);
    overflow: hidden;
    height: 100vh;
}

/* ============================================================
   Splash Screen
   ============================================================ */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--surface-container-lowest);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 2.5s ease-out;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    position: relative;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    background-image: url('../images/SplashBG.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    box-shadow: 0 0 60px rgba(87, 241, 219, 0.3),
                0 0 120px rgba(45, 212, 191, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.splash-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 66px;
    font-weight: bold;
    color: var(--on-surface);
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(87, 241, 219, 0.6),
                 0 0 20px rgba(87, 241, 219, 0.3);
}

.splash-creator {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    color: var(--on-surface-variant);
    margin-bottom: 10px;
}

.splash-version {
    font-family: 'Space Grotesk', monospace;
    font-size: 12px;
    color: var(--outline);
    font-style: normal;
    letter-spacing: 0.05em;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   Layout
   ============================================================ */
.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* ============================================================
   Sidebar — uses surface-container-low against surface background
   No border-right (No-Line Rule) — separation via background shift
   ============================================================ */
.sidebar {
    width: 240px;
    height: 100vh;
    background-color: var(--surface-container-low);
    padding: 20px 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-top {
    flex-shrink: 0;
    padding-bottom: 16px;
}

.logo {
    margin-bottom: 16px;
    padding: 0 20px 0;
}

.logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: bold;
    color: var(--on-surface);
    margin-bottom: 5px;
}

.subtitle {
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    color: var(--outline);
    letter-spacing: 0.03em;
}

.subtitle a {
    color: var(--outline);
    text-decoration: underline;
    transition: color 0.2s;
}

.subtitle a:hover {
    color: var(--primary);
}

/* ============================================================
   Material Symbols — icon font baseline
   ============================================================ */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    font-size: 20px;
}

/* ============================================================
   Sidebar Navigation — icon + label items
   ============================================================ */
.nav-spacer {
    height: 16px;
}

.nav-scroll-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.nav-scroll-wrap::before,
.nav-scroll-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 75px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 2;
}

.nav-scroll-wrap::before {
    top: 0;
    background: linear-gradient(to bottom,
        var(--surface-container-low) 0%,
        rgba(0, 0, 0, 0) 100%);
}

.nav-scroll-wrap::after {
    bottom: 0;
    background: linear-gradient(to top,
        var(--surface-container-low) 0%,
        rgba(0, 0, 0, 0) 100%);
}

.nav-scroll-wrap.show-top-fade::before {
    opacity: 1;
}

.nav-scroll-wrap.show-bottom-fade::after {
    opacity: 1;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-divider {
    height: 1px;
    background-color: var(--outline-variant);
    opacity: 0.15;
    margin: 8px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    color: var(--outline);
    border: none;
    border-right: 2px solid transparent;
    cursor: pointer;
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    transition: all 0.2s ease;
}

.nav-item.pulse {
    animation: subtlePulse 2.5s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(87, 241, 219, 0.06); }
}

.nav-item:hover {
    background-color: var(--surface-container-highest);
    color: var(--on-surface);
}

.nav-item.active {
    background: linear-gradient(to right, rgba(87, 241, 219, 0.1), transparent);
    color: var(--primary);
    border-right: 2px solid var(--primary);
    font-weight: 700;
}

.nav-item.active .material-symbols-outlined {
    color: var(--primary);
}

.nav-item[data-disabled="true"] {
    color: var(--outline-variant);
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-item[data-disabled="true"]:hover {
    background: transparent;
    color: var(--outline-variant);
}

.nav-label {
    white-space: nowrap;
    flex: 1;
}

/* ============================================================
   Toggle Switch — compact pill toggle on nav items
   ============================================================ */
.toggle-switch {
    position: relative;
    width: 32px;
    height: 16px;
    margin-left: auto;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-container-highest);
    border-radius: 8px;
    transition: all 0.25s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: var(--outline);
    border-radius: 50%;
    transition: all 0.25s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--primary-container));
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
    background-color: var(--on-primary);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.3;
    cursor: not-allowed;
}

.toggle-switch input:disabled ~ .toggle-slider {
    cursor: not-allowed;
}

.sidebar-bottom {
    flex-shrink: 0;
    padding-top: 16px;
    padding-bottom: 8px;
}

.info-section {
    padding: 20px 20px 0;
}

.info-section h3 {
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--primary-fixed-dim);
    margin-bottom: 8px;
    letter-spacing: 0.06em;
}

.info-section p {
    font-family: 'Space Grotesk', monospace;
    font-size: 12px;
    color: var(--on-surface-variant);
    margin-bottom: 5px;
    word-break: break-word;
}

.info-section p.info-title-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
    word-break: normal;
}

.info-section p.info-title-row #titleInfo {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   Sub-controls — nested options under nav items
   ============================================================ */
.sub-controls {
    margin-top: 2px;
    padding-left: 48px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.sub-btn {
    padding: 6px 12px;
    background: transparent;
    color: var(--outline);
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-family: 'Space Grotesk', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    transition: all 0.2s ease;
}

.sub-btn:hover {
    color: var(--on-surface);
}

.sub-btn.active-sub-btn {
    color: var(--primary);
    opacity: 0.8;
}

.sub-controls-horizontal {
    flex-direction: row;
    padding-left: 16px;
    padding-right: 16px;
    gap: 0;
}

.sub-controls-horizontal .sub-btn {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
}

.custom-aspect-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    margin-left: 4px;
}

.aspect-input {
    width: 50px;
    padding: 5px 8px;
    background-color: var(--surface-container-highest);
    color: var(--on-surface);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-full);
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    text-align: center;
    -moz-appearance: textfield;
}

.aspect-input::-webkit-outer-spin-button,
.aspect-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.aspect-input:focus {
    outline: none;
    border-color: var(--primary);
}

.aspect-separator {
    color: var(--on-surface-variant);
    font-family: 'Space Grotesk', monospace;
    font-size: 12px;
    font-weight: 600;
}

.aspect-apply-btn {
    padding: 5px 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-container));
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    transition: all 0.2s ease;
}

.aspect-apply-btn:hover {
    filter: brightness(1.1);
}

/* ============================================================
   Slider Control
   ============================================================ */
.slider-control {
    margin-top: 2px;
    padding: 8px 12px 8px 48px;
    background: rgba(0, 0, 0, 0.2);
}

.sub-controls .slider-control {
    padding: 4px 12px 4px 12px;
    background: none;
}

.slider-control label {
    display: block;
    font-family: 'Space Grotesk', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    color: var(--on-surface-variant);
}

.slider-control input[type="range"] {
    width: 80%;
    cursor: pointer;
    accent-color: var(--primary);
}

#sliderValue {
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    color: var(--on-surface-variant);
    margin-left: 8px;
}

/* ============================================================
   Main Content
   ============================================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--surface);
    position: relative;
}

/* ============================================================
   Image and Vectorscope Wrapper
   No border — separation via background color shift
   ============================================================ */
.image-vectorscope-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: var(--surface-container-lowest);
    overflow: hidden;
    height: auto;
    min-height: 0;
    gap: 15px;
    padding: 15px;
}

/* ============================================================
   Image Container
   ============================================================ */
.image-container {
    flex: 1;
    position: relative;
    background-color: var(--surface-container-lowest);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    height: 100%;
}

.placeholder {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--outline);
    font-family: 'Space Grotesk', monospace;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    pointer-events: none;
}

.image-canvas {
    display: none;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.image-canvas.visible {
    display: block;
}

/* ============================================================
   LUT Info — filename + clear button below Apply LUT
   ============================================================ */
.lut-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    padding: 4px 12px 4px 48px;
    background: rgba(0, 0, 0, 0.2);
}

.lut-filename {
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    color: var(--on-surface-variant);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.lut-clear {
    background: none;
    border: none;
    color: var(--outline);
    font-size: 16px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.lut-clear:hover {
    color: var(--primary);
}

/* ============================================================
   Export Button — glassmorphic, bottom-right of image viewport
   ============================================================ */
.export-btn {
    position: absolute;
    bottom: 186px;
    right: 16px;
    width: 36px;
    height: 36px;
    background-color: rgba(53, 53, 53, 0.6);
    backdrop-filter: blur(12px);
    border: none;
    border-radius: var(--radius-md);
    color: var(--on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0.7;
}

.export-btn:hover {
    opacity: 1;
    background-color: rgba(53, 53, 53, 0.85);
    color: var(--primary);
}

.export-btn:active {
    transform: scale(0.93);
}

/* Fullscreen button — top-right of main content */
.fullscreen-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background-color: rgba(53, 53, 53, 0.6);
    backdrop-filter: blur(12px);
    border: none;
    border-radius: var(--radius-md);
    color: var(--on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0.7;
}

.fullscreen-btn:hover {
    opacity: 1;
    background-color: rgba(53, 53, 53, 0.85);
    color: var(--primary);
}

.fullscreen-btn:active {
    transform: scale(0.93);
}

/* Image container in fullscreen mode */
.image-container:fullscreen {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container:fullscreen .image-canvas {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

/* ============================================================
   Loading Spinner — primary teal glow
   ============================================================ */
.loading-spinner {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(87, 241, 219, 0.1);
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   Vectorscope Container
   ============================================================ */
.vectorscope-container {
    flex-shrink: 0;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

#vectorscopeCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================================
   Color Palette Container
   ============================================================ */
.palette-container {
    flex-shrink: 0;
    width: 80px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: stretch;
    justify-content: center;
    padding: 5% 0;
    margin-right: 10px;
}

.palette-swatch {
    width: 100%;
    flex: 1;
    min-height: 0;
    border-radius: var(--radius-md);
    border: none;
    box-shadow: 0 0 0 1px rgba(60, 74, 70, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.palette-swatch:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(87, 241, 219, 0.3);
}

.palette-swatch.copied {
    box-shadow: 0 0 12px rgba(87, 241, 219, 0.4);
}

.palette-swatch::after {
    content: attr(data-hex);
    position: absolute;
    font-family: 'Space Grotesk', monospace;
    font-size: 10px;
    color: var(--on-surface);
    background-color: rgba(14, 14, 14, 0.9);
    padding: 4px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.palette-swatch:hover::after {
    opacity: 1;
}

.palette-swatch.copied::after {
    content: 'Copied!';
    opacity: 1;
    background-color: rgba(45, 212, 191, 0.9);
    color: #000;
}

/* ============================================================
   Histogram Container
   Background shift from surface-container-lowest to surface-container
   ============================================================ */
.histogram-container {
    height: 150px;
    background-color: var(--surface-container);
    padding: 10px;
}

#histogramCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================================
   Legend Container
   ============================================================ */
.legend-container {
    height: 80px;
    background-color: var(--surface-container);
    padding: 10px;
    width: 60%;
    margin: 0 auto;
    display: block;
}

#legendCanvas {
    height: 100%;
    width: 100%;
    display: block;
}

/* ============================================================
   Scrollbar Styling — dark, minimal
   ============================================================ */
.nav-items::-webkit-scrollbar {
    width: 6px;
}

.nav-items::-webkit-scrollbar-track {
    background: transparent;
}

.nav-items::-webkit-scrollbar-thumb {
    background: var(--outline-variant);
    border-radius: var(--radius-full);
}

.nav-items::-webkit-scrollbar-thumb:hover {
    background: var(--outline);
}

/* ============================================================
   Accessibility
   ============================================================ */
.nav-item:focus-visible,
.sub-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .sidebar {
        width: 180px;
        padding: 15px;
    }

    .toggle-switch {
        display: none;
    }

    .vectorscope-container {
        max-width: 250px;
        max-height: 250px;
    }
}

/* ============================================================
   Feedback Modal — Glassmorphism overlay
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background-color: var(--surface-container-high);
    border: none;
    border-radius: var(--radius-lg);
    width: clamp(400px, 60vw, 800px);
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-float);
    backdrop-filter: blur(20px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    color: var(--on-surface);
}

.modal-close {
    background: none;
    border: none;
    color: var(--outline);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    border-radius: var(--radius-full);
}

.modal-close:hover {
    color: var(--primary);
}

.modal-scroll-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.modal-scroll-wrap::before,
.modal-scroll-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 56px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 2;
}

.modal-scroll-wrap::before {
    top: 0;
    background: linear-gradient(to bottom,
        var(--surface-container-high) 0%,
        rgba(0, 0, 0, 0) 100%);
}

.modal-scroll-wrap::after {
    bottom: 0;
    background: linear-gradient(to top,
        var(--surface-container-high) 0%,
        rgba(0, 0, 0, 0) 100%);
}

.modal-scroll-wrap.show-top-fade::before {
    opacity: 1;
}

.modal-scroll-wrap.show-bottom-fade::after {
    opacity: 1;
}

.modal-body {
    padding: 20px;
    color: var(--on-surface-variant);
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--outline-variant);
    border-radius: var(--radius-full);
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--outline);
}

.modal-body p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
}

.modal-body h4 {
    margin: 0 0 10px 0;
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-fixed-dim);
}

.modal-body ul {
    margin: 15px 0;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

.modal-body a {
    color: var(--outline);
    transition: color 0.2s;
}

.modal-body a:hover {
    color: var(--primary);
}

.github-link-container {
    text-align: center;
    margin-top: 25px;
}

.github-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-container));
    color: #000;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.03em;
}

.modal-body .github-link:hover {
    color: #000;
    text-decoration: none;
}

/* ============================================================
   Hotkey list — used in About modal
   ============================================================ */
.hotkey-list {
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
}

.hotkey-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.hotkey-row dt {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    min-width: 56px;
}

.hotkey-row dd {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--on-surface-variant);
    line-height: 1.4;
}

.hotkey-plus {
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    color: var(--outline);
}

.modal-body kbd {
    display: inline-block;
    min-width: 22px;
    padding: 3px 7px;
    background-color: var(--surface-container-highest);
    color: var(--on-surface);
    border: 1px solid var(--outline-variant);
    border-bottom-width: 2px;
    border-radius: 4px;
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1;
    letter-spacing: 0.02em;
}

@media (max-width: 600px) {
    .hotkey-list {
        grid-template-columns: 1fr;
    }
}
