:root {
    /* Fuchsia Neon Palette */
    --clr-primary: #D946EF;
    --clr-primary-hover: #C026D3;
    --clr-secondary: #E879F9;
    --clr-accent: #4ADE80;
    
    --clr-bg: #1A0A1E;
    --clr-surface: #26112D;
    --clr-surface-hover: #33173C;
    --clr-border: #4A2356;
    
    --clr-text-main: #FDF4FF;
    --clr-text-muted: #D8B4E2;
    
    /* Semantic Types */
    --type-added: #4ADE80;    /* Green */
    --type-changed: #FBBF24;  /* Amber */
    --type-fixed: #EF4444;    /* Red */
    --type-removed: #9CA3AF;  /* Gray */
    --type-security: #8B5CF6; /* Violet */
    --type-deprecated: #F97316; /* Orange */

    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

/* Layout */
.app-layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 340px;
    background: rgba(38, 17, 45, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--clr-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow-y: auto;
}

.viewer {
    flex: 1;
    overflow-y: auto;
    padding: 3rem 2rem;
    position: relative;
    scroll-behavior: smooth;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--clr-primary);
    margin-bottom: 2rem;
}
.brand h1 { font-size: 1.25rem; font-weight: 700; color: var(--clr-text-main); }

/* Utility */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.w-full { width: 100%; }
.text-muted { color: var(--clr-text-muted); }
.text-center { text-align: center; }
.mono { font-family: var(--font-mono); font-size: 0.85rem; }
.max-w-sm { max-width: 24rem; }
.slide-in { animation: slideIn 0.3s ease; }
.fade-in { animation: fadeIn 0.3s ease; }

@keyframes slideIn { from { transform: translateX(-10px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Forms & Inputs */
.label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input, .textarea {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    color: var(--clr-text-main);
    padding: 0.75rem;
    font-family: inherit;
    transition: var(--transition);
}
.textarea { resize: vertical; min-height: 250px; }
.input:focus, .textarea:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 2px rgba(217, 70, 239, 0.2);
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.cb-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
}
.cb-label input { accent-color: var(--clr-primary); }

/* Buttons */
.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
}
.btn-sm { padding: 0.5rem 0.75rem; font-size: 0.8rem; }
.btn-primary { background: var(--clr-primary); color: #fff; box-shadow: 0 0 15px rgba(217, 70, 239, 0.3); }
.btn-primary:hover { background: var(--clr-primary-hover); box-shadow: 0 0 20px rgba(217, 70, 239, 0.5); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--clr-border); color: var(--clr-text-main); }
.btn-outline:hover { background: var(--clr-surface-hover); border-color: var(--clr-secondary); }
.btn-icon { background: var(--clr-surface); color: var(--clr-text-main); border: 1px solid var(--clr-border); }
.btn-icon:hover { background: var(--clr-surface-hover); color: var(--clr-primary); border-color: var(--clr-primary); }

/* Glass orb */
.glass {
    background: rgba(38, 17, 45, 0.4);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 3rem;
    backdrop-filter: blur(10px);
}
.icon-orb {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(217, 70, 239, 0.1);
    display: flex; justify-content: center; align-items: center;
    border: 1px solid rgba(217, 70, 239, 0.2);
    box-shadow: inset 0 0 20px rgba(217, 70, 239, 0.1);
}
.empty-layout { margin: auto; max-width: 600px; }

/* Timeline Feed */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 20px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--clr-border);
    border-radius: 1px;
}

.release-group {
    position: relative;
    margin-bottom: 2.5rem;
    animation: fadeIn 0.4s ease forwards;
}
.release-group::before {
    content: '';
    position: absolute;
    left: -24px; top: 8px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--clr-primary);
    box-shadow: 0 0 10px var(--clr-primary);
}

.release-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.release-version {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--clr-text-main);
}
.release-date {
    font-family: var(--font-mono);
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    background: var(--clr-surface);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--clr-border);
}

/* Entry Types & Items */
.type-section {
    margin-bottom: 1.5rem;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.type-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,0,0,0.2);
}

.type-header.added { border-left: 3px solid var(--type-added); color: var(--type-added); }
.type-header.changed { border-left: 3px solid var(--type-changed); color: var(--type-changed); }
.type-header.fixed { border-left: 3px solid var(--type-fixed); color: var(--type-fixed); }
.type-header.removed { border-left: 3px solid var(--type-removed); color: var(--type-removed); }
.type-header.security { border-left: 3px solid var(--type-security); color: var(--type-security); }
.type-header.deprecated { border-left: 3px solid var(--type-deprecated); color: var(--type-deprecated); }
.type-header.other { border-left: 3px solid var(--clr-text-muted); color: var(--clr-text-muted); }

.entry-list {
    list-style: none;
    padding: 0;
}
.entry-item {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--clr-border);
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.entry-item:first-child { border-top: none; }
.entry-item:hover { background: rgba(255,255,255,0.02); }

.entry-content { flex: 1; word-wrap: break-word; }
.entry-content code { background: rgba(255,255,255,0.08); padding: 0.1rem 0.3rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85em; color: var(--clr-secondary); }
.entry-content a { color: var(--clr-primary); text-decoration: none; }
.entry-content a:hover { text-decoration: underline; }

.btn-copy {
    opacity: 0;
    background: transparent; border: none; color: var(--clr-text-muted);
    cursor: pointer; padding: 4px; border-radius: 4px; transition: var(--transition);
}
.entry-item:hover .btn-copy { opacity: 1; }
.btn-copy:hover { background: var(--clr-surface-hover); color: var(--clr-primary); }

/* Toast */
.toast {
    position: fixed; bottom: 2rem; right: 2rem;
    background: var(--clr-accent); color: #000;
    padding: 0.75rem 1.5rem; border-radius: var(--radius-sm);
    font-weight: 500; z-index: 1000;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

/* Print Friendly Mode */
@media print {
    body { background: #fff !important; color: #000 !important; height: auto; overflow: visible; font-size: 11pt; }
    .no-print, .sidebar, .btn-copy { display: none !important; }
    .app-layout { display: block; height: auto; }
    .viewer { padding: 0; overflow: visible; }
    .timeline::before, .release-group::before { display: none; }
    .timeline { padding: 0; max-width: 100%; margin: 0; }
    .print-header { display: block !important; border-bottom: 2px solid #ccc; margin-bottom: 20px; padding-bottom: 10px; }
    
    .type-section { border: none !important; background: transparent !important; margin-bottom: 1rem; }
    .type-header { background: transparent !important; padding: 0; font-weight: bold; font-size: 12pt; border: none !important; color: #333 !important; text-decoration: underline; margin-bottom: 0.25rem; }
    .entry-item { padding: 0.2rem 0; border: none !important; }
    .entry-item::before { content: "- "; }
    .release-header { margin-bottom: 0.5rem; }
    .release-version { color: #000; font-size: 14pt; }
    .release-date { background: transparent; padding: 0; border: none; color: #555; }
    .entry-content code { background: #f0f0f0; color: #333; }
}

@media (max-width: 768px) {
    .app-layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; max-height: 45vh; border-bottom: 1px solid var(--clr-border); }
    .viewer { padding: 1.5rem; height: 55vh; }
}
