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

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-card-hover: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    --accent-green: #4ade80;
    --accent-orange: #fb923c;
    --accent-cyan: #22d3ee;
    --accent-yellow: #facc15;
    --accent-purple: #a78bfa;
    --gradient-main: linear-gradient(135deg, #0F0C29, #302B63, #24243E);
    --gradient-button: linear-gradient(135deg, #667eea, #764ba2);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== LANGUAGE PICKER ===== */
.language-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 0 auto 24px auto;
    max-width: 500px;
}

.lang-btn {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.lang-btn.active {
    background: var(--gradient-button);
    border-color: transparent;
    color: white;
}

.lang-btn .flag {
    font-size: 1rem;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gradient-main);
    position: relative;
    padding: 40px 20px;
    text-align: center;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-emoji {
    font-size: 72px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
    text-align: center;
    width: 100%;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, #a78bfa, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    color: var(--text-secondary);
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 500px;
}

/* Salary Card */
.salary-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 460px;
}

/* Currency Selector */
.currency-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    justify-content: center;
}

.currency-btn {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.currency-btn.active {
    background: var(--gradient-button);
    border-color: transparent;
    color: white;
}

.salary-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 24px;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.25s;
}

.toggle-btn.active {
    background: var(--gradient-button);
    color: white;
}

.salary-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s;
}

.salary-input-wrap:focus-within {
    border-color: rgba(102, 126, 234, 0.5);
}

.currency-sign {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-secondary);
}

#salaryInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    width: 100%;
}

#salaryInput::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.salary-summary {
    margin-top: 16px;
    text-align: center;
    min-height: 48px;
}

.salary-summary .annual {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 1rem;
}

.salary-summary .monthly {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.scroll-hint {
    position: relative;
    bottom: auto;
    margin-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.5s;
}

.scroll-hint.visible {
    opacity: 1;
}

.scroll-arrow {
    margin-top: 4px;
    font-size: 1.2rem;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ===== BILLIONAIRES SECTION ===== */
.billionaires-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.billionaires-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-sub {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

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

/* Billionaire Card */
.b-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 12px;
}

.b-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.b-rank {
    font-size: 0.85rem;
    font-weight: 800;
    min-width: 28px;
    font-family: 'JetBrains Mono', monospace;
}

.b-rank.gold { color: #facc15; }
.b-rank.silver { color: #c0c0c0; }
.b-rank.bronze { color: #cd7f32; }
.b-rank.normal { color: var(--text-muted); }

.b-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
    color: white;
}

.b-info {
    min-width: 0;
    overflow: hidden;
}

.b-name {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.b-company {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.b-worth {
    font-size: 0.8rem;
    color: var(--accent-green);
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
}

.b-right {
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.b-years {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-orange);
    font-family: 'JetBrains Mono', monospace;
}

.b-years-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.b-chevron {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

#assetModalOverlay {
    z-index: 1100;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px 12px 0 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-content {
    padding: 32px;
}

/* Modal Profile */
.modal-profile {
    text-align: center;
    margin-bottom: 28px;
}

.modal-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.modal-name {
    font-size: 1.6rem;
    font-weight: 800;
}

.modal-company {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.modal-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 14px;
    flex-wrap: wrap;
}

.stat-pill {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-pill.green { background: rgba(74, 222, 128, 0.12); color: var(--accent-green); }
.stat-pill.blue { background: rgba(96, 165, 250, 0.12); color: #60a5fa; }

/* Live Counter */
.live-counter {
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.15);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.live-counter-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.live-counter-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-green);
}

.live-counter-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.live-counter-speed {
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-yellow);
}

/* Earnings Grid */
.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 14px;
}

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

.earning-cell {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
}

.earning-cell .icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.earning-cell .amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

.earning-cell .period {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Earnings Breakdown / Sources */
.earnings-sources {
    margin-bottom: 24px;
}

.earnings-source-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.earnings-source-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.earnings-source-info {
    flex: 1;
    min-width: 0;
}

.earnings-source-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.earnings-source-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-green);
}

.earnings-source-bar-wrap {
    flex-shrink: 0;
    width: 80px;
    text-align: right;
}

.earnings-source-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 4px;
}

.earnings-source-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.earnings-source-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transition: width 0.6s ease;
}

/* Comparison bar */
.comparison-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

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

.comparison-header span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.comparison-header strong {
    color: var(--accent-orange);
    font-family: 'JetBrains Mono', monospace;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-orange), #ef4444);
    transition: width 0.6s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Assets */
.assets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.asset-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.asset-card:hover {
    background: var(--bg-card-hover);
}

.asset-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.asset-emoji {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.asset-info {
    flex: 1;
}

.asset-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.asset-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.asset-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.asset-time {
    margin-top: 8px;
    padding-left: 36px;
    font-size: 0.8rem;
    color: var(--accent-orange);
}

.asset-time::before {
    content: "\23F1  ";
}

.asset-card-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 8px;
    flex-shrink: 0;
    align-self: center;
}

/* ===== ASSET DETAIL VIEW ===== */
.asset-detail-emoji {
    text-align: center;
    font-size: 4rem;
    margin-bottom: 12px;
}

.asset-detail-name {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.asset-detail-owner {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.asset-detail-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.asset-detail-value-section {
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.15);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
}

.asset-detail-value-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.asset-detail-value-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* Specs grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.spec-cell {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.spec-cell .spec-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.spec-cell .spec-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-cell .spec-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

/* Story section */
.asset-story-section {
    background: rgba(167, 139, 250, 0.06);
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.asset-story-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

/* Afford section */
.afford-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.afford-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-orange);
    margin: 8px 0;
}

.afford-details {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Back button in asset detail */
.asset-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    margin-bottom: 20px;
}

.asset-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Fun fact */
.fun-fact {
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.15);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.fun-fact-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.fun-fact-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 600px) {
    .billionaire-grid {
        grid-template-columns: 1fr;
    }

    #salaryInput {
        font-size: 1.6rem;
    }

    .currency-sign {
        font-size: 1.6rem;
    }

    .live-counter-value {
        font-size: 1.6rem;
    }

    .modal-content {
        padding: 20px;
    }

    .earnings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .asset-detail-value-amount {
        font-size: 1.5rem;
    }

    .language-picker {
        max-width: 100%;
    }
}

/* Scrollbar */
.modal::-webkit-scrollbar {
    width: 6px;
}

.modal::-webkit-scrollbar-track {
    background: transparent;
}

.modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* ===== INCOME PERCENTILE BADGE ===== */
.income-percentile {
    margin-top: 12px;
    text-align: center;
    min-height: 0;
}

.percentile-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(74,222,128,0.15), rgba(34,211,238,0.15));
    border: 1px solid rgba(74,222,128,0.25);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-green);
    animation: fadeInUp 0.3s ease;
}

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

