/* ==========================================================================
   SiraFiles — Central Core Stylesheet
   ========================================================================== */

/* Modern Minimalist Reset & Layout Variables */
:root {
    --bg-canvas: #fdfdfd;
    --bg-container: #ffffff;
    --bg-subtle: #f8fafc;
    --text-main: #111111;
    --text-muted: #666666;
    --border-color: #f1f1f1;
    
    /* Light Mode: Sharp Industrial Racing Red */
    --brand-primary: #e50914; 
    --brand-hover: #b8070f;
    --border-dashed: #ffccd0;
    --bg-hover: #fff5f5;
    --text-highlight: #e50914;
    
    /* Theme Toggle Variables */
    --switch-bg: #e2e8f0;
    --switch-handle: #ffffff;
    
    /* Changelog Accent Colors */
    --badge-bg: #fff0f1;
    --badge-text: #e50914;
}

/* Dark Theme Property Overrides */
.dark-theme {
    --bg-canvas: #0b0e14;
    --bg-container: #131922;
    --bg-subtle: #161f2d;
    --text-main: #f7fafc;
    --text-muted: #a0aec0;
    --border-color: #222b3a;
    
    /* Dark Mode: Carbon & Electric Coral */
    --brand-primary: #e03e3e;     
    --brand-hover: #ff5252;       
    --border-dashed: #441c1e;
    --bg-hover: #1d1112;          
    --text-highlight: #ff6b4a;    

    /* Dark Switch Track Variables */
    --switch-bg: #2d3748;
    --switch-handle: #ffffff;
    
    /* Dark Changelog Accents */
    --badge-bg: #2b1411;
    --badge-text: #ff6b4a;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-canvas);
    color: var(--text-main);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Modernized Responsive Navigation Header */
header {
    background-color: var(--bg-container); 
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.01);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--brand-primary); 
    text-decoration: none;
    cursor: pointer;
    z-index: 110;
    transition: color 0.2s ease;
}

/* Mobile Menu Toggle Button Trigger */
.menu-trigger {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    margin: 0;
    cursor: pointer;
    color: var(--text-main);
    z-index: 110;
}

.header-actions {
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 24px;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 0;
    transition: color 0.15s ease;
    cursor: pointer;
}

nav a:hover, nav a.active {
    color: var(--text-highlight); 
}

/* Responsive Theme Slider Framework */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 24px;
    user-select: none;
}

.theme-switch-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-right: 10px;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--switch-bg);
    transition: .25s ease;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--switch-handle);
    transition: .25s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

input:checked + .slider {
    background-color: var(--brand-primary); 
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Adaptive Structural Layout Canvas */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 16px;
    background-color: var(--bg-canvas);
    transition: background-color 0.2s ease;
}

/* Modernized Flexible Fluid Cards */
.container, .text-container {
    text-align: left;
    padding: 32px 24px;
    background: var(--bg-container);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 580px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0,0,0,0.01);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    margin-bottom: 24px;
}

.container h2, .text-container h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--text-main);
}

.container p, .text-container p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 16px;
}

/* Form Styles for Contact & Advertise */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-canvas);
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
}

/* Blog Styles */
.blog-card {
    border-bottom: 1px dashed var(--border-color);
    padding: 20px 0;
}

.blog-card:first-child { padding-top: 4px; }
.blog-card:last-child { border-bottom: none; padding-bottom: 0; }

.blog-meta {
    font-size: 13px;
    color: var(--brand-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.blog-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
}

/* Brand Tinted Drop Zone Canvas */
.upload-zone {
    border: 2px dashed var(--border-dashed);
    background-color: var(--bg-container);
    padding: 50px 20px;
    margin-top: 24px;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    text-align: center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.upload-zone:hover, .upload-zone:active {
    border-color: var(--brand-primary);
    background-color: var(--bg-hover);
}

.upload-zone span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-highlight); 
}

input[type="file"] {
    display: none;
}

/* High-Impact Brand Primary Action Buttons */
button, .btn-submit, .action-btn {
    width: 100%;
    min-height: 48px;
    margin-top: 24px;
    background-color: var(--brand-primary);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.1);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

button:hover, .action-btn:hover, .btn-submit:hover {
    background-color: var(--brand-hover);
}

button:active, .action-btn:active, .btn-submit:active {
    transform: scale(0.98);
}

.action-btn { display: none; }

#status {
    margin-top: 20px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: var(--text-highlight);
    background-color: var(--bg-hover);
}

/* ==========================================================================
   Unified Accordion System Layout (Replacing Legacy Rules)
   ========================================================================== */
.changelog-accordion {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.changelog-release {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-container);
    transition: background-color 0.2s ease;
}

.changelog-release:last-child {
    border-bottom: none;
}

