/* Changelog Page Styles */
@import url('base.css');

body {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    padding: 20px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    background: #1f2937;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border: 1px solid #2d3748;
    overflow: hidden;
}

.header {
    background: #374151;
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #4b5563;
}

.header h1 {
    color: #f3f4f6;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.content {
    display: flex;
    min-height: 600px;
}

.toc-container {
    width: 280px;
    background: #374151;
    padding: 0.75rem;
    border-right: 1px solid #4b5563;
    overflow-y: auto;
}

.toc-container h3 {
    color: #f3f4f6;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #6366f1;
}

.toc {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.toc ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 0.25rem;
}

/* General TOC link styles */
.toc a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
}

.toc a:hover {
    background: #4b5563;
    color: #f3f4f6;
    border-color: #6366f1;
    transform: translateX(2px);
}

.toc a:active {
    background: #6366f1;
    color: white;
}

/* Version links (H2 level) - clean, minimal styling */
.toc > li > a {
    background: transparent !important;
    color: #f3f4f6 !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    margin-bottom: 0.5rem;
    border: none !important;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem !important; /* Extra padding on right for icon */
    border-left: 3px solid #6366f1 !important;
    border-radius: 0 !important;
    position: relative !important; /* For absolute positioned icon */
}

.toc > li > a:hover {
    background: #374151 !important;
    color: #f3f4f6 !important;
    border-left-color: #8b5cf6 !important;
    transform: translateX(2px);
}

/* Sub-items (H3 level) - indented */
.toc ul {
    margin-left: 0.75rem;
    margin-top: 0.125rem;
}

.toc > ul,
.toc > ul > li > ul {
    margin-left: 0;
}

.toc ul a {
    font-size: 0.9rem;
    font-weight: 400;
    padding: 0.375rem 0.5rem;
    background: transparent;
    border: none;
}

.toc > ul > li > ul > li > a {
    font-size: medium;
    font-weight: 600;
}

/* Icon hover effects */
.toc > ul > li > ul > li > a span:hover {
    background: #6e7a8b !important;
    color: #f3f4f6 !important;
}

.toc ul a:hover {
    background: #4b5563;
    transform: translateX(2px);
}

.changelog {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.changelog h2 {
    color: #f3f4f6;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    padding: 1rem 0;
    border-bottom: 2px solid #4b5563;
    position: relative;
}

.changelog h2:first-child {
    margin-top: 0;
}

.changelog h2 .version-badge {
    background: #6366f1;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 1rem;
}

.changelog h3 {
    color: #e5e7eb;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    display: flex;
    align-items: center;
}

.changelog h3 .category-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.changelog ul {
    color: #d1d5db;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.changelog li {
    margin-bottom: 0.5rem;
}

.changelog code {
    background: #374151;
    color: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.changelog pre {
    background: #374151;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid #4b5563;
}

.changelog pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.changelog p {
    color: #d1d5db;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.changelog strong {
    color: #f3f4f6;
    font-weight: 600;
}

.changelog em {
    color: #9ca3af;
    font-style: italic;
}

.changelog a {
    color: #6366f1;
    text-decoration: none;
}

.changelog a:hover {
    text-decoration: underline;
}

/* Category-specific styling */
.changelog h3:has(.category-icon:contains("Added")) {
    color: #10b981;
}

.changelog h3:has(.category-icon:contains("Changed")) {
    color: #f59e0b;
}

.changelog h3:has(.category-icon:contains("Fixed")) {
    color: #ef4444;
}

.changelog h3:has(.category-icon:contains("Security")) {
    color: #8b5cf6;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .content {
        flex-direction: column;
    }
    
    .toc {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #4b5563;
        max-height: 200px;
    }
    
    .changelog {
        padding: 1.5rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
}