/* ===== DEPRESSING FACT CARD ===== */
.depressing-fact-card {
    margin-top: 20px;
    margin-bottom: 8px;
    max-width: 460px;
    width: 100%;
    min-height: 0;
}

.depressing-fact-card:empty {
    display: none;
}

.depressing-fact-inner {
    background: rgba(251,146,60,0.08);
    border: 1px solid rgba(251,146,60,0.2);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    transition: background 0.2s;
}

.depressing-fact-inner:hover {
    background: rgba(251,146,60,0.12);
}

.depressing-fact-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.depressing-fact-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
}

/* ===== FEATURE TOOLBAR ===== */
.feature-toolbar {
    background: var(--bg-secondary);
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.feature-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.feature-btn {
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.feature-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
    color: var(--text-primary);
}

.feature-btn .feat-icon {
    font-size: 1.1rem;
}

/* ===== FEATURE MODAL ===== */
.feature-modal-overlay {
    z-index: 1200;
}

.feature-modal {
    max-width: 720px;
}

/* ===== DEBT CALCULATOR ===== */
.debt-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.debt-preset-btn {
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.debt-preset-btn:hover,
.debt-preset-btn.active {
    background: var(--gradient-button);
    border-color: transparent;
    color: white;
}

.debt-custom-input {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

.debt-custom-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    outline: none;
}

.debt-custom-input input:focus {
    border-color: rgba(102,126,234,0.5);
}

.debt-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.debt-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.debt-entry-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.debt-entry-info {
    flex: 1;
    min-width: 0;
}

.debt-entry-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.debt-entry-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-green);
}

