@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;700&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

:root {
    /* ── Core Colors ──────────────────────────── */
    --bg-app:       #080b14;
    --bg-panel:     #0d1117;
    --bg-element:   #111827;
    --bg-glass:     rgba(17, 24, 39, 0.6);
    --bg-hover:     rgba(99, 102, 241, 0.08);

    --border-main:  rgba(99, 102, 241, 0.15);
    --border-glow:  rgba(99, 102, 241, 0.5);
    --border-light: rgba(148, 163, 184, 0.2);

    --text-primary:   #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted:     #4b5563;

    /* ── Accent / Gradient ────────────────────── */
    --accent:       #6366f1;
    --accent-blue:  #60a5fa;
    --accent-violet:#a78bfa;
    --accent-cyan:  #22d3ee;
    --accent-emerald:#34d399;
    --accent-amber: #fbbf24;
    --accent-rose:  #fb7185;

    --grad-primary: linear-gradient(135deg, #6366f1, #a78bfa);
    --grad-hero:    linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    --grad-card:    linear-gradient(135deg, rgba(99,102,241,0.05) 0%, rgba(167,139,250,0.05) 100%);

    --glow-accent:  0 0 20px rgba(99,102,241,0.3);
    --glow-blue:    0 0 20px rgba(96,165,250,0.4);
    --glow-violet:  0 0 20px rgba(167,139,250,0.4);

    /* ── Fonts ───────────────────────────────── */
    --font-ui:    'IBM Plex Sans', 'Pretendard Variable', sans-serif;
    --font-serif: 'Noto Serif KR', Georgia, serif;
    --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

    /* ── Layout ──────────────────────────────── */
    --header-height:    52px;
    --sidebar-width:    260px;
    --inspector-width:  300px;
    --timeline-height:  110px;

    /* ── Motion ──────────────────────────────── */
    --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
    --duration:   0.25s;
}

/* ═══════════════════════════════════
   RESET & BASE
═══════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-app);
    background-image:
        radial-gradient(ellipse 80% 60% at 20% -5%, rgba(99,102,241,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 110%, rgba(167,139,250,0.08) 0%, transparent 60%);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 14px;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* ═══════════════════════════════════
   APP LAYOUT
═══════════════════════════════════ */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ═══════════════════════════════════
   SIDEBAR
═══════════════════════════════════ */
.app-sidebar {
    width: var(--sidebar-width);
    background: rgba(8, 11, 20, 0.95);
    border-right: 1px solid var(--border-main);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.app-sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 200px;
    background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Logo / Brand */
.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.1rem;
    border-bottom: 1px solid var(--border-main);
    position: relative;
    gap: 0.6rem;
}

.logo-icon {
    width: 30px;
    height: 30px;
    background: var(--grad-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-accent);
    flex-shrink: 0;
}

.logo-icon svg { width: 16px; height: 16px; stroke: white; }

.logo-text {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: -0.02em;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.version {
    font-size: 0.62rem;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    color: var(--accent-violet);
    padding: 2px 7px;
    border-radius: 100px;
    font-family: var(--font-mono);
    -webkit-text-fill-color: initial;
    background-clip: initial;
}

/* Nav Groups */
.nav-group {
    padding: 1.2rem 0.8rem 0.4rem;
}

.nav-label {
    font-size: 0.63rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    padding-left: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-item, .filter-item {
    display: flex;
    align-items: center;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    margin-bottom: 2px;
    font-size: 0.85rem;
    gap: 0.6rem;
    position: relative;
}

.nav-item:hover, .filter-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active, .filter-item.active {
    background: rgba(99, 102, 241, 0.12);
    color: #c4b5fd;
    font-weight: 500;
}

.nav-item.active::before, .filter-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--grad-primary);
    border-radius: 0 2px 2px 0;
}

.nav-item svg, .filter-item svg,
.nav-item i, .filter-item i {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.75;
}

/* Category color indicators */
.filter-item[data-filter="opening"]  .dot { background: var(--accent-cyan); }
.filter-item[data-filter="structure"] .dot { background: var(--accent-blue); }
.filter-item[data-filter="high impact"] .dot { background: var(--accent-rose); }
.filter-item[data-filter="user"] .dot { background: var(--accent-emerald); }

.bottom-actions {
    margin-top: auto;
    padding: 0.8rem;
    border-top: 1px solid var(--border-main);
}

/* Sidebar Stats Badge */
.sidebar-stats {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.6rem 1.4rem;
    margin-top: 0.5rem;
}

.stat-pill {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    background: rgba(99,102,241,0.07);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 8px;
}

.stat-pill-num {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-blue);
    font-family: var(--font-mono);
    line-height: 1;
}

