:root {
    --bg-color: #0d0d0d;
    --card-bg: #1a1a1a;
    --accent-color: #00ff88;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-green: #00ff88;
    --deep-green: #004d33;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

nav {
    padding: 1rem 5%;
    background: rgba(13, 13, 13, 0.9);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(0, 255, 136, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 2.7s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 1001;
}

.hamburger div {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

nav strong {
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #00ff88, #00bdff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 5rem 0.75rem;
    text-align: center;
}

h1 {
    font-size: clamp(2.2rem, 10vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.ai-answer-block {
    font-size: 1.05rem;
    color: #777;
    font-style: italic;
    line-height: 1.7;
    margin: -0.5rem auto 2.5rem;
    max-width: 800px;
    border-left: 2px solid var(--accent-color);
    padding-left: 1.5rem;
    text-align: left;
}

.test-area {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.test-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

textarea {
    width: 100%;
    height: 180px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    resize: none;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

button {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 255, 136, 0.4);
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 2rem;
}

.window-box {
    text-align: left;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.window-header {
    background: #111;
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.window-content {
    padding: 20px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    min-height: 120px;
    white-space: pre-wrap;
    word-break: break-all;
}

#window-a .window-content {
    color: #ff4d4d;
}

#window-b .window-content {
    color: var(--accent-color);
}

.label-sov {
    color: var(--accent-color);
}

.label-legacy {
    color: #ff4d4d;
}

.cta {
    display: inline-block;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    transition: all 0.3s ease;
}

.cta:hover {
    border-color: var(--accent-color);
    background: var(--glass-bg);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    nav {
        padding: 1rem 20px;
    }

    main {
        padding: 3rem 1rem;
        text-align: left;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .nav-links {
        display: none !important;
    }

    .nav-links.active {
        display: flex !important;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background: rgba(13, 13, 13, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        z-index: 1000;
        transform: none;
        visibility: visible;
    }

    .hamburger {
        display: flex;
    }

    .test-area {
        padding: 1.5rem 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .cta {
        width: 100% !important;
        text-align: center;
    }

    ul,
    ol {
        padding-left: 20px !important;
        list-style-position: inside;
    }

    .test-area {
        padding: 1.5rem 0;
        background: transparent;
        border: none;
        box-shadow: none;
        text-align: left;
    }

    /* Prevent floating element collision on mobile */
    .floating-box,
    .public-record,
    .gov-label {
        position: static !important;
        width: 100% !important;
        margin-bottom: 2rem !important;
        display: block !important;
    }

    .quote-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    #quote-date {
        position: static !important;
        margin-top: 0.5rem;
    }

    /* Intensive Container Reset */
    .quote-container,
    .gov-paper,
    .spec-container,
    .docs-container,
    .test-area {
        padding: 2rem 1rem !important;
        width: 100% !important;
        margin: 2rem 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .quote-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem !important;
    }

    #quote-date {
        position: static !important;
        font-size: 0.8rem !important;
    }

    .item-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
        padding: 1.5rem 0 !important;
    }

    .item-row>div {
        width: 100% !important;
        text-align: left !important;
    }

    /* Floating Element Purge */
    .floating-box,
    .public-record,
    .gov-label {
        display: none !important;
    }

    h1,
    h2 {
        word-break: break-word !important;
    }
}

footer {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    padding: 4rem 20px;
}

footer div {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Code block resilience for /guide.html */
pre,
code {
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
    padding: 1rem 0;
    border-radius: 8px;
    background: transparent;
}

@media (max-width: 768px) {

    pre,
    code,
    .math-block {
        padding: 1.5rem !important;
    }
}

/* Pro-Level Success Popup (Shopify Style) */
#thank-you-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 2000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

#thank-you-popup.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    color: var(--accent-color);
}

#thank-you-popup h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #fff;
    font-weight: 900;
}

#thank-you-popup p {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    display: block;
    opacity: 1;
}

.popup-shine {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg,
            transparent 45%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 55%);
    animation: popupShine 6s infinite ease-in-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes popupShine {
    0% {
        transform: translate(140%, -140%);
    }

    20% {
        transform: translate(-140%, 140%);
    }

    100% {
        transform: translate(-140%, 140%);
    }
}

/* Compliance Bubble & Modal */
/* Compliance Bubble & Modal */
.compliance-bubble {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 33px;
    height: 33px;
    background: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: fixed;
}

.compliance-bubble::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg,
            transparent 45%,
            rgba(255, 255, 255, 0.6) 50%,
            transparent 55%);
    pointer-events: none;
    transition: none;
    transform: translate(-100%, 100%);
}

.compliance-bubble:hover::after {
    animation: bubbleShineSwipe 0.6s ease-in-out;
}

@keyframes bubbleShineSwipe {
    0% {
        transform: translate(-100%, 100%);
    }

    100% {
        transform: translate(100%, -100%);
    }
}

.bubble-shield {
    font-size: 1rem;
}

.compliance-modal {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 320px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--accent-green);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.compliance-modal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.modal-content {
    position: relative;
    color: var(--text-primary);
}

.modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-green);
}

.modal-header {
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--accent-green);
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

.compliance-modal p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0;
    color: #ccc;
    text-align: left;
}

@media (max-width: 600px) {
    .compliance-bubble {
        bottom: 20px;
        left: 20px;
        width: 30px;
        height: 30px;
    }

    .compliance-modal {
        left: 20px;
        bottom: 80px;
        width: calc(100vw - 40px);
        max-width: 350px;
    }
}