/* Reset & Base Styles */
:root {
    --bg-dark: #F1F5F9;
    --bg-card: #FFFFFF;
    --bg-input: #F8FAFC;
    --primary: #4F46E5;
    --primary-glow: rgba(79, 70, 229, 0.08);
    --secondary: #0284C7;
    --secondary-glow: rgba(2, 132, 199, 0.08);
    --accent: #E11D48;
    --text-main: #0F172A;
    --text-muted: #475569;
    --border-color: #E2E8F0;
    --success: #10B981;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.02), 0 4px 6px -4px rgba(0, 0, 0, 0.02), 0 0 0 1px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --bg-dark: #0B0F19;
    --bg-card: #151D30;
    --bg-input: #1D2942;
    --primary: #6366F1;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --secondary: #0EA5E9;
    --secondary-glow: rgba(14, 165, 233, 0.15);
    --accent: #F43F5E;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border-color: #24324F;
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Header Controls Grid */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    transform: rotate(15deg) scale(1.05);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    padding: 1.5rem 1.5rem 5rem 1.5rem; /* bottom padding for sticky mobile ad */
    overflow-x: hidden;
}

/* Header Styles */
.app-header {
    max-width: 1200px;
    margin: 0 auto 1.5rem auto;
    padding: 1rem 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Currency Switcher */
.currency-switcher {
    display: flex;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3px;
    border-radius: 10px;
}

.currency-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 7px;
    cursor: pointer;
    transition: var(--transition);
}

.currency-btn.active {
    background-color: var(--primary);
    color: var(--text-main);
    box-shadow: 0 4px 10px var(--primary-glow);
}

/* Primary Navigation Tabs */
.main-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}

.main-tab-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 1.1rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.main-tab-btn:hover {
    color: var(--text-main);
    border-color: #3b4f74;
    transform: translateY(-2px);
}

.main-tab-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(14, 165, 233, 0.05) 100%);
    border-color: var(--primary);
    color: var(--text-main);
    box-shadow: var(--card-shadow);
}

/* Ad Containers */
.ad-container {
    background-color: #0E1424;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    margin: 1.5rem auto;
    padding: 0.5rem;
    text-align: center;
    position: relative;
    max-width: 100%;
}

.ad-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    position: absolute;
    top: 4px;
    left: 8px;
    text-transform: uppercase;
}

.ad-placeholder {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-radius: 6px;
    background: repeating-linear-gradient(
        45deg,
        #121A2D,
        #121A2D 10px,
        #18233C 10px,
        #18233C 20px
    );
}

.ad-top {
    max-width: 728px;
}

.ad-mid {
    max-width: 100%;
    margin: 1.5rem 0;
}

.ad-sidebar {
    height: 600px;
    width: 300px;
    flex-shrink: 0;
}

.ad-sidebar .ad-placeholder {
    height: 100%;
}

/* Sticky Mobile Ad */
.ad-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    z-index: 1000;
    background-color: #0E1424;
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.4);
    padding: 0.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-placeholder-small {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 320px;
    color: var(--text-muted);
    font-size: 0.75rem;
    background-color: #121A2D;
    border-radius: 4px;
}

.ad-close-btn {
    position: absolute;
    top: -12px;
    right: 12px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Container Grid Layout */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1.15fr 1.25fr;
    gap: 2rem;
    align-items: start;
}

/* Cards Design (Glassmorphism & Shadows) */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2.25rem;
    box-shadow: var(--card-shadow);
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

/* Switch Tabs (SIP vs Lumpsum) */
.tab-container {
    display: flex;
    background-color: var(--bg-dark);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 9px;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background-color: var(--bg-card);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Label Badges */
.label-with-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.label-with-badge label {
    margin-bottom: 0 !important;
}

.badge-new {
    background-color: var(--secondary-glow);
    color: var(--secondary);
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

/* Input Fields & Groups */
.input-group {
    margin-bottom: 1.75rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.input-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 1rem;
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.currency-symbol, .unit-symbol {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-wrapper input[type="number"] {
    background: none;
    border: none;
    outline: none;
    color: var(--text-main);
    padding: 0.85rem 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    width: 100%;
    font-family: 'Outfit', sans-serif;
}

/* Range Sliders styling */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin-top: 1rem;
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: var(--border-color);
    border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 0 8px var(--primary);
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

/* Switch/Toggle (Inflation Button) */
.toggle-group {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.toggle-header label {
    margin-bottom: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    border-radius: 34px;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: var(--text-main);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.inflation-wrapper {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    padding: 0;
}

.inflation-wrapper.show {
    max-height: 200px;
    opacity: 1;
    border: 1px solid var(--border-color);
    padding: 0 1rem;
    margin-top: 0.5rem;
}

/* Hidden Inputs states */
.hidden-element {
    display: none !important;
}

/* Results Section */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.result-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 16px;
    padding: 1.75rem;
}

.primary-result {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.secondary-result {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, rgba(99, 102, 241, 0.02) 100%);
    border: 1px solid rgba(244, 63, 94, 0.25);
    transition: var(--transition);
}

.secondary-result.hidden {
    opacity: 0.3;
    pointer-events: none;
}

.result-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.result-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.primary-result .result-value {
    color: var(--text-main);
}

.secondary-result .result-value {
    color: var(--accent);
}

.result-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Chart Styles */
.chart-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chart-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

/* Yearly Breakdown Table Card (Boosts page length for high ad viewability) */
.table-card {
    margin-top: 2rem;
    padding: 1.5rem 2rem;
}

.table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.table-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
}

.collapse-icon {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}

.collapse-icon.collapsed {
    transform: rotate(-90deg);
}

.table-content-container {
    max-height: 1000px;
    opacity: 1;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
    margin-top: 1.5rem;
}

.table-content-container.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

th, td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-dark);
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
}

tr:nth-child(even) {
    background-color: rgba(29, 41, 66, 0.2);
}

tr:hover {
    background-color: rgba(99, 102, 241, 0.08);
}

/* Bottom Grid Layout (Sidebar Ad + Article Content) */
.bottom-layout-grid {
    max-width: 1200px;
    margin: 2.5rem auto;
    display: flex;
    gap: 2rem;
}

.article-section {
    flex: 1;
}

.article-section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.article-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--secondary);
}

