/* ==========================================================================
   1. CSS VARIABLES & THEMING
   ========================================================================== */
:root {
    /* Brand Colors */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);

    --success: #22c55e;
    --success-hover: #16a34a;
    --success-glow: rgba(34, 197, 94, 0.2);

    --warning-bg: #fbbf24;
    --warning-text: #451a03;

    /* Backgrounds (Light Mode) */
    --bg-main: #fcfcfd;
    --bg-alt: #f9fafb;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f8fafc;
    --bg-header: rgba(255, 255, 255, 0.8);
    --bg-dark-banner: #0f172a;

    /* Borders (Light Mode) */
    --border-light: #f1f5f9;
    --border-main: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-primary-faint: rgba(99, 102, 241, 0.2);

    /* Text Colors (Light Mode) */
    --text-strong: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --text-faint: #94a3b8;
    --text-inverse: #ffffff;

    /* Accents (Light Mode) */
    --emerald-bg: #ecfdf5;
    --emerald-text: #10b981;
    --badge-bg: #f1f5f9;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.2);
}

html.dark {
    /* Backgrounds (Dark Mode) */
    --bg-main: #0f172a;
    --bg-alt: #111827;
    --bg-surface: #1e293b;
    --bg-surface-hover: #334155;
    --bg-header: rgba(15, 23, 42, 0.8);
    --bg-dark-banner: #0f172a;

    /* Borders (Dark Mode) */
    --border-light: #334155;
    --border-main: #1e293b;
    --border-hover: #475569;
    --border-primary-faint: rgba(99, 102, 241, 0.3);

    /* Text Colors (Dark Mode) */
    --text-strong: #f8fafc;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-faint: #475569;

    /* Accents (Dark Mode) */
    --emerald-bg: rgba(6, 78, 59, 0.3);
    --badge-bg: #1e293b;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   2. BASE & LAYOUT
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-alt);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}
button, a { text-decoration: none; background: none; border: none; cursor: pointer; font-family: inherit; color: inherit; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; font-weight: 700; }
.text-faint { color: var(--text-faint) !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }

.page-container { max-width: 1280px; margin: 0 auto; padding: 32px 24px 96px 24px; width: 100%; }
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0px;
}
.bg-decoration { position: fixed; top: 0; right: 0; z-index: -10; opacity: 0.1; pointer-events: none; }
html.dark .bg-decoration { opacity: 0.05; }