/* Base interactive summary container */
.changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    position: relative;
    padding-right: 45px;
}

.changelog-header::-webkit-details-marker {
    display: none;
}

/* Alignment grouping for tag badge items */
.header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.changelog-version {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
}

.changelog-date {
    font-size: 13px;
    color: var(--text-muted);
}

.changelog-badge {
    background-color: var(--badge-bg);
    color: var(--badge-text);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Styled internal list modification */
.changelog-list {
    margin: 0;
    padding: 0 20px 20px 40px;
    list-style-type: disc;
    color: var(--text-muted);
}

.changelog-list li {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.changelog-list li:last-child {
    margin-bottom: 0;
}

/* Custom CSS expandable element signifiers (+ / -) */
.changelog-header::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Alters signature symbol and colors when entry panel is active and open */
.changelog-release[open] .changelog-header::after {
    content: '\2212'; /* Typographic minus sign */
    color: var(--brand-primary);
}

.changelog-release[open] {
    background-color: var(--bg-subtle);
}

/* Ad Containers (Google AdSense) */
.ad-wrapper {
    width: 100%;
    max-width: 580px;
    margin: 10px auto;
    text-align: center;
}

/* Mobile Muted Footer Architecture */
footer {
    background-color: var(--bg-container);
    padding: 32px 16px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

footer p { margin: 0 0 16px 0; }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
    padding: 4px 8px;
    font-weight: 500;
}

footer a:hover { color: var(--text-highlight); }

/* ==========================================================================
   SiraFiles.com — Fully Unified Advertise Component Styles
   ========================================================================== */
.advertise-page-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 0;
}

.advertise-hero {
    text-align: center;
    margin-bottom: 40px;
}

.advertise-hero h1 {
    color: var(--text-main);
    font-size: 2.5rem;
    margin-bottom: 10px;
    margin-top: 0;
    letter-spacing: -0.5px;
}

.advertise-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 0;
}

.intro-card {
    background-color: var(--bg-canvas);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.intro-card h2 {
    margin-top: 0;
    color: var(--text-main);
}

.steps-section {
    margin-bottom: 40px;
}

.steps-section h2 {
    color: var(--text-main);
    margin-bottom: 24px;
}

.advertise-page-wrapper .step {
    display: flex;
    margin-bottom: 30px;
}

.step-number {
    background-color: var(--brand-primary);
    color: #ffffff;
    font-weight: bold;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-content h3 {
    margin: 0 0 10px 0;
    color: var(--text-main);
    font-size: 1.3rem;
}

.step-content p {
    margin: 0 0 12px 0;
    color: var(--text-muted);
}

.btn-advertise {
    display: inline-flex;
    align-items: center;
    background-color: var(--brand-primary);
    color: #ffffff !important;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.1);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-advertise:hover {
    background-color: var(--brand-hover);
}

.btn-advertise:active {
    transform: scale(0.98);
}

.btn-advertise i {
    margin-right: 8px;
}

.domain-highlight-badge {
    background-color: var(--bg-canvas);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-highlight);
    border: 1px solid var(--border-color);
}

.notice-box-ads {
    background-color: var(--bg-canvas);
    border-left: 4px solid var(--brand-primary);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.notice-box-ads p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   Media Query Responsive Infrastructure Breaks
   ========================================================================== */
@media (max-width: 768px) {
    header { padding: 12px 16px; }
    main { padding: 24px 12px; }
    .container, .text-container { padding: 24px 16px; border-radius: 10px; }
    
    .menu-trigger { display: block; }
    
    .header-actions {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--bg-container);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start; /* Corrects mobile layout flow orientation */
        padding: 80px 24px 40px 24px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -4px 0 20px rgba(0,0,0,0.05);
        z-index: 105;
    }
    
    body.menu-open .header-actions {
        right: 0;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 24px;
    }
    
    nav a {
        margin-left: 0;
        margin-bottom: 16px;
        font-size: 18px;
        width: 100%;
    }
    
    .theme-switch-wrapper {
        margin-left: 0;
        margin-top: 24px;
        width: 100%;
        justify-content: space-between;
    }
    
    .theme-switch-label { font-size: 15px; }

    /* Advertise Page Responsive Breakpoints */
    .advertise-page-wrapper .step {
        flex-direction: column;
    }
    
    .step-number {
        margin-bottom: 12px;
    }
    
    .advertise-hero h1 {
        font-size: 2rem;
    }
}

/* Tool Switch Tabs for SiraFiles Container */
.tool-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
}

.dark-theme .tool-tabs {
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    color: var(--text-main, #0f172a);
    background-color: rgba(0, 0, 0, 0.03);
}

.dark-theme .tab-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    background-color: var(--brand-primary, #2563eb);
    color: #ffffff !important;
}