/* === THEME VARIABLES (FORBES EDITORIAL INSPIRED) === */
:root, [data-theme="light"] {
    --bg-main: #ffffff;
    --bg-panel: #ffffff;
    --bg-input: #ffffff;
    --bg-header: #f9f9f9;
    
    --border-color: #e5e5e5;
    --border-focus: #111111;
    
    --text-primary: #111111;
    --text-secondary: #333333;
    --text-muted: #666666;
    
    --accent-red: #E02F31;
    --accent-red-hover: #b32527;
    
    --diff-ins-bg: rgba(46, 160, 67, 0.08);
    --diff-ins-bg-strong: rgba(46, 160, 67, 0.2);
    --diff-ins-text: #1a7f37;
    
    --diff-del-bg: rgba(207, 34, 46, 0.08);
    --diff-del-bg-strong: rgba(207, 34, 46, 0.2);
    --diff-del-text: #cf222e;
    
    --diff-empty: #f9f9f9;
    --diff-line-num: #999999;
    
    --radius-lg: 0px;
    --radius-md: 0px;
    --radius-sm: 0px;
    
    --transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

[data-theme="dark"] {
    --bg-main: #000000;
    --bg-panel: #0a0a0a;
    --bg-input: #000000;
    --bg-header: #111111;
    
    --border-color: #333333;
    --border-focus: #ffffff;
    
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    
    --accent-red: #E02F31;
    --accent-red-hover: #ff3b3e;
    
    --diff-ins-bg: rgba(46, 160, 67, 0.15);
    --diff-ins-bg-strong: rgba(46, 160, 67, 0.4);
    --diff-ins-text: #4ade80;
    
    --diff-del-bg: rgba(248, 81, 73, 0.15);
    --diff-del-bg-strong: rgba(248, 81, 73, 0.4);
    --diff-del-text: #ff7b72;
    
    --diff-empty: #111111;
    --diff-line-num: #666666;
}

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

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-main);
}

/* Monospace strict font */
.d2h-wrapper * {
    font-family: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace !important;
}

/* Document Font (Sans-Serif) Toggle */
.results-section.font-sans .d2h-wrapper * {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

/* Layout */
.app-container {
    width: 95%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.5rem 1.5rem 2rem 1.5rem;
    transition: width 0.3s ease;
}

.app-masthead {
    width: 100%;
    background-color: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.masthead-top {
    position: relative;
    width: 95%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333333;
}

.masthead-right {
    position: absolute;
    right: 1.5rem;
    display: flex;
    align-items: center;
}

.masthead-bottom {
    width: 95%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1.5rem;
}

.masthead-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.masthead-nav a {
    color: #e5e5e5;
    text-decoration: none;
    font-size: 0.85rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.masthead-nav a:hover {
    color: #ffffff;
}

.nav-divider {
    color: #444444;
}

.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-blue);
    color: #ffffff !important;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s ease !important;
}

.support-btn:hover {
    background: #2188ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 136, 255, 0.3);
}

.masthead-bottom .nav-divider {
    color: #666666;
    margin: 0 0.75rem;
}

.theme-toggle-btn {
    font-size: 1.5rem !important;
    color: var(--text-muted);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.serif-masthead {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 24px;
    letter-spacing: 1px;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-name {
    font-weight: normal;
    color: #cccccc;
    font-size: 20px;
}

.logo-divider {
    font-weight: 300;
    color: #444444;
    font-size: 24px;
    padding-bottom: 2px;
}

.product-name {
    font-weight: bold;
    color: #ffffff;
    font-size: 24px;
}

/* Panels */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: none;
    transition: var(--transition);
}

/* Input Grid */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    max-height: 1000px;
    opacity: 1;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-grid.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.input-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: var(--transition);
}

.input-header span {
    flex: 1;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--text-primary);
}

textarea {
    width: 100%;
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    color: var(--text-primary);
    padding: 1rem;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: var(--transition);
    
    /* Force word wrap */
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
    overflow-x: hidden;
    overflow-y: auto;
}

textarea:focus {
    border-color: var(--border-focus);
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    transition: var(--transition);
}