/* Confetti Background (Page 5) */
.confetti-pattern {
    background-image:
            radial-gradient(circle at 10% 10%, var(--primary) 2px, transparent 0),
            radial-gradient(circle at 90% 20%, #fbbf24 3px, transparent 0),
            radial-gradient(circle at 50% 15%, #ec4899 2px, transparent 0),
            radial-gradient(circle at 20% 80%, var(--success) 3px, transparent 0),
            radial-gradient(circle at 80% 90%, var(--primary) 2px, transparent 0),
            radial-gradient(circle at 70% 40%, #fbbf24 2px, transparent 0);
    background-size: 400px 400px;
}

/* Checkout Page Specific Layout (Page 4) */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 1024px) { .checkout-layout { grid-template-columns: 7fr 5fr; } }

/* ==========================================================================
   3. HEADERS & NAVIGATION
   ========================================================================== */
.header { width: 100%; border-bottom: 1px solid var(--border-main); background-color: var(--bg-header); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-container { max-width: 1152px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo-group { display: flex; align-items: center; gap: 8px; }
.logo-icon { width: 32px; height: 32px; background-color: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; }
.logo-icon .material-icons-outlined { font-size: 14px; }
.logo-text { font-weight: 700; font-size: 1.125rem; color: var(--text-strong); }

.nav-steps { display: none; align-items: center; gap: 32px; font-size: 0.875rem; font-weight: 500; }
@media (min-width: 768px) { .nav-steps { display: flex; } }
.step { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.step-number { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-main); display: flex; align-items: center; justify-content: center; font-size: 10px; }
.step-active { color: var(--primary); font-weight: 600; }
.step-active .step-number { border-color: var(--primary); }

.theme-toggle { padding: 8px; border-radius: 50%; transition: background-color 0.2s ease; display: flex; align-items: center; justify-content: center; color: var(--text-strong); }
.theme-toggle:hover { background-color: var(--badge-bg); }
.icon-light { display: none; color: #facc15; }
.icon-dark { display: block; }
html.dark .icon-light { display: block; }
html.dark .icon-dark { display: none; }

.top-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 500; flex-wrap: wrap; }
.breadcrumb-link { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb-link:hover { color: var(--primary); }
.breadcrumb-active { color: var(--primary); font-weight: 700; }
.breadcrumb-text { color: var(--text-faint); opacity: 0.5; }
.breadcrumb-separator { color: var(--border-hover); font-size: 0.875rem; }

/* ==========================================================================
   4. TEXT, BANNERS & LOCATIONS
   ========================================================================== */
.hero-text { text-align: center; margin-bottom: 64px; }
.page-title { font-size: 2.25rem; font-weight: 800; color: var(--text-strong); letter-spacing: -0.025em; margin-bottom: 32px; }
.hero-text p { font-size: 1.125rem; color: var(--text-muted); max-width: 36rem; margin: 0 auto; }
.subtitle { color: var(--text-muted); font-size: 1.125rem; }
.section-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }

.location-badge { margin-bottom: 10px; display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px; background-color: var(--badge-bg); border-radius: 9999px; font-size: 0.875rem; color: var(--text-muted); }
.location-banner { display: flex; align-items: center; gap: 8px; margin-bottom: 48px; padding: 16px; background-color: var(--bg-surface); border: 1px solid var(--border-light); border-radius: 12px; box-shadow: var(--shadow-sm); font-size: 0.875rem; color: var(--text-muted); }
.location-icon { color: var(--primary); font-size: 1.25rem; }
.location-banner-text { font-weight: 500; color: var(--text-strong); flex-grow: 1; }
.location-label { color: var(--text-muted); }

/* ==========================================================================
   5. GRIDS & ALL CARDS (Products, Providers, Packages)
   ========================================================================== */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 24px; width: 100%; max-width: 56rem; }
.provider-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 64px; }
.package-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .product-grid, .provider-grid, .package-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .package-grid { grid-template-columns: repeat(4, 1fr); } }

.card-selected { border-color: var(--primary) !important; box-shadow: var(--shadow-glow) !important; }
.card-success-ring { box-shadow: 0 0 0 4px var(--success-glow); border-color: var(--success) !important; }
.check-badge { position: absolute; top: 16px; right: 16px; background-color: var(--primary); color: white; padding: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.check-badge .material-icons-outlined { font-size: 14px; }
.check-badge-large { position: absolute; top: 16px; right: 16px; color: var(--primary); }
.check-badge-large .material-icons-outlined { font-size: 1.875rem; }

.product-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 40px; background-color: var(--bg-surface); border: 2px solid var(--border-main); border-radius: 24px; transition: all 0.2s ease; color: var(--text-strong); }
.product-card:hover { transform: scale(1.02); border-color: var(--border-hover); }
.card-icon-wrapper { width: 80px; height: 80px; background-color: var(--badge-bg); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; transition: all 0.3s ease; }
.card-icon-wrapper .material-icons-outlined { font-size: 2.5rem; color: var(--text-faint); }
.product-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.product-card p { color: var(--text-muted); text-align: center; line-height: 1.5; }
.card-selected .card-icon-wrapper { background-color: var(--primary-glow); }
.card-selected .card-icon-wrapper .material-icons-outlined { color: var(--primary); }
.product-card:not(.card-selected):hover .card-icon-wrapper { background-color: var(--border-main); }

.provider-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; min-height: 280px; background-color: var(--bg-surface); border: 2px solid var(--border-main); border-radius: 24px; transition: all 0.2s ease; color: var(--text-strong); cursor: pointer; }
.provider-card:hover { transform: scale(1.02); border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.provider-logo-wrapper { height: 96px; width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.provider-logo { max-height: 100%; max-width: 240px; object-fit: contain; }
html.dark .provider-logo { filter: brightness(1.1); }
.provider-name { font-size: 1.125rem; font-weight: 600; }

.package-card { display: flex; flex-direction: column; background-color: var(--bg-surface); border: 2px solid var(--border-primary-faint); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-sm); position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.package-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); border-color: var(--primary); }
.card-highlight { border-color: var(--primary); box-shadow: var(--shadow-xl); box-shadow: 0 0 0 4px var(--primary-glow); }
.badge-popular { position: absolute; top: 40px; right: -32px; background-color: var(--warning-bg); color: var(--warning-text); font-weight: 700; font-size: 0.625rem; padding: 4px 32px; transform: rotate(45deg); box-shadow: var(--shadow-sm); z-index: 10; }
.package-brand-bar { background-color: var(--primary); color: var(--text-inverse); padding: 12px; text-align: center; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.package-card-content { display: flex; flex-direction: column; align-items: center; padding: 32px; flex-grow: 1; text-align: center; }
.package-logo { max-width: 100%; height: auto; }
html.dark .package-logo { filter: invert(1) brightness(2); }
.speed-block { margin-bottom: 24px; }
.speed-value { font-size: 1.5rem; font-weight: 700; color: var(--text-strong); }
.speed-label { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }
.price-block { margin-top: auto; padding-top: 24px; width: 100%; }
.price-value { font-size: 2.25rem; font-weight: 800; color: var(--text-strong); margin-bottom: 4px; }
.price-label { font-size: 0.75rem; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 24px; }

/* ==========================================================================
   6. CHECKOUT FORMS (Page 4)
   ========================================================================== */
.form-card { background-color: var(--bg-surface); padding: 32px; border-radius: 24px; border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
.form-group { display: flex; flex-direction: column; }
.form-group-full { grid-column: 1 / -1; display: flex; flex-direction: column; }
.form-label { font-size: 0.875rem; font-weight: 600; color: var(--text-strong); margin-bottom: 8px; }

.input-wrapper { position: relative; width: 100%; }
.form-input { width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border-main); background-color: var(--bg-surface); color: var(--text-main); font-family: inherit; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-input.pr-12 { padding-right: 48px; }
.input-icon-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); padding: 4px; }
.input-icon-btn:hover { color: var(--text-main); }
.form-hint { margin-top: 8px; font-size: 0.75rem; color: var(--text-faint); }