.stat-pill-label {
    font-size: 0.58rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* ═══════════════════════════════════
   MAIN AREA
═══════════════════════════════════ */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-panel);
}

/* Toolbar */
.main-toolbar {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem;
    background: rgba(8, 11, 20, 0.8);
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 5;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid var(--border-main);
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    width: 320px;
    transition: all var(--duration) var(--ease-out);
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1), var(--glow-accent);
}

.search-bar i,
.search-bar svg {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 100%;
    font-size: 0.875rem;
    font-family: var(--font-ui);
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-kbd {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--bg-element);
    border: 1px solid var(--border-light);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 0.4rem;
    white-space: nowrap;
}

.view-toggles {
    display: flex;
    gap: 4px;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border-main);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--duration);
}

.icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent-blue);
}

.icon-btn.active {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.4);
    color: var(--accent-blue);
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ═══════════════════════════════════
   MIXER PANEL (Glassmorphism)
═══════════════════════════════════ */
.mixer-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-main);
    border-radius: 16px;
    padding: 1.2rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.mixer-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.5), transparent);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-main);
}

.panel-header h3 {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.panel-header h3 i svg { color: var(--accent-blue); }

.mixer-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Mixer Slots */
.mixer-slots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.slot {
    background: rgba(17, 24, 39, 0.8);
    border: 1px dashed rgba(99,102,241,0.3);
    border-radius: 12px;
    width: 175px;
    padding: 0.9rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.slot::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-card);
    opacity: 0;
    transition: opacity var(--duration);
}

.slot:hover {
    border-color: var(--accent);
    box-shadow: var(--glow-accent);
    transform: translateY(-2px);
}

.slot:hover::before { opacity: 1; }

.slot-header {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.slot-value {
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-dropzone {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: none;
}

.mixer-operator {
    font-size: 1.5rem;
    font-weight: 200;
    color: var(--accent-violet);
    opacity: 0.6;
    text-shadow: 0 0 10px currentColor;
}

/* Preview Stage */
.preview-stage {
    background: #000;
    width: 100%;
    height: 360px;
    border-radius: 12px;
    border: 1px solid var(--border-main);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-stage canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

/* ═══════════════════════════════════
   LIBRARY GRID
═══════════════════════════════════ */
.library-browser { margin-top: 0.5rem; }

.section-title {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-main);
}

.dna-grid-pro {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.75rem;
}

/* DNA Card */
.dna-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    position: relative;
}

.dna-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-card);
    opacity: 0;
    transition: opacity var(--duration);
    border-radius: 12px;
    z-index: 0;
}

.dna-item:hover {
    border-color: rgba(99,102,241,0.5);
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(0,0,0,0.4),
        0 0 0 1px rgba(99,102,241,0.2),
        var(--glow-accent);
}

.dna-item:hover::before { opacity: 1; }

.dna-item.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.4), var(--glow-accent);
}

.dna-item.user-dna {
    border-color: rgba(52,211,153,0.3);
}

.dna-item.user-dna.selected {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 0 2px rgba(52,211,153,0.3);
}

.dna-thumb {
    height: 105px;
    background: #040608;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.dna-thumb canvas {
    width: 100% !important;
    height: 100% !important;
}

.dna-info {
    padding: 0.7rem 0.8rem;
    position: relative;
    z-index: 1;
}

.dna-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.dna-role {
    font-size: 0.65rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-main);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ═══════════════════════════════════
   INSPECTOR PANEL
═══════════════════════════════════ */
.app-inspector {
    width: var(--inspector-width);
    background: rgba(8, 11, 20, 0.95);
    border-left: 1px solid var(--border-main);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
}

