:root {
    /* Color Palette - Muted "Dollar Green" Reference */
    --bg-dark: #0d0f0c;
    --bg-card: rgba(26, 30, 24, 0.8);
    --primary: #94a34b;
    /* Muted Olive/Dollar Green */
    --primary-light: #b1bf71;
    --primary-dark: #6e7a36;
    --secondary: #242921;
    --accent: #94a34b;
    --success: #7a8c44;
    --warning: #b38b4d;
    --danger: #9c4a4a;
    --text-primary: #e2e8f0;
    --text-secondary: #7e8c78;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #94a34b 0%, #6e7a36 100%);
    --grad-dark: linear-gradient(180deg, #0d0f0c 0%, #161a14 100%);

    /* Spacing & Transitions (Golden Ratio: 1.618) */
    --spacing-unit: 1rem;
    --section-gap: 5rem;
    /* Increased for breathing room */
    --radius-lg: 1.5rem;
    --radius-md: 0.75rem;
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.618;
    overflow-x: hidden;
    /* Advanced Background: Grid + Blobs */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(148, 163, 75, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(148, 163, 75, 0.05) 0%, transparent 40%),
        linear-gradient(rgba(148, 163, 75, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 75, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
    /* Dynamic Safe Zones */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.main-header {
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.logo-icon {
    color: var(--primary);
    width: 32px;
    height: 32px;
}

.logo span span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: calc(var(--spacing-unit) * 1.618); /* Proportional Gap */
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.count-badge {
    background: var(--primary);
    color: var(--bg-dark);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-left: 6px;
    box-shadow: 0 0 10px rgba(148, 163, 75, 0.4);
    vertical-align: middle;
    transition: var(--transition);
}

.nav-links a:hover .count-badge {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(148, 163, 75, 0.6);
}

/* Main Content */
.content-wrapper {
    flex: 1;
    display: grid;
    grid-template-columns: 1.618fr 1fr; 
    gap: calc(var(--spacing-unit) * 2.618);
    padding: clamp(2rem, 8vh, 6rem) 0;
}

.main-content-area {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Screens */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

.screen.modal-style {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(13, 15, 12, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.5s cubic-bezier(0.5, 0, 0.5, 1), opacity 0.5s ease;
}

.screen.modal-style.closing {
    transform: scale(0.85) translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.screen.modal-style.active {
    display: flex;
    animation: macOpen 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

@keyframes macOpen {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.blurred-bg {
    filter: blur(15px);
    transition: filter 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intro Screen */
#intro-screen {
    text-align: left;
    max-width: 90%; /* Avoid stretching too much */
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(2.5rem, 4.5vw, 4rem); 
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
    font-weight: 800;
    text-shadow: 0 0 30px rgba(148, 163, 75, 0.3);
}

#intro-screen p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-image-placeholder {
    margin: 3rem auto;
    max-width: 600px;
    height: 400px;
    background: url('hero.png') no-repeat center center;
    background-size: contain;
    filter: drop-shadow(0 20px 30px rgba(59, 130, 246, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark); 
    box-shadow: 0 0 20px rgba(148, 163, 75, 0.2), 0 8px 16px -4px rgba(148, 163, 75, 0.2);
    position: relative;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--primary-light);
    box-shadow: 0 0 30px rgba(148, 163, 75, 0.4), 0 12px 24px -6px rgba(148, 163, 75, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
    border-radius: var(--radius-lg);
}

/* Form Section */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
}

.step-container {
    padding: calc(var(--spacing-unit) * 2.618);
    max-width: 600px; /* More centered and focused */
    width: 100%;
    background: rgba(30, 35, 28, 0.6);
    border: 1px solid rgba(148, 163, 75, 0.1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.progress-bar-wrapper {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--grad-primary);
    width: 11.11%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#step-counter {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 50px;
}

.step {
    display: none;
    animation: slideIn 0.4s ease;
}

.step.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

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

.options.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.option-btn {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-align: left;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.option-btn:hover {
    background: rgba(148, 163, 75, 0.05);
    border-color: var(--primary);
    transform: translateX(5px);
}

.option-btn.selected {
    background: rgba(148, 163, 75, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(148, 163, 75, 0.15), inset 0 0 10px rgba(148, 163, 75, 0.05);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

input {
    width: 100%;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition);
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(148, 163, 75, 0.1);
}

#start-audit-btn {
    margin-top: 2rem;
}

.step-navigation {
    margin-top: 2rem;
}

.hidden {
    display: none;
}

/* Results Section */
.results-header {
    text-align: center;
    margin-bottom: 3rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem; /* Buffer for sticky footer */
    width: 100%;
    max-width: 100%;
}

.results-container-modal {
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 20px;
    overflow-x: hidden;
    background: rgba(13, 15, 12, 0.98);
    box-shadow: 0 50px 150px rgba(0, 0, 0, 0.9);
}

.window-titlebar {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.window-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.results-header, .results-grid, .additional-info {
    padding-left: clamp(1.5rem, 5vw, 4rem);
    padding-right: clamp(1.5rem, 5vw, 4rem);
}

.action-buttons {
    padding-left: 2rem;
    padding-right: 2rem;
}

.results-header { margin-top: 2rem; }
.action-buttons { margin-bottom: 2rem; }

.results-container-modal::-webkit-scrollbar { display: none; }

.result-card {
    padding: calc(var(--spacing-unit) * 1.618);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.result-card.highlighted {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(26, 30, 24, 0.9) 0%, rgba(148, 163, 75, 0.05) 100%);
    box-shadow: 0 0 40px rgba(148, 163, 75, 0.05);
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: rgba(148, 163, 75, 0.1) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(148, 163, 75, 0.2);
    box-shadow: 0 0 15px rgba(148, 163, 75, 0.2);
}

.result-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.detail-item span {
    color: var(--text-secondary);
}

.detail-item strong {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.detail-item.highlights {
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0.5rem;
}

.detail-item.highlights strong {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge.red {
    background: rgba(156, 74, 74, 0.1);
    color: var(--danger);
}

.badge.green {
    background: rgba(122, 140, 68, 0.1);
    color: var(--success);
}

.budget-options {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.budget-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.budget-box span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.budget-box h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.formula-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.5rem;
}

.info-block {
    margin-bottom: 1.5rem;
    padding: 2rem;
}

.info-block h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
}

.info-block.warning h4 {
    color: var(--warning);
}

.info-block.recommendations h4 {
    color: var(--success);
}

.info-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-block ul li {
    display: flex;
    gap: 0.75rem;
    font-size: 1rem;
}

.info-block ul li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
}

.penalty-text {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--danger);
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    padding: 2.5rem 0 3.5rem 0;
    margin-top: 0;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(13, 15, 12, 0.2) 10%, 
        rgba(13, 15, 12, 0.5) 25%, 
        rgba(13, 15, 12, 0.8) 45%, 
        rgba(13, 15, 12, 0.95) 70%, 
        #0d0f0c 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.action-btn-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(148, 163, 75, 0.05);
    border: 1px solid rgba(148, 163, 75, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    opacity: 0.8;
}

.action-btn-circle:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(148, 163, 75, 0.4);
    opacity: 1;
}

.action-btn-circle::after {
    content: attr(data-label);
    position: absolute;
    bottom: -25px;
    font-size: 0.7rem;
    white-space: nowrap;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.8;
}

/* Ad Sidebar */
.ad-marketplace {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ad-header h3 { 
    font-size: 0.85rem; 
    color: var(--text-secondary); 
    text-transform: uppercase; 
    letter-spacing: 2px;
}

.ad-label {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.ad-card {
    padding: calc(var(--spacing-unit) * 1.618);
    margin-bottom: 2rem;
    background: rgba(26, 30, 24, 0.4);
    border: 1px solid rgba(148, 163, 75, 0.1);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(148, 163, 75, 0.05);
}

.ad-card:hover {
    background: rgba(26, 30, 24, 0.8);
    border-color: rgba(148, 163, 75, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(148, 163, 75, 0.15);
    transform: translateY(-5px);
}

.ad-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: #000;
    padding: 0.25rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-bottom-left-radius: 12px;
}

.ad-card h4 {
    margin-bottom: 0.5rem;
}

.ad-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.ad-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ad-placeholder {
    border: 1px dashed rgba(148, 163, 75, 0.2);
    text-align: center;
    padding: calc(var(--spacing-unit) * 2.618) 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.app-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gradient-text {
        font-size: 2.5rem;
    }

    .step-container {
        padding: 1.5rem;
    }

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


/* Print Styles for PDF Export */
@media print {
    body * { visibility: hidden; }
    #results-screen, #results-screen * { visibility: visible; }
    #results-screen { position: fixed; left: 0; top: 0; width: 100%; height: 100%; background: #fff !important; color: #000 !important; z-index: 9999; display: block !important; }
    .results-container-modal { box-shadow: none; max-height: none; overflow: visible; background: #fff !important; width: 100% !important; max-width: 100% !important; border-radius: 0; }
    .action-buttons, .window-titlebar { display: none !important; }
    .result-card { border: 1px solid #ddd !important; background: #fff !important; color: #000 !important; box-shadow: none !important; break-inside: avoid; }
    .gradient-text { -webkit-text-fill-color: #000 !important; color: #000 !important; text-shadow: none !important; background: none !important; }
    .detail-item strong, .detail-item span { color: #000 !important; }
    .badge { border: 1px solid #000 !important; color: #000 !important; background: none !important; }
}