.checkbox-group { display: flex; align-items: flex-start; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border-light); margin-top: 24px; }
.checkbox-input { margin-top: 4px; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border-main); accent-color: var(--primary); cursor: pointer; }
.checkbox-label { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; cursor: pointer; }
.checkbox-label a { color: var(--primary); font-weight: 600; }
.checkbox-label a:hover { text-decoration: underline; }

/* ==========================================================================
   7. ORDER SUMMARY (Page 4)
   ========================================================================== */
.summary-wrapper { position: sticky; top: 32px; display: flex; flex-direction: column; gap: 24px; }
.summary-card { background-color: var(--bg-surface); border-radius: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); overflow: hidden; }
.summary-header { background-color: var(--bg-alt); padding: 24px 32px; border-bottom: 1px solid var(--border-light); }
.summary-header h2 { font-size: 1.25rem; font-weight: 700; color: var(--text-strong); }
.summary-body { padding: 32px; }

.summary-product { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 32px; border-bottom: 1px solid var(--border-light); margin-bottom: 32px; }
.summary-product-info { display: flex; gap: 16px; }
.summary-logo-box { width: 64px; height: 64px; background-color: var(--bg-alt); border-radius: 16px; display: flex; align-items: center; justify-content: center; padding: 8px; border: 1px solid var(--border-light); flex-shrink: 0; }
.summary-product-title { font-weight: 700; font-size: 1.125rem; color: var(--text-strong); margin-bottom: 4px; line-height: 1.2; }
.summary-product-desc { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }
.summary-product-specs { display: flex; gap: 16px; margin-top: 8px; color: var(--text-faint); font-size: 0.75rem; }
.summary-spec { display: flex; align-items: center; gap: 4px; }
.summary-product-price { text-align: right; }
.summary-price-value { font-size: 1.25rem; font-weight: 700; color: var(--text-strong); }
.summary-price-label { font-size: 0.625rem; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.1em; }