.app-inspector::before {
    content: '';
    position: absolute;
    top: 0; left: -1px; right: 0;
    height: 300px;
    background: radial-gradient(ellipse at 80% 0%, rgba(167,139,250,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.inspector-header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.inspector-header h3 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.badge-outline {
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.25);
    color: var(--accent-violet);
    font-size: 0.6rem;
    padding: 2px 7px;
    border-radius: 100px;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

.inspector-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 3rem;
    line-height: 1.8;
}

.empty-state::before {
    content: '⬡';
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.2;
}

/* Property Groups */
.prop-group {
    margin-bottom: 1.4rem;
}

.prop-header {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 0.7rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.prop-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    gap: 0.5rem;
}

.prop-key {
    color: var(--text-muted);
    flex-shrink: 0;
    font-size: 0.78rem;
}

.prop-val {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-align: right;
    max-width: 65%;
    word-break: break-all;
}

.color-swatch-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: transform var(--duration), box-shadow var(--duration);
}

.swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px currentColor;
}

/* ═══════════════════════════════════
   TIMELINE
═══════════════════════════════════ */
.app-timeline {
    height: var(--timeline-height);
    background: rgba(8, 11, 20, 0.9);
    border-top: 1px solid var(--border-main);
    padding: 0.6rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.timeline-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
}

.timeline-track {
    flex: 1;
    background: rgba(17, 24, 39, 0.8);
    border: 1px dashed rgba(99,102,241,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    overflow-x: auto;
    gap: 0.5rem;
}

.timeline-placeholder {
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-style: italic;
}

.timeline-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 0.78rem;
    color: #c4b5fd;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--duration);
}

.timeline-chip:hover {
    background: rgba(99,102,241,0.25);
    box-shadow: var(--glow-accent);
}

.timeline-chip .remove-chip {
    font-size: 0.7rem;
    opacity: 0.5;
    cursor: pointer;
}

.timeline-chip .remove-chip:hover { opacity: 1; color: var(--accent-rose); }

/* ═══════════════════════════════════
   BUTTONS
═══════════════════════════════════ */
.btn-primary, .btn-secondary {
    padding: 0.42rem 0.9rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--duration) var(--ease-out);
    font-family: var(--font-ui);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--grad-primary);
    color: white;
    border: none;
    box-shadow: 0 2px 10px rgba(99,102,241,0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99,102,241,0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: rgba(99,102,241,0.5);
    color: var(--text-primary);
    background: rgba(99,102,241,0.08);
}

/* Full-width action buttons in inspector */
.btn-action-full {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    padding: 0.55rem 1rem;
}

/* ═══════════════════════════════════
   ANNOTATION GUIDE VIEW
═══════════════════════════════════ */
.annotation-view {
    padding: 0.5rem;
}

.anno-hero {
    background: var(--grad-hero);
    border: 1px solid var(--border-main);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.anno-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 39px,
        rgba(255,255,255,0.02) 39px, rgba(255,255,255,0.02) 40px
    );
}

.anno-hero-inner { position: relative; z-index: 1; }

.anno-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.35);
    color: #a5b4fc;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.anno-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.6rem;
}

.anno-hero h1 em {
    font-style: normal;
    background: linear-gradient(120deg, var(--accent-blue), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.anno-hero-sub {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
}

.anno-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.anno-stat-num {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    line-height: 1;
}
.anno-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 3px;
}

/* Annotation Filter Bar */
.anno-filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    align-items: center;
}

.anno-filter-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 4px;
}

.anno-filter-btn {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 5px 13px;
    border: 1px solid var(--border-main);
    border-radius: 100px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--duration);
}

.anno-filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent-blue);
}

.anno-filter-btn.active {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.4);
    color: #c4b5fd;
}

/* Annotation Category */
.anno-category {
    margin-bottom: 2.5rem;
}

.anno-cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(99,102,241,0.2);
}

.anno-cat-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-blue);
    background: rgba(96,165,250,0.1);
    border: 1px solid rgba(96,165,250,0.25);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.anno-cat-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.anno-cat-count {
    font-size: 0.68rem;
    color: var(--text-muted);
    background: var(--bg-element);
    border: 1px solid var(--border-main);
    padding: 3px 9px;
    border-radius: 100px;
    margin-left: auto;
    font-family: var(--font-mono);
}