@media (max-width: 900px) {
    .action-bar {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

.view-toggles {
    display: flex;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
    border: 1px solid var(--border-color);
}

.btn-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: calc(var(--radius-sm) - 0.25rem);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-tab:hover {
    color: var(--text-primary);
}

.btn-tab.active {
    background: var(--bg-header);
    color: var(--text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--accent-red);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-red-hover);
}

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

.results-section {
    margin-top: 3rem;
}

.diff-panel {
    padding: 0;
    overflow: hidden;
}


/* ========================================= */
/* DIFF2HTML HARD OVERRIDES FOR VS CODE LOOK */
/* ========================================= */

.d2h-wrapper {
    background: var(--bg-panel) !important;
}

.d2h-file-header { display: none; }

.d2h-file-wrapper {
    border: none !important;
    border-radius: 0;
    margin-bottom: 0;
    background: var(--bg-panel) !important;
    overflow-x: auto;
}

.d2h-files-diff {
    background: var(--bg-panel) !important;
    display: block !important;
    width: 100% !important;
    min-width: 700px !important; /* Force single horizontal scrollbar on mobile screens */
    border-color: var(--border-color) !important;
}

/* Force the actual table to strictly obey calculated column widths */
.d2h-diff-table {
    table-layout: fixed !important;
    width: 100% !important;
}

.d2h-code-wrapper { width: 100%; }

/* Diffs Output Table Customization */
.d2h-code-line, .d2h-code-line-ctn {
    color: var(--text-primary) !important;
    font-size: 14px;
    background: transparent !important;
    line-height: 1.5 !important;
    padding-top: 1px !important;
    padding-bottom: 1px !important;
}

/* Hunk Header Styling (@@ -1,27 +1,27 @@) */
.d2h-info .d2h-code-line, 
.d2h-info .d2h-code-side-line {
    background-color: var(--diff-empty) !important;
    border-radius: 0;
    padding: 2px 8px !important;
    margin: 8px 0;
    display: inline-block;
    color: var(--diff-line-num) !important;
    font-size: 12px !important;
    font-family: ui-monospace, Menlo, Monaco, monospace !important;
    /* Allow the long hunk header to wrap so it doesn't force the left column to expand in fixed layout */
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

.wrap-text .d2h-code-line, 
.wrap-text .d2h-code-line-ctn {
    white-space: pre-wrap !important; 
    word-wrap: break-word !important; 
    word-break: break-word !important;
}

/* Override all deep table backgrounds and align to top */
.d2h-file-diff, 
.d2h-diff-tbody, 
.d2h-diff-tbody > tr, 
.d2h-diff-tbody > tr > td {
    background-color: transparent !important;
    border-color: var(--border-color) !important;
    vertical-align: top !important;
}

.d2h-code-line,
.d2h-code-side-line {
    display: flex !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 0 0.5rem !important; /* Base padding */
}

.d2h-code-line-prefix {
    display: block !important;
    flex-shrink: 0 !important;
    width: 2em !important;
    text-indent: 0 !important;
    color: var(--text-muted) !important;
}

.d2h-code-line-ctn {
    display: block !important;
    flex-grow: 1 !important;
    min-width: 0 !important; /* Critical to allow text to wrap inside the flex container */
    text-indent: 0 !important;
}

/* ========================================= */
/* DYNAMIC WRAPPING & TABLE LAYOUT RULES     */
/* ========================================= */

/* Word Wrap ACTIVE Rules (Wrap Toggle is ON) */
.results-section.wrap-text .d2h-diff-table {
    table-layout: fixed !important;
    width: 100% !important;
}
.results-section.wrap-text .d2h-code-line-ctn {
    white-space: pre-wrap !important; 
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
}
/* Lock line numbers into the table cell so they don't float absolutely */
.results-section.wrap-text .d2h-code-side-linenumber {
    position: static !important;
    display: table-cell !important;
    width: 4em !important;
    min-width: 4em !important;
    padding: 0 0.25rem !important;
    box-sizing: border-box !important;
}
/* Force text columns to perfectly fill the rest of the 50/50 split */
.results-section.wrap-text .d2h-diff-tbody > tr > td:not(.d2h-code-side-linenumber) {
    width: calc(50% - 4em) !important;
    max-width: calc(50% - 4em) !important;
}

/* Word Wrap INACTIVE Rules (No Wrap Toggle is ON) */
.results-section:not(.wrap-text) .d2h-diff-table {
    table-layout: auto !important;
    width: max-content !important;
    min-width: 100% !important;
}
.results-section:not(.wrap-text) .d2h-code-line-ctn {
    white-space: pre !important;
}
.results-section:not(.wrap-text) .d2h-code-side-linenumber {
    position: static !important;
    display: table-cell !important;
    width: 4em !important;
    min-width: 4em !important;
    padding: 0 0.25rem !important;
    box-sizing: border-box !important;
}
.results-section:not(.wrap-text) .d2h-diff-tbody > tr > td:not(.d2h-code-side-linenumber) {
    width: auto !important;
    max-width: none !important;
    min-width: 350px !important;
}

.d2h-code-linenumber,
.d2h-code-side-linenumber,
.d2h-info,
.d2h-diff-tbody > tr > td.d2h-code-linenumber,
.d2h-diff-tbody > tr > td.d2h-code-side-linenumber,
.d2h-diff-tbody > tr > td.d2h-info {
    color: var(--diff-line-num) !important;
    border: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    padding-right: 1.5rem !important;
}

/* Force color on nested div tags generated by diff2html */
.d2h-code-linenumber *,
.d2h-code-side-linenumber *,
.d2h-info * {
    color: var(--diff-line-num) !important;
}

.d2h-emptyplaceholder {
    background-color: var(--diff-empty) !important;
    border-color: var(--border-color) !important;
}

/* Insertions (Green) */
.d2h-ins, .d2h-diff-tbody > tr > td.d2h-ins {
    background-color: var(--diff-ins-bg) !important;
    border-color: var(--diff-ins-bg-strong) !important;
}
.d2h-ins .d2h-code-line-ctn, .d2h-ins .d2h-code-line-prefix {
    color: var(--text-primary) !important;
}

/* Deletions (Red) */
.d2h-del, .d2h-diff-tbody > tr > td.d2h-del {
    background-color: var(--diff-del-bg) !important;
    border-color: var(--diff-del-bg-strong) !important;
}
.d2h-del .d2h-code-line-ctn, .d2h-del .d2h-code-line-prefix {
    color: var(--text-primary) !important;
}

/* Intra-line highlights (The specific changed words) */
.d2h-ins .d2h-code-line-ctn ins, .d2h-ins ins {
    background-color: var(--diff-ins-bg-strong) !important;
    color: var(--text-primary) !important; /* Perfect contrast */
    text-decoration: none;
    border-radius: 2px;
}
.d2h-del .d2h-code-line-ctn del, .d2h-del del {
    background-color: var(--diff-del-bg-strong) !important;
    color: var(--text-primary) !important; /* Perfect contrast */
    text-decoration: none;
    border-radius: 2px;
}

/* Borders and layout for side-by-side diff panels */
.d2h-file-side-diff {
    border-color: var(--border-color) !important;
    width: 100% !important; /* Take full width of grid column */
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* ========================================= */
/* EXPORT DROPDOWN STYLES */
/* ========================================= */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background-color: var(--bg-panel);
    min-width: 260px;
    box-shadow: none;
    border: 1px solid var(--border-color);
    border-radius: 0;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 12px 16px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.dropdown-content button:hover {
    background-color: var(--bg-main);
}

/* ========================================= */
/* PRINT / PDF EXPORT OVERRIDES */
/* ========================================= */
@media print {
    body {
        background-color: white !important;
        color: black !important;
    }
    .app-masthead, .utility-bar, .input-grid, .action-bar, .dropdown-content, .d2h-file-header,
    .how-it-works-section, .faq-section, .agowt-global-footer, .ad-container {
        display: none !important;
    }
    .app-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .results-section {
        margin-top: 0 !important;
    }
    .diff-panel {
        border: none !important;
        box-shadow: none !important;
    }
    .d2h-wrapper * {
        color: black !important;
    }
    .d2h-wrapper {
        background: white !important;
    }
    .d2h-file-wrapper {
        background: white !important;
        border: 1px solid #ccc !important;
    }
    .d2h-files-diff {
        background: white !important;
        border-color: #ccc !important;
        min-width: 100% !important; /* Override 700px so it fits perfectly on A4 paper */
    }
    /* High specificity deep selectors to override diff2html dark theme bleed in print */
    .d2h-code-line, .d2h-code-line-ctn, .d2h-code-line-prefix,
    .d2h-code-side-linenumber, .d2h-diff-tbody > tr > td.d2h-code-side-linenumber, .d2h-code-side-linenumber *,
    .d2h-info, .d2h-diff-tbody > tr > td.d2h-info, .d2h-info *, .d2h-info .d2h-code-side-line {
        color: black !important;
        font-size: 6pt !important;
        line-height: 1.2 !important;
    }
    .d2h-code-side-linenumber, .d2h-diff-tbody > tr > td.d2h-code-side-linenumber {
        width: 2em !important;
        max-width: 2em !important;
        padding: 0 !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    .d2h-code-side-line, .d2h-diff-tbody > tr > td.d2h-code-side-line {
        width: calc(100% - 2em) !important;
        max-width: calc(100% - 2em) !important;
        box-sizing: border-box !important;
    }
    .d2h-info, .d2h-info .d2h-code-side-line {
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    /* Enforce wrapping exclusively for print to prevent truncation */
    .d2h-code-line-ctn, .d2h-code-line {
        white-space: pre-wrap !important; 
        word-wrap: break-word !important; 
        word-break: break-word !important;
    }
    /* Enforce strict layout */
    .d2h-diff-table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
    }
    .d2h-file-side-diff {
        width: 100% !important; /* Take full width of grid column */
        min-width: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    .d2h-emptyplaceholder {
        background-color: #f6f8fa !important;
        border-color: #ccc !important;
    }
    
    /* Ensure colors print correctly if user enabled background graphics */
    .d2h-ins, .d2h-diff-tbody > tr > td.d2h-ins {
        background-color: #e6ffed !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .d2h-del, .d2h-diff-tbody > tr > td.d2h-del {
        background-color: #ffeef0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .d2h-ins .d2h-code-line-ctn ins, .d2h-ins ins {
        background-color: #abf2bc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .d2h-del .d2h-code-line-ctn del, .d2h-del del {
        background-color: #ffd8d9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ========================================= */
/* MOBILE RESPONSIVE LAYOUT */
/* ========================================= */
@media (max-width: 600px) {
    .action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .view-toggles {
        justify-content: center;
        width: 100%;
        margin: 0 0 0.5rem 0 !important;
    }
    #btnToggleInputs,
    .export-dropdown,
    #compareBtn {
        width: 100%;
        margin: 0 !important;
    }
    #btnToggleInputs, #compareBtn, #btnExportMenu {
        justify-content: center;
        text-align: center;
    }
    .dropdown-content {
        left: 0;
        right: 0;
        min-width: unset;
        width: 100%;
    }
}

/* ==========================================================================
   AGOWT Global Footer (Forbes Inspired Template)
   ========================================================================== */

.agowt-global-footer {
    background-color: #000000;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    padding-top: 3rem;
    margin-top: 4rem;
    border-top: 1px solid #333;
}

.agowt-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Top Navigation */
.agowt-footer-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 2rem;
    gap: 3rem;
}

.agowt-footer-logo {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.agowt-footer-nav {
    display: flex;
    gap: 1.5rem;
}

.agowt-footer-nav a {
    color: #cccccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.agowt-footer-nav a:hover {
    color: #ffffff;
}

.agowt-footer-divider {
    height: 1px;
    background-color: #333333;
    width: 100%;
}

/* Middle Grid */
.agowt-footer-middle {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding: 3rem 0;
}

.agowt-footer-col h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.agowt-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.agowt-footer-col ul li {
    margin-bottom: 0.75rem;
}

.agowt-footer-col ul li a {
    color: #aaaaaa;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.agowt-footer-col ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Featured Section (Column 1) */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 450px;
}

.featured-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.featured-image {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #222222;
    border-radius: 8px;
    border: 1px solid #333;
    object-fit: cover;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.featured-image:hover {
    transform: scale(1.04);
    border-color: #555;
}
.featured-card span {
    font-size: 12px;
    color: #cccccc;
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: #ffffff;
    font-size: 20px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.social-links a:hover {
    opacity: 0.7;
}

/* Bottom Legal Bar */
.agowt-footer-bottom {
    background-color: #111111;
    border-top: 1px solid #222222;
    padding: 1.5rem 0;
}

.legal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.agowt-copyright {
    color: #888888;
    font-size: 12px;
}

.agowt-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.agowt-legal-links a {
    color: #888888;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.agowt-legal-links a:hover {
    color: #ffffff;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .agowt-footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .agowt-footer-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .agowt-footer-middle {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2rem 0;
    }
    
    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 350px;
    }
    
    .agowt-legal-links {
        gap: 1rem;
    }
}

/* ==========================================================================
   How It Works & FAQ Sections
   ========================================================================== */

.how-it-works-section {
    padding: 1rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.hiw-header {
    margin-bottom: 2rem;
}

.hiw-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-transform: none;
    letter-spacing: normal;
    font-family: Georgia, "Times New Roman", Times, serif;
    color: var(--text-primary);
}

.hiw-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.hiw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.hiw-card {
    background: var(--bg-panel);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.hiw-card:hover {
    transform: translateY(-5px);
}

.hiw-card i {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hiw-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hiw-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 4rem auto 2rem;
    padding: 0 1rem;
}

.serif-heading {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 2rem;
    font-weight: normal;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: var(--bg-panel);
    padding: 1.25rem 1.5rem;
    font-size: 1.05rem;
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background: var(--bg-header);
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-main);
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hiw-grid {
        grid-template-columns: 1fr;
    }
}

/* Hide Line Numbers Toggle */
.results-section.hide-line-numbers .d2h-file-side-diff {
    width: 100% !important;
}

.results-section.hide-line-numbers .d2h-code-side-linenumber {
    display: none !important;
}

.results-section.hide-line-numbers .d2h-code-side-line {
    width: 100% !important;
    padding-left: 1rem !important;
}

/* ==========================================================================
   Monetization / Ads
   ========================================================================== */

.ad-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 300px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 900;
    text-align: center;
}

.ad-content {
    border: 1px dashed #444;
    padding: 2rem 1rem;
    border-radius: var(--radius-sm);
}

.ad-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.ad-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 1200px) {
    .ad-container {
        position: static;
        width: 100%;
        max-width: 400px;
        margin: 2rem auto;
        box-shadow: none;
    }
}