.summary-line-items { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.summary-line { display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; }
.summary-line-label { color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.summary-line-value { font-weight: 600; color: var(--text-strong); }

.tag-promo { background-color: var(--success-glow); color: var(--success); font-size: 0.625rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.text-strike { text-decoration: line-through; opacity: 0.5; margin-right: 8px; font-weight: 600; font-size: 0.75rem; color: var(--text-muted); }

.summary-totals { padding-top: 24px; border-top: 1px solid var(--border-light); }
.summary-total-due { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 4px; }
.summary-total-label { color: var(--text-muted); font-weight: 500; }
.summary-total-value { font-size: 1.875rem; font-weight: 800; color: var(--text-strong); line-height: 1; }
.summary-total-hint { font-size: 0.625rem; text-align: right; color: var(--text-faint); text-transform: uppercase; font-weight: 700; }
.summary-monthly { margin-top: 32px; display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; font-weight: 700; color: var(--text-strong); }
.summary-monthly-value { font-size: 1.25rem; color: var(--primary); }

.promo-box { padding: 16px; border: 2px dashed var(--border-main); border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-faint); transition: border-color 0.2s, color 0.2s; cursor: pointer; }
.promo-box:hover { border-color: var(--primary); color: var(--primary); }
.promo-box button { font-size: 0.875rem; font-weight: 700; }

/* ==========================================================================
   8. SUCCESS PAGE COMPONENTS (Page 5)
   ========================================================================== */
.success-header { margin-bottom: 48px; }
.success-icon-wrapper { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; background-color: var(--emerald-bg); border-radius: 50%; margin-bottom: 32px; }
.success-icon-wrapper .material-icons-outlined { font-size: 3rem; color: var(--emerald-text); }

.success-card { background-color: var(--bg-surface); border-radius: 32px; box-shadow: var(--shadow-xl); border: 1px solid var(--border-light); overflow: hidden; margin-bottom: 32px; }

/* Timeline UI */
.timeline-section { padding: 40px; border-bottom: 1px solid var(--border-light); background-color: rgba(0,0,0,0.02); }
html.dark .timeline-section { background-color: rgba(255,255,255,0.02); }
.timeline-container { display: flex; justify-content: space-between; max-width: 672px; margin: 0 auto; position: relative; }
.timeline-step { flex: 1; position: relative; }
.timeline-step::after { content: ''; position: absolute; top: 24px; left: 50%; width: 100%; height: 2px; background: var(--border-main); z-index: 0; }
.timeline-step:last-child::after { display: none; }

.timeline-content { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; }
.timeline-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; background-color: var(--bg-surface); border: 2px solid var(--border-main); color: var(--text-faint); }
.timeline-active { background-color: var(--primary); color: white; border: none; box-shadow: 0 0 0 8px var(--primary-glow); }
.timeline-title { font-size: 0.875rem; font-weight: 700; color: var(--text-faint); }
.timeline-text-active { color: var(--text-strong); }
.timeline-date { font-size: 0.625rem; color: var(--text-faint); margin-top: 4px; text-transform: uppercase; font-weight: 700; }

/* Details Grid */
.success-details-grid { padding: 40px; display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 768px) { .success-details-grid { grid-template-columns: 1fr 1fr; } }
.details-column { display: flex; flex-direction: column; }

.details-product-row { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.details-logo-box { width: 48px; height: 48px; flex-shrink: 0; }
.details-logo { width: 100%; height: auto; }
html.dark .details-logo { filter: invert(1); }
.details-product-title { font-size: 1.125rem; font-weight: 700; color: var(--text-strong); }
.details-product-desc { font-size: 0.875rem; color: var(--text-muted); }

.details-cost-breakdown { display: flex; flex-direction: column; gap: 12px; }
.cost-row { display: flex; justify-content: space-between; font-size: 0.875rem; }
.cost-label { color: var(--text-muted); }
.cost-value { font-weight: 700; color: var(--text-strong); }
.tag-promo-outline { color: var(--success); font-weight: 700; text-transform: uppercase; font-size: 0.625rem; border: 1px solid var(--success-glow); padding: 2px 8px; border-radius: 4px; }
.cost-total { padding-top: 12px; border-top: 1px solid var(--border-light); margin-top: 4px; align-items: center; }
.cost-total-value { font-size: 1.25rem; font-weight: 800; }

.address-box { background-color: var(--bg-alt); padding: 24px; border-radius: 16px; }
.address-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
.address-text { font-size: 0.875rem; line-height: 1.6; color: var(--text-main); }
.next-steps-list { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 0.875rem; font-weight: 500; color: var(--text-main); }
.next-steps-list li { display: flex; align-items: center; gap: 8px; }

/* Action Area */
.success-actions { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
@media (min-width: 768px) { .success-actions { flex-direction: row; } }

.support-links { margin-top: 64px; display: flex; align-items: center; justify-content: center; gap: 32px; color: var(--text-muted); }
.support-link { display: flex; align-items: center; gap: 8px; transition: color 0.2s; }
.support-link:hover { color: var(--primary); }
.support-link span:last-child { font-size: 0.875rem; font-weight: 500; }

/* ==========================================================================
   9. FEATURES & BANNERS (Pages 1, 2, 3, 4)
   ========================================================================== */
.footer { width: 100%; border-top: 1px solid var(--border-main); background-color: var(--bg-surface); padding: 32px 0; }
.footer-container { max-width: 1152px; margin: 0 auto; padding: 0 24px; }
.features-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; }
@media (min-width: 768px) { .features-list { gap: 64px; } }
.feature-item { display: flex; align-items: center; gap: 12px; }
.feature-icon { width: 40px; height: 40px; border-radius: 50%; background-color: var(--emerald-bg); color: var(--emerald-text); display: flex; align-items: center; justify-content: center; }
.feature-title { font-weight: 700; font-size: 0.875rem; color: var(--text-strong); }
.feature-desc { font-size: 0.75rem; color: var(--text-muted); }

.features-banner { background-color: var(--bg-surface); border: 1px solid var(--border-main); border-radius: 16px; padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 32px; }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-tag { display: flex; align-items: center; gap: 12px; }
.feature-tag-icon { background-color: var(--emerald-bg); color: var(--emerald-text); padding: 8px; border-radius: 50%; font-size: 1rem; }
.feature-tag-text { font-weight: 600; color: var(--text-strong); }

.trust-banner { margin-top: 32px; padding: 24px; background-color: var(--badge-bg); border-radius: 16px; display: flex; align-items: center; gap: 16px; }
.trust-icon { width: 48px; height: 48px; background-color: var(--bg-surface); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); box-shadow: var(--shadow-sm); flex-shrink: 0; }
.trust-title { font-weight: 700; color: var(--text-strong); margin-bottom: 4px; }
.trust-text { font-size: 0.875rem; color: var(--text-muted); }

.help-banner { margin-top: 80px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 40px; background-color: var(--bg-dark-banner); color: var(--text-inverse); border-radius: 32px; overflow: hidden; position: relative; }
@media (min-width: 768px) { .help-banner { flex-direction: row; } }
.help-content { position: relative; z-index: 10; max-width: 512px; }
.help-content h2 { font-size: 1.875rem; font-weight: 700; margin-bottom: 16px; }
.help-content p { color: var(--text-faint); font-size: 1.125rem; margin-bottom: 32px; }
.help-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.help-bg-icon { display: none; position: absolute; right: 0; bottom: 0; font-size: 240px; color: var(--text-inverse); opacity: 0.05; pointer-events: none; }
@media (min-width: 768px) { .help-bg-icon { display: block; } }

/* ==========================================================================
   10. BUTTONS
   ========================================================================== */
.action-container { margin-top: 48px; }
.action-row-end { display: flex; justify-content: flex-end; margin-top: 32px; }

.btn-primary { padding: 16px 48px; background-color: var(--primary); color: white; font-weight: 700; font-size: 1rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--shadow-lg); transition: all 0.2s ease; border: none; }
.btn-primary:hover { background-color: var(--primary-hover); box-shadow: var(--shadow-glow); }
.btn-primary:active { transform: scale(0.95); }
.btn-primary .material-icons-outlined { transition: transform 0.3s ease; }
.btn-primary:hover .material-icons-outlined { transform: translateX(4px); }