/* Annotation Card Grid */
.anno-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 0.875rem;
}

/* Annotation Card */
.anno-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-main);
    border-radius: 14px;
    padding: 1.2rem;
    transition: all var(--duration) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.anno-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-card);
    opacity: 0;
    transition: opacity var(--duration);
}

.anno-card:hover {
    border-color: rgba(99,102,241,0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), var(--glow-accent);
}

.anno-card:hover::before { opacity: 1; }

.anno-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.7rem;
    position: relative;
    z-index: 1;
}

.anno-card-id {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-main);
}

.anno-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Tags */
.tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
}

.tag-layout   { background: rgba(59,130,246,0.15);  color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.tag-typo     { background: rgba(236,72,153,0.15);  color: #f9a8d4; border: 1px solid rgba(236,72,153,0.3); }
.tag-color    { background: rgba(16,185,129,0.15);  color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.tag-spatial  { background: rgba(245,158,11,0.15);  color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.tag-motion   { background: rgba(139,92,246,0.15);  color: #c4b5fd; border: 1px solid rgba(139,92,246,0.3); }
.tag-data     { background: rgba(99,102,241,0.15);  color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }
.tag-korean   { background: rgba(239,68,68,0.15);   color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.tag-english  { background: rgba(6,182,212,0.15);   color: #67e8f9; border: 1px solid rgba(6,182,212,0.3); }
.tag-academic { background: rgba(167,139,250,0.15); color: #ddd6fe; border: 1px solid rgba(167,139,250,0.3); }
.tag-minimal  { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }

.anno-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.anno-card-title-en {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: var(--font-mono);
}

.anno-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.875rem;
    position: relative;
    z-index: 1;
}

/* Prompt Block */
.anno-card-prompt {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 10px;
    padding: 0.875rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    line-height: 1.7;
    color: #a5b4fc;
    position: relative;
    z-index: 1;
    white-space: pre-wrap;
    word-break: break-word;
}

.anno-card-prompt::before {
    content: 'PROMPT';
    position: absolute;
    top: -9px;
    left: 12px;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-blue);
    background: var(--bg-panel);
    padding: 0 6px;
}

.anno-card-specs {
    display: flex;
    gap: 0.875rem;
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px dashed rgba(99,102,241,0.15);
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.anno-card-spec {
    display: flex;
    align-items: center;
    gap: 5px;
}

.spec-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Copy button */
.anno-copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0;
    transition: all var(--duration);
    font-size: 0.65rem;
    color: var(--accent-blue);
    z-index: 2;
    font-family: var(--font-mono);
    font-weight: 600;
}

.anno-card:hover .anno-copy-btn { opacity: 1; }
.anno-copy-btn:hover {
    background: rgba(99,102,241,0.25);
    box-shadow: var(--glow-accent);
}

/* ═══════════════════════════════════
   TOAST NOTIFICATION
═══════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(99,102,241,0.4);
    border-radius: 12px;
    padding: 0.75rem 1.2rem;
    font-size: 0.82rem;
    color: var(--text-primary);
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--glow-accent);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.35s var(--ease-out);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon { font-size: 1rem; }

/* ═══════════════════════════════════
   SCROLLBAR
═══════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(99,102,241,0.25);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.45); }

/* ═══════════════════════════════════
   LOADING / SKELETON
═══════════════════════════════════ */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.03) 25%,
        rgba(255,255,255,0.07) 50%,
        rgba(255,255,255,0.03) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

/* ═══════════════════════════════════
   PARTICLE BACKGROUND (subtle)
═══════════════════════════════════ */
@keyframes floatDot {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    50%       { transform: translateY(-8px) translateX(4px); opacity: 0.7; }
}

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 1180px) {
    :root {
        --inspector-width: 260px;
        --sidebar-width: 220px;
    }
}

@media (max-width: 900px) {
    .app-inspector { display: none; }
    .anno-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .app-sidebar { display: none; }
    .mixer-slots { flex-direction: column; }
    .slot { width: 100%; }
    .anno-grid { grid-template-columns: 1fr; }
}