.article-section p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Live Financial News Section */
.news-section {
    margin-top: 2rem;
    padding: 2.25rem;
}

.news-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.news-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.live-indicator {
    color: var(--accent);
    font-size: 1rem;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { opacity: 0.3; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 0.3; transform: scale(0.9); }
}

.news-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.news-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.2);
}

.news-source {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.news-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title:hover {
    color: var(--primary);
}

.news-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(36, 50, 79, 0.4);
    padding-top: 0.75rem;
    margin-top: auto;
    display: block;
}

.news-loading, .news-error {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 0;
    font-size: 0.95rem;
}

/* Onboarding Layperson Guide Card */
.onboarding-card {
    background: linear-gradient(135deg, rgba(26, 31, 60, 0.5) 0%, rgba(21, 29, 48, 0.8) 100%);
    border-color: rgba(99, 102, 241, 0.25);
    margin-bottom: 2rem;
    position: relative;
    padding: 2.25rem;
}

.onboarding-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.onboarding-close-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(244, 63, 148, 0.2);
}

.onboarding-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.onboarding-intro {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
    max-width: 90%;
}

.onboarding-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.onboarding-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-num {
    background-color: var(--primary-glow);
    color: var(--primary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    flex-shrink: 0;
}

.step-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-text strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 0.25rem;
}

/* Tax Regime Warning Callouts */
.tax-note-card {
    background-color: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin: 1.25rem 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.tax-note-card strong {
    color: #D97706; /* Amber-600 */
}

body.dark-mode .tax-note-card strong {
    color: #F59E0B; /* Amber-500 */
}

/* Custom Premium Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
}

/* Tooltip Bubble */
[data-tooltip]::before {
    content: attr(data-tooltip);
    background-color: #0F172A;
    color: #F8FAFC;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: max-content;
    max-width: 220px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

/* Tooltip Arrow */
[data-tooltip]::after {
    content: '';
    border: 6px solid transparent;
    border-top-color: #0F172A;
    margin-bottom: -6px;
}

/* Hover & Focus state triggers */
[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Charts Grid Row */
.charts-row-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 2rem;
    align-items: center;
}

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

/* Referral Section Style */
.referral-section {
    margin: 2.5rem 0;
}

.referral-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.referral-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.referral-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    background-color: var(--bg-card);
    transition: var(--transition);
}

.referral-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.referral-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.referral-action-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--primary);
    color: #ffffff;
    padding: 0.85rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 10px var(--primary-glow);
}

.referral-action-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--primary-glow);
}

.groww-btn {
    background-color: #00D09C; /* Groww Green */
    box-shadow: 0 4px 10px rgba(0, 208, 156, 0.15);
}

.groww-btn:hover {
    background-color: #00b386;
    box-shadow: 0 6px 15px rgba(0, 208, 156, 0.25);
}

/* SEO Footer Layout */
.app-footer-seo {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem;
    margin-top: 4rem;
}

.footer-seo-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.footer-links-grid a {
    color: var(--text-muted);
    font-size: 0.92rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    width: fit-content;
}

.footer-links-grid a:hover {
    color: var(--primary);
    text-decoration: underline;
    transform: translateX(3px);
}

.footer-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-row-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .referral-grid {
        grid-template-columns: 1fr;
    }
    
    .bottom-layout-grid {
        flex-direction: column-reverse;
        align-items: center;
    }

    .ad-sidebar {
        width: 100%;
        max-width: 336px;
        height: 280px;
    }

    .ad-sidebar .ad-placeholder {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .main-tabs {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .main-tab-btn {
        padding: 0.85rem;
        font-size: 0.95rem;
    }

    .results-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem 1rem 5rem 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .result-value {
        font-size: 1.75rem;
    }

    .logo-text {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}