.debt-entry-pct {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.debt-entry-bar {
    width: 60px;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.debt-entry-bar-fill {
    height: 100%;
    background: var(--accent-green);
    border-radius: 2px;
}

/* ===== TIMER ===== */
.timer-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    outline: none;
    margin-bottom: 20px;
    -webkit-appearance: none;
}

.timer-select option {
    background: var(--bg-secondary);
    color: white;
}

.timer-display {
    text-align: center;
    margin-bottom: 20px;
}

.timer-elapsed {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.timer-earned {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-green);
}

.timer-earned-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.timer-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.timer-btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.timer-btn.start {
    background: var(--accent-green);
    color: #000;
}

.timer-btn.stop {
    background: #ef4444;
    color: white;
}

.timer-btn.reset {
    background: rgba(255,255,255,0.1);
    color: var(--text-secondary);
}

.timer-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.timer-summary {
    background: rgba(74,222,128,0.08);
    border: 1px solid rgba(74,222,128,0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    display: none;
}

.timer-summary.visible {
    display: block;
}

/* ===== VS MODE ===== */
.vs-pickers {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.vs-pickers select {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    outline: none;
    -webkit-appearance: none;
}

.vs-pickers select option {
    background: var(--bg-secondary);
    color: white;
}

.vs-label {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-orange);
}

.vs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.vs-table th {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px;
    text-align: center;
}

.vs-table th:first-child {
    text-align: left;
}

.vs-table td {
    padding: 10px 12px;
    background: var(--bg-card);
    font-size: 0.85rem;
    text-align: center;
}

.vs-table td:first-child {
    text-align: left;
    color: var(--text-secondary);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.vs-table td:nth-child(2) {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.vs-table td:nth-child(3) {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.vs-winner {
    color: var(--accent-green) !important;
    background: rgba(74,222,128,0.08) !important;
}

/* ===== SPEND MODE ===== */
.spend-picker {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    outline: none;
    margin-bottom: 16px;
    -webkit-appearance: none;
}

.spend-picker option {
    background: var(--bg-secondary);
    color: white;
}

.spend-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.spend-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    transition: all 0.2s;
}

.spend-item-emoji {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.spend-item-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spend-item-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.spend-item-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spend-qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.spend-qty-btn:hover {
    background: rgba(255,255,255,0.15);
}

.spend-qty {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.spend-summary {
    background: rgba(74,222,128,0.06);
    border: 1px solid rgba(74,222,128,0.15);
    border-radius: var(--radius-md);
    padding: 16px;
}

.spend-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.spend-summary-row:last-child {
    margin-bottom: 0;
}

.spend-summary-label {
    color: var(--text-secondary);
}

.spend-summary-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.spend-summary-value.spent {
    color: #ef4444;
}

.spend-summary-value.remaining {
    color: var(--accent-green);
}

.spend-progress-bar {
    height: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 12px;
}

.spend-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-yellow), #ef4444);
    border-radius: 5px;
    transition: width 0.3s;
}

/* ===== WEALTH LADDER ===== */
.wealth-ladder {
    position: relative;
    padding: 20px 0 20px 40px;
}

.ladder-line {
    position: absolute;
    left: 55px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-green), var(--accent-purple));
    border-radius: 2px;
}

.ladder-step {
    position: relative;
    padding: 12px 0 12px 30px;
    min-height: 50px;
}

.ladder-dot {
    position: absolute;
    left: -13px;
    top: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent-purple);
}

.ladder-dot.you {
    background: var(--accent-green);
    border-color: var(--accent-green);
    width: 16px;
    height: 16px;
    left: -15px;
    top: 14px;
    box-shadow: 0 0 10px rgba(74,222,128,0.5);
}

.ladder-step-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.ladder-step-name.you-label {
    color: var(--accent-green);
}

.ladder-step-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-cyan);
}

.ladder-multiplier {
    font-size: 0.75rem;
    color: var(--accent-orange);
    margin-top: 2px;
}

/* ===== WEALTH SCALE ===== */
.wealth-scale-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    outline: none;
    margin-bottom: 16px;
    -webkit-appearance: none;
}

.wealth-scale-select option {
    background: var(--bg-secondary);
    color: white;
}

.wealth-scale-info {
    text-align: center;
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
}

.wealth-scale-info strong {
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
}

.wealth-scale-container {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
    max-height: 200px;
}

.wealth-scale-your {
    height: 20px;
    background: #3b82f6;
    border-radius: 4px;
    margin-bottom: 12px;
    position: relative;
    min-width: 1px;
}

.wealth-scale-your-label {
    position: absolute;
    top: -18px;
    left: 0;
    font-size: 0.7rem;
    color: #3b82f6;
    font-weight: 700;
    white-space: nowrap;
}

.wealth-scale-their {
    height: 20px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan), var(--accent-purple));
    border-radius: 4px;
    position: relative;
    min-width: 2px;
}

.wealth-scale-their-label {
    position: absolute;
    top: -18px;
    left: 0;
    font-size: 0.7rem;
    color: var(--accent-green);
    font-weight: 700;
    white-space: nowrap;
}

/* ===== ACHIEVEMENTS ===== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.achievement-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    text-align: center;
    transition: all 0.2s;
    opacity: 0.4;
}

.achievement-card.unlocked {
    opacity: 1;
    border: 1px solid rgba(74,222,128,0.2);
    background: rgba(74,222,128,0.06);
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

.achievement-name {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.achievement-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.achievement-locked {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Achievement Toast */
.achievement-toast {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(74,222,128,0.95), rgba(34,211,238,0.95));
    color: #000;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 9999;
    transition: top 0.4s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.achievement-toast.show {
    top: 20px;
}

/* ===== SHARE BUTTON ===== */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--gradient-button);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.share-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* ===== RESPONSIVE FOR NEW FEATURES ===== */
@media (max-width: 600px) {
    .feature-buttons {
        gap: 6px;
    }

    .feature-btn {
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    .spend-catalog {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        max-height: 300px;
    }

    .vs-pickers {
        flex-direction: column;
    }

    .vs-pickers select {
        width: 100%;
    }

    .timer-elapsed {
        font-size: 1.8rem;
    }

    .timer-earned {
        font-size: 1.3rem;
    }

    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .debt-presets {
        gap: 6px;
    }

    .debt-preset-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

.spend-catalog::-webkit-scrollbar {
    width: 4px;
}

.spend-catalog::-webkit-scrollbar-track {
    background: transparent;
}

.spend-catalog::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

.wealth-scale-container::-webkit-scrollbar {
    height: 4px;
}

.wealth-scale-container::-webkit-scrollbar-track {
    background: transparent;
}

.wealth-scale-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}
