:root {
    --bg-dark: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);

    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.4);
    --secondary: #818cf8;

    --success: #34d399;
    --warning: #fbbf24;
    --danger: #ef4444;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

body {
    background: var(--bg-dark);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

/* Background effects */
body::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    filter: blur(80px);
    z-index: -1;
}

body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.3) 0%, transparent 60%);
    filter: blur(80px);
    z-index: -1;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Header & Nav */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    padding: 1.2rem 2rem;
    border-radius: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon {
    font-size: 2rem;
}

h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 16px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    color: var(--text-main);
}

.nav-btn.active {
    background: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--card-border);
}

/* Content Area */
.content-wrapper {
    position: relative;
    width: 100%;
}

.tool-section {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tool-section.active {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-header {
    text-align: center;
    margin-bottom: 1rem;
}

.tool-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tool-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glass Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Yield Grid */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.input-group label {
    font-weight: 500;
    color: var(--text-muted);
}

input[type="number"],
input[type="text"] {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

input[type="number"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
}

.slider-value {
    align-self: flex-end;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-heading);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

/* Results Panel */
.results-panel h3 {
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.result-display {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--card-border);
}

.result-value.highlight {
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--success);
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.3);
}

.result-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.metric span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.metric strong {
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Compliance Checker */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    width: 100%;
}

.search-container input {
    flex: 1;
}

.search-btn {
    width: auto;
    padding: 0 2rem;
}

.compliance-results {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 0.4s ease forwards;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.asset-icon {
    font-size: 2.5rem;
}

.risk-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.risk-low {
    background: rgba(52, 211, 153, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.risk-med {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.risk-high {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
    border-radius: 12px;
}

/* Ad/Affiliate Slots */
.ad-slot {
    margin-top: 2rem;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.ad-slot::before {
    content: 'Sponsored';
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.affiliate-content,
.legal-ad-content {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%);
    border: 1px dashed var(--primary);
    padding: 2rem;
    text-align: center;
    border-radius: 16px;
}

.legal-ad-content {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
    border-color: var(--danger);
}

.ad-slot h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.ad-slot p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.cta-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary);
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.2s;
}

.cta-btn:hover {
    background: white;
}

.cta-btn.secondary {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.cta-btn.secondary:hover {
    background: var(--danger);
    color: white;
}


.hidden {
    display: none !important;
}

/* Reports Section */
.report-card {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.report-content h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.report-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.report-content p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.report-content h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    color: var(--secondary);
}

.structured-list {
    list-style-type: none;
    margin-bottom: 1.5rem;
}

.structured-list li {
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.inline-cta {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px dashed var(--secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    text-align: center;
}

.inline-cta p {
    margin: 0;
}

/* Engagement Features */
.what-if-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.what-if-container>label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.badge {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
    color: var(--bg-dark);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Custom Toggle Switch */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.slider-toggle {
    position: relative;
    width: 46px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: .4s;
    border: 1px solid var(--card-border);
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: .4s;
}

.toggle input:checked+.slider-toggle {
    background-color: var(--primary);
    border-color: var(--primary);
}

.toggle input:checked+.slider-toggle:before {
    transform: translateX(22px);
    background-color: white;
}

.toggle-label {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.toggle input:checked~.toggle-label {
    color: var(--text-main);
}

/* Specific Ad Slots */
.lead-gen-slot .lead-gen-content {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px dashed var(--warning);
    padding: 2rem;
    text-align: center;
    border-radius: 16px;
}

.tax-slot .tax-ad-content {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px dashed #a855f7;
    padding: 2rem;
    text-align: center;
    border-radius: 16px;
}

.tax-slot strong {
    color: #c084fc;
}

.cta-btn.secondary[href="#speak-to-expert"] {
    border-color: var(--warning);
    color: var(--warning);
}

.cta-btn.secondary[href="#speak-to-expert"]:hover {
    background: var(--warning);
    color: var(--bg-dark);
}

/* Email Alerts */
.email-alert {
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.email-alert h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.email-alert p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.subscribe-group {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.subscribe-group input {
    flex: 1;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.small-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 8px;
    width: auto;
}

.success-msg {
    display: block;
    margin-top: 1rem;
    color: var(--success);
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

/* Footer Section */
.app-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.copyright {
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .glass-header {
        flex-direction: column;
        gap: 1rem;
    }

    .search-container {
        flex-direction: column;
    }
}