:root {
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --panel: #ffffff;
    --panel-hover: #f1f5f9;
    --border: #e2e8f0;
    --blue: #6366f1;
    --blue-dark: #4f46e5;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --text: #0f172a;
    --muted: #475569;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px -15px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 8px 30px rgba(99, 102, 241, 0.15);
}

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

body {
    background: var(--bg-secondary);
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
                      radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

body::before, body::after {
    display: none;
}

header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--blue) 20%,
            var(--purple) 50%,
            var(--pink) 80%,
            transparent);
    opacity: 0.5;
}

header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 200%;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

header h1 span {
    display: block;
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 2px;
    margin-top: 2px;
    -webkit-text-fill-color: var(--muted);
}

.header-badge {
    font-size: 0.75rem;
    color: var(--muted);
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.logout-btn {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none;
    animation: none;
}

.logout-btn:hover {
    background: var(--danger);
    color: white;
    transform: none;
    box-shadow: none;
}

.logout-btn::before {
    display: none;
}

.hero {
    max-width: 1200px;
    margin: 32px auto 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 40px;
    box-shadow: var(--shadow);
}

.hero h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero ul {
    list-style: none;
    margin-top: 20px;
}

.hero li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
    font-weight: 500;
}

.hero li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
    font-size: 1.1rem;
}

.hero-visual {
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.03));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--blue);
    text-align: center;
    padding: 20px;
}

.controls {
    padding: 16px;
    display: flex;
    justify-content: center;
}

.controls-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow);
}

select {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
}

button {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

button:active {
    transform: translateY(0);
}

button::before {
    display: none;
}

.loader {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
}

.loader-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
}

.spinner-rings {
    position: relative;
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 3px solid transparent;
    transform-origin: center;
}