.btn-success { background-color: var(--success); border: none;}
.btn-success:hover { background-color: var(--success-hover); box-shadow: 0 0 15px var(--success-glow); }

.btn-text-primary { font-size: 0.75rem; font-weight: 600; color: var(--primary); margin-left: auto; border: none; }
.btn-text-primary:hover { text-decoration: underline; }

.btn-secondary-solid { display: flex; align-items: center; justify-content: center; gap: 8px; background-color: var(--bg-surface); color: var(--text-strong); padding: 12px 24px; border-radius: 9999px; font-weight: 700; transition: background-color 0.2s ease; border: none;}
.btn-secondary-solid:hover { background-color: var(--border-main); }
.btn-secondary-outline { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border-hover); color: var(--text-main); padding: 12px 24px; border-radius: 9999px; font-weight: 700; transition: background-color 0.2s ease, border-color 0.2s ease; }
.btn-secondary-outline:hover { background-color: var(--bg-surface-hover); border-color: var(--border-main); }
html.dark .btn-secondary-outline { color: var(--text-inverse); }
html.dark .btn-secondary-outline:hover { background-color: rgba(255, 255, 255, 0.1); }
.btn-full { width: 100%; border-radius: 16px; }

/* ==========================================================================
   11. LOADER & ANIMATIONS (loader.html)
   ========================================================================== */