.ring-1 {
    width: 100px;
    height: 100px;
    margin: -50px 0 0 -50px;
    border-top-color: var(--blue);
    border-right-color: var(--blue);
    animation: spin-ring-1 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.ring-2 {
    width: 70px;
    height: 70px;
    margin: -35px 0 0 -35px;
    border-bottom-color: var(--purple);
    border-left-color: var(--purple);
    animation: spin-ring-2 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
}

.ring-3 {
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-top-color: var(--pink);
    border-right-color: var(--pink);
    animation: spin-ring-3 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spin-ring-1 {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes spin-ring-2 {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(-180deg) scale(0.9);
    }

    100% {
        transform: rotate(-360deg) scale(1);
    }
}

@keyframes spin-ring-3 {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.loader-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loader-status {
    font-size: 1rem;
    color: var(--muted);
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Old spinner - remove */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.card::before {
    display: none;
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 8px 0;
}

.badge {
    font-size: 0.7rem;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.bull {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.neutral {
    background: rgba(71, 85, 105, 0.1);
    color: var(--muted);
    border: 1px solid rgba(71, 85, 105, 0.2);
}

.bear {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.high-conviction {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.2));
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-weight: 800;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.1);
}

.price-range {
    margin: 20px 0;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.range-labels .sl {
    color: var(--danger);
}

.range-labels .entry {
    color: var(--warning);
}

.range-labels .target {
    color: var(--success);
}

.range-bar {
    height: 8px;
    background: linear-gradient(to right, var(--danger) 0%, var(--danger) 33%, var(--warning) 33%, var(--warning) 50%, var(--success) 50%, var(--success) 100%);
    border-radius: 8px;
    position: relative;
    margin-bottom: 6px;
}

.current-price-marker {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 16px;
    background: var(--text);
    border-radius: 2px;
}

.current-price-marker::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -3px;
    width: 9px;
    height: 9px;
    background: var(--text);
    border: 2px solid white;
    border-radius: 50%;
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-top: 8px;
}

.range-values div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.indicators {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.indicator-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.indicator-badge.rsi {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.indicator-badge.macd-buy {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.indicator-badge.macd-sell {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.indicator-badge.volume {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.score-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.8rem;
}

.score-bar {
    width: 60px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--warning), var(--success));
    border-radius: 3px;
}

.rr-display {
    font-weight: 700;
    color: var(--success);
    font-size: 0.8rem;
}

/* Risk Metrics Section */
.risk-metrics {
    margin: 16px 0;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
    border-left: 4px solid var(--purple);
}

.risk-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.risk-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.risk-row:first-child {
    padding-top: 0;
}

.risk-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.risk-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.risk-value.danger {
    color: var(--danger);
}

.risk-value.success {
    color: var(--success);
}

/* Win Rate Display */
.win-rate-display {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--purple);
    background: rgba(139, 92, 246, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: #fff;
    width: 96%;
    max-width: 1000px;
    border-radius: 20px;
    padding: 32px;
    max-height: 92vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.close-btn {
    background: var(--bg);
    color: var(--text);
    padding: 8px 16px;
    font-size: 0.85rem;
    box-shadow: none;
}

.modal-section {
    margin: 24px 0;
}

.modal-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--muted);
}

.fundamentals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.fund-item {
    background: var(--bg);
    padding: 16px;
    border-radius: 12px;
}

.fund-item label {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}

.fund-item value {
    font-size: 1.1rem;
    font-weight: 700;
}

.reasons-list {
    list-style: none;
    padding: 0;
}

.reasons-list li {
    padding: 12px 16px;
    background: var(--bg);
    margin-bottom: 8px;
    border-radius: 10px;
    font-weight: 500;
    border-left: 3px solid var(--blue);
}

iframe {
    border: none;
    border-radius: 12px;
}

/* ==================== AI ANALYSIS STYLING ==================== */
.ai-analysis-section {
    border-top: 2px solid var(--border);
    padding-top: 24px;
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ai-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    padding: 12px 24px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.ai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ai-loader {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: var(--bg);
    border-radius: 12px;
    justify-content: center;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.analysis-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.analysis-card h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.analysis-text {
    color: var(--text);
    line-height: 1.7;
    font-size: 0.95rem;
}

.context-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.context-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.context-item label {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
}

.badge-mood,
.badge-volatility,
.badge-regime {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--blue);
    color: white;
    width: fit-content;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 12px;
}

.scenario-card {
    background: var(--panel);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.scenario-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.scenario-a {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
}

.scenario-b {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02));
}

.scenario-desc {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.scenario-conditions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.scenario-conditions strong {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

.scenario-conditions p {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.5;
}

.probability-shift {
    background: var(--bg);
    border-left: 4px solid var(--warning);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.probability-shift strong {
    font-size: 0.85rem;
    color: var(--text);
    display: block;
    margin-bottom: 6px;
}

.probability-shift p {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
}

.alignment-status {
    margin-bottom: 12px;
}

.badge-structure {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-structure.respected {
    background: #d1fae5;
    color: #065f46;
}

.badge-structure.violated {
    background: #fee2e2;
    color: #991b1b;
}

.invalidation-box {
    margin-top: 12px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.05);
    border-left: 4px solid var(--danger);
    border-radius: 8px;
}

.invalidation-box strong {
    font-size: 0.8rem;
    color: var(--danger);
    display: block;
    margin-bottom: 6px;
}

.invalidation-box p {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.5;
}

.risk-card {
    border-left: 4px solid var(--warning);
}

.risk-list {
    margin-bottom: 16px;
}

.risk-list strong {
    font-size: 0.85rem;
    color: var(--text);
    display: block;
    margin-bottom: 8px;
}

.risk-list ul {
    list-style: none;
    padding: 0;
}

.risk-list li {
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.05);
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text);
    border-left: 3px solid var(--warning);
}

.failure-conditions strong {
    font-size: 0.85rem;
    color: var(--text);
    display: block;
    margin-bottom: 6px;
}

.failure-conditions p {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.6;
}

.regime-tag {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
    margin-bottom: 16px;
}

.regime-tag strong {
    font-size: 0.85rem;
    color: var(--muted);
}

.ai-disclaimer {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 8px;
    border-left: 4px solid var(--warning);
}

.ai-disclaimer small {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.ai-error {
    padding: 16px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    color: var(--danger);
}

.ai-error strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.ai-error p {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.6;
}

.ai-error a {
    color: var(--primary);
    text-decoration: underline;
}

/* ==================== NEWS SECTION STYLING ==================== */
.news-section {
    border-top: 2px solid var(--border);
    padding-top: 24px;
}

.news-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.news-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 12px 24px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.news-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.news-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.news-loader {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: var(--bg);
    border-radius: 12px;
    justify-content: center;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.news-container {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: start;
    transition: all 0.2s ease;
}

.news-item:hover {
    border-left-color: var(--blue-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.news-number {
    background: var(--blue);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
}

.news-title {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
    margin-bottom: 6px;
}

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

.news-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--muted);
}

.news-publisher {
    font-weight: 600;
}

.news-time {
    opacity: 0.8;
}

.news-error {
    padding: 16px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    color: var(--danger);
}

.news-error strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.news-error p {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 28px;
    }

    .controls-box {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

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

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

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

/* AI Matrix Styles */
.ai-matrix-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.ai-row {
    background: var(--panel);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--bg-secondary);
}

.ai-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.ai-progress-bg {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.ai-progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    background-size: 20px 20px;
    background-image: linear-gradient(45deg,
            rgba(255, 255, 255, 0.15) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0.15) 75%,
            transparent 75%,
            transparent);
    animation: stripe-animate 1s linear infinite;
}

@keyframes stripe-animate {
    0% {
        background-position: 1rem 0;
    }

    100% {
        background-position: 0 0;
    }
}

.ai-reasons {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--muted);
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #cbd5e1;
}

.ai-reasons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-reasons li {
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Spinner small for modal */
.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

/* ═══════════════════════════════════════════════════
   SEO CONTENT SECTION
═══════════════════════════════════════════════════ */
.seo-content {
    max-width: 1200px;
    margin: 48px auto;
    padding: 0 20px;
}

.seo-content-inner {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 48px;
    box-shadow: var(--shadow);
}

.seo-content-inner h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.seo-content-inner h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 28px 0 10px;
    color: var(--text);
}

.seo-content-inner p {
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 12px;
}

.seo-content-inner strong {
    color: var(--text);
}

.seo-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 28px 0;
}

.seo-features-grid article {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.seo-features-grid article:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-glow);
}

.seo-features-grid article h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px 0;
}

.seo-features-grid article p {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
}

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive SEO section */
@media (max-width: 768px) {
    .seo-content-inner {
        padding: 28px 20px;
    }

    .seo-content-inner h2 {
        font-size: 1.4rem;
    }

    .seo-features-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════
   SITE FOOTER — Professional Legal Disclaimer Footer
═══════════════════════════════════════════════════ */
.site-footer {
    background: var(--panel);
    border-top: 1px solid var(--border);
    margin-top: 64px;
    padding: 48px 32px 24px;
}

/* ── Brand Strip ── */
.footer-brand {
    text-align: center;
    margin-bottom: 40px;
}

.footer-logo {
    display: inline-block;
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.footer-brand>p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 6px;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.footer-tags span {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    font-weight: 600;
}

/* ── Disclaimer Cards Grid ── */
.footer-disclaimer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-disclaimer-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 20px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.footer-disclaimer-card:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
}

.footer-disclaimer-card .fdc-icon {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 10px;
}

.footer-disclaimer-card h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.footer-disclaimer-card p {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ── SEBI Note ── */
.footer-sebi {
    max-width: 900px;
    margin: 0 auto 28px;
    padding: 16px 20px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    font-size: 0.82rem;
    color: #78350f;
    line-height: 1.6;
    text-align: center;
}

.footer-sebi a {
    color: #92400e;
    font-weight: 600;
    text-decoration: underline;
}

.footer-sebi a:hover {
    color: #78350f;
}

/* ── Bottom Bar ── */
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .site-footer {
        padding: 36px 16px 20px;
    }

    .footer-disclaimer-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .footer-tags {
        gap: 6px;
    }
}

/* ══════════════════════════════════════════════════════════════════
   LOGIN MODAL — Compact Glassmorphic Bottom Sheet (mobile) / 
   Frosted Glass Card (desktop)
   ══════════════════════════════════════════════════════════════════ */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: lmFadeIn 0.25s ease;
}

@keyframes lmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lmSlideUp {
    from { transform: translateY(60px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.login-modal {
    /* ── Glassmorphism ── */
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.45);

    width: 100%;
    max-width: 420px;
    border-radius: 24px 24px 0 0;
    padding: 20px 22px 24px;
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    animation: lmSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow:
        0 -12px 40px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Mobile bottom-sheet handle */
.login-modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(148, 163, 184, 0.4);
    border-radius: 4px;
    margin: 0 auto 14px;
}

/* Close Button */
.login-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(241, 245, 249, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: none;
    animation: none;
}

.login-modal-close::before { display: none; }

.login-modal-close:hover {
    background: rgba(226, 232, 240, 0.9);
    color: #1e293b;
    transform: none;
    box-shadow: none;
}

/* Brand — compact */
.login-modal-brand {
    text-align: center;
    margin-bottom: 2px;
}

.login-modal-logo {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Poppins', 'Inter', sans-serif;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.login-modal-tagline {
    font-size: 0.6rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 2.5px;
    margin-top: 0;
}

/* Title — compact */
.login-modal-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 6px 0 2px;
    font-family: 'Poppins', 'Inter', sans-serif;
}

.login-modal-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

/* Trust Badges — compact */
.login-modal-trust {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.login-modal-trust span {
    font-size: 0.65rem;
    font-weight: 600;
    color: #475569;
    background: rgba(241, 245, 249, 0.7);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

/* Segmented Auth Tabs — compact */
.login-modal-tabs {
    display: flex;
    background: rgba(241, 245, 249, 0.6);
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 12px;
    position: relative;
}

.lm-tab-slider {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.login-modal-tabs[data-mode="signup"] .lm-tab-slider {
    transform: translateX(100%);
}

.lm-tab {
    flex: 1;
    text-align: center;
    padding: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

.lm-tab.active {
    color: #1e293b;
}

/* Form — compact */
.login-modal-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.lm-input-group {
    text-align: left;
}

.lm-input-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.lm-input-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid rgba(226, 232, 240, 0.7);
    border-radius: 10px;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    background: rgba(248, 250, 252, 0.6);
    backdrop-filter: blur(4px);
    transition: all 0.25s ease;
    outline: none;
    box-sizing: border-box;
}

.lm-input-group input:focus {
    border-color: #8b5cf6;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.lm-input-group input::placeholder {
    color: #94a3b8;
}

/* Error */
.lm-error {
    display: none;
    padding: 8px 12px;
    background: rgba(254, 242, 242, 0.9);
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #991b1b;
    text-align: left;
}

/* Submit */
.lm-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    background-size: 200% 200% !important;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    font-family: 'Inter', sans-serif;
    animation: none !important;
}

.lm-submit-btn::before { display: none; }

.lm-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.lm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Guest / Explore First */
.lm-guest-btn {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1.5px solid rgba(226, 232, 240, 0.6);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.4);
    color: #64748b;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 10px;
    text-align: center;
    box-shadow: none;
    animation: none;
}

.lm-guest-btn::before { display: none; }

.lm-guest-btn:hover {
    background: rgba(248, 250, 252, 0.8);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.4);
    transform: none;
    box-shadow: none;
}

/* Edu Note — compact */
.lm-edu-note {
    text-align: center;
    font-size: 0.65rem;
    color: #94a3b8;
    line-height: 1.4;
}

.lm-edu-note strong {
    color: #64748b;
}

/* ── Desktop: centered frosted card ── */
@media (min-width: 640px) {
    .login-modal-overlay {
        align-items: center;
    }

    .login-modal {
        border-radius: 24px;
        padding: 32px 32px 28px;
        max-height: 88vh;
        box-shadow:
            0 24px 48px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }

    .login-modal::before { display: none; }

    .login-modal-logo { font-size: 2rem; }
    .login-modal-title { font-size: 1.4rem; }
    .login-modal-subtitle { font-size: 0.85rem; }
    .lm-input-group input { padding: 13px 16px; }
    .lm-submit-btn { padding: 14px; font-size: 0.95rem; }
}

/* ══════════════════════════════════════════════════════════════════
   GUEST MODE — Blurred/locked cards + unlock prompt
   ══════════════════════════════════════════════════════════════════ */
.card-locked {
    position: relative;
    pointer-events: auto;
    cursor: pointer;
}

.card-locked > *:not(.card-lock-overlay) {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

.card-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    cursor: pointer;
}

.card-lock-overlay .lock-icon {
    font-size: 2rem;
}

.card-lock-overlay .lock-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
    line-height: 1.4;
    padding: 0 20px;
}

.card-lock-overlay .lock-cta {
    font-size: 0.78rem;
    font-weight: 700;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    padding: 6px 16px;
    border-radius: 20px;
    margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════════
   GUEST BANNER — sticky bar at bottom
   ══════════════════════════════════════════════════════════════════ */
.guest-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #e2e8f0;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 1500;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.guest-banner button {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    animation: none;
}

.guest-banner button::before { display: none; }

.guest-banner button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

@media (max-width: 480px) {
    .guest-banner {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
        font-size: 0.8rem;
    }

    .guest-banner button {
        width: 100%;
    }
}