.loader-page-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background-color: var(--bg-main);
}

/* Ripple Animation Wrapper */
.ripple-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 48px;
}

/* Central Glowing Icon Box */
.loader-icon-box {
    position: relative;
    z-index: 10;
    width: 80px;
    height: 80px;
    background-color: var(--bg-surface);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
}

.loader-icon {
    font-size: 2.5rem;
    color: var(--primary);
    animation: icon-pulse 2s infinite ease-in-out;
}

/* The Expanding Ripples */
.ripple {
    position: absolute;
    width: 80px;
    height: 80px;
    background-color: var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: ripple-effect 3s infinite cubic-bezier(0.1, 0.5, 0.3, 1);
}

.ripple-1 { animation-delay: 0s; }
.ripple-2 { animation-delay: 1s; }
.ripple-3 { animation-delay: 2s; }

/* Text Section */
.loader-text-section {
    text-align: center;
    margin-bottom: 40px;
}

.loader-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.loader-status {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 500;
    height: 28px; /* Fixed height so page doesn't jump */
    transition: opacity 0.3s ease;
}

/* Animated Progress Bar */
.loader-progress-container {
    width: 100%;
    max-width: 320px;
    height: 8px;
    background-color: var(--border-main);
    border-radius: 9999px;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary);
    border-radius: 9999px;
    box-shadow: 0 0 10px var(--primary-glow);
    /* Simulates a 6-second loading sequence */
    animation: progress-fill 6s ease-in-out forwards;
}

/* ==========================================================================
   KEYFRAMES
   ========================================================================== */
@keyframes ripple-effect {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes progress-fill {
    0% { width: 0%; }
    20% { width: 15%; }
    40% { width: 45%; }
    60% { width: 60%; }
    80% { width: 85%; }
    100% { width: 100%; }
}