/* ============================================
   REFORM CLICKER GAME - Cookie Clicker Style
   Post tweets, earn Elon Bucks, grow Reform!
   ============================================ */

/* Game-specific variables */
:root {
    --reform-cyan: #12b6cf;
    --reform-dark: #0a1628;
    --elon-gold: #fbbf24;
    --member-purple: #a855f7;
    --x-black: #000000;
    --x-white: #ffffff;
    --success: #22c55e;
    --danger: #dc2626;
    --lcars-orange: #ff9966;
    --lcars-pink: #cc6699;
}

/* ============================================
   FULL PAGE LAYOUT - Force viewport height
   ============================================ */

/* Override body to be fixed height viewport */
body.page-clicker {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;  
    flex-direction: column;
    padding-top: 0 !important; /* Override any banner padding */
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(18, 182, 207, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #050510 0%, #0a1020 50%, #0a1628 100%);
    background-attachment: fixed;
}

/* Hide any footer that might appear */
body.page-clicker .site-footer {
    display: none !important;
}

/* Hide the restore britain CTA */
body.page-clicker .restore-britain-cta {
    display: none !important;
}

/* Main content fills remaining space after nav */
body.page-clicker .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0 !important; /* Override base.css min-height */
    overflow: hidden;
}

/* Animated background particles */
body.page-clicker::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(18, 182, 207, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(168, 85, 247, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(251, 191, 36, 0.3), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(18, 182, 207, 0.2), transparent),
        radial-gradient(1px 1px at 160px 30px, rgba(168, 85, 247, 0.3), transparent);
    background-size: 200px 100px;
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

@keyframes particleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

/* Main Game Container */
.game-container {
    max-width: 1600px;
    width: 100%;
    flex: 1;
    margin: 0 auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    z-index: 1;
}

/* Top Stats Bar */
.game-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-shrink: 0;
}

.stat-box {
    background: linear-gradient(145deg, rgba(20, 30, 50, 0.9) 0%, rgba(10, 15, 30, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-box.elon-bucks {
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.15);
}

.stat-box.reform-members {
    border-color: rgba(18, 182, 207, 0.3);
    box-shadow: 0 0 20px rgba(18, 182, 207, 0.15);
}

.stat-box.game-timer {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

.stat-label {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
}

.stat-value {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1;
}

.elon-bucks .stat-value {
    color: var(--elon-gold);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.reform-members .stat-value {
    color: var(--reform-cyan);
    text-shadow: 0 0 10px rgba(18, 182, 207, 0.5);
}

.game-timer .stat-value {
    color: var(--member-purple);
    font-variant-numeric: tabular-nums;
}

.stat-rate {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* Main Game Area */
.game-main {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-md);
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

@media (min-width: 1400px) {
    .game-main {
        grid-template-columns: 1fr 500px;
    }
}

/* Left Panel - POST Button Area */
.game-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: 
        radial-gradient(ellipse at center, rgba(18, 182, 207, 0.03) 0%, transparent 60%),
        linear-gradient(145deg, rgba(12, 20, 40, 0.95) 0%, rgba(6, 12, 25, 0.98) 100%);
    border: 2px solid rgba(18, 182, 207, 0.15);
    border-radius: 30px 12px 30px 12px;
    padding: var(--space-md);
    position: relative;
    overflow: hidden;
    min-height: 0;
}

/* LCARS curved accent strip on left */
.game-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 100%;
    background: linear-gradient(180deg, var(--reform-cyan) 0%, var(--member-purple) 100%);
    border-radius: 30px 0 0 12px;
    opacity: 0.7;
}

/* Subtle scan line effect */
.game-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(18, 182, 207, 0.015) 2px,
        rgba(18, 182, 207, 0.015) 4px
    );
    pointer-events: none;
}

.tweet-counter {
    font-family: var(--font-display);
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    padding: var(--space-xs) var(--space-lg);
    background: rgba(18, 182, 207, 0.08);
    border: 1px solid rgba(18, 182, 207, 0.2);
    border-radius: 20px 8px 20px 8px;
    position: relative;
    z-index: 1;
}

.tweet-counter span {
    color: var(--reform-cyan);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(18, 182, 207, 0.5);
}

/* The POST Button */
.post-button {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
        linear-gradient(145deg, #222222 0%, #000000 50%, #111111 100%);
    border-image: linear-gradient(135deg, #fff 0%, #888 50%, #fff 100%) 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all 0.15s ease;
    position: relative;
    box-shadow: 
        0 0 0 5px rgba(255,255,255,0.2),
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 100px rgba(18, 182, 207, 0.2),
        inset 0 -5px 20px rgba(0,0,0,0.5),
        inset 0 5px 20px rgba(255,255,255,0.1);
    animation: buttonGlow 2s ease-in-out infinite;
}

/* remove default focus rectangle on the circular post button */
.post-button:focus {
    outline: none;
    box-shadow: 
        0 0 0 6px rgba(255,255,255,0.2),
        0 20px 50px rgba(0, 0, 0, 0.7),
        0 0 150px rgba(18, 182, 207, 0.5),
        inset 0 -5px 20px rgba(0,0,0,0.5),
        inset 0 5px 20px rgba(255,255,255,0.2);
}

@keyframes buttonGlow {
    0%, 100% { 
        box-shadow: 
            0 0 0 5px rgba(255,255,255,0.2),
            0 15px 40px rgba(0, 0, 0, 0.6),
            0 0 80px rgba(18, 182, 207, 0.2),
            inset 0 -5px 20px rgba(0,0,0,0.5),
            inset 0 5px 20px rgba(255,255,255,0.1);
    }
    50% { 
        box-shadow: 
            0 0 0 5px rgba(255,255,255,0.3),
            0 15px 40px rgba(0, 0, 0, 0.6),
            0 0 120px rgba(18, 182, 207, 0.4),
            inset 0 -5px 20px rgba(0,0,0,0.5),
            inset 0 5px 20px rgba(255,255,255,0.15);
    }
}

/* Outer ring decoration */
.post-button::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 2px dashed rgba(18, 182, 207, 0.3);
    border-radius: 50%;
    animation: spin 20s linear infinite;
}

.post-button::after {
    content: '';
    position: absolute;
    top: -25px;
    left: -25px;
    right: -25px;
    bottom: -25px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 50%;
    animation: spin 30s linear infinite reverse;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.post-button:hover {
    transform: scale(1.08);
    box-shadow: 
        0 0 0 6px rgba(255,255,255,0.3),
        0 20px 50px rgba(0, 0, 0, 0.7),
        0 0 150px rgba(18, 182, 207, 0.5),
        inset 0 -5px 20px rgba(0,0,0,0.5),
        inset 0 5px 20px rgba(255,255,255,0.2);
}

.post-button:active {
    transform: scale(0.92);
    box-shadow: 
        0 0 0 4px rgba(255,255,255,0.2),
        0 5px 15px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(18, 182, 207, 0.3),
        inset 0 5px 20px rgba(0,0,0,0.6),
        inset 0 -5px 10px rgba(255,255,255,0.05);
}

.post-button.clicked {
    animation: buttonPulse 0.15s ease-out, buttonGlow 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0% { transform: scale(0.92); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.post-icon {
    font-size: 4.5rem;
    color: var(--x-white);
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
    position: relative;
    z-index: 1;
}

.post-text {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--x-white);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
    position: relative;
    z-index: 1;
}

/* Click Feedback */
.click-feedback {
    position: absolute;
    pointer-events: none;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--elon-gold);
    text-shadow: 
        0 0 10px rgba(251, 191, 36, 0.8),
        0 0 20px rgba(251, 191, 36, 0.5),
        0 2px 4px rgba(0,0,0,0.5);
    opacity: 0;
    z-index: 100;
}

.click-feedback.animate {
    animation: floatUp 0.8s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2) rotate(5deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.8) rotate(-5deg);
    }
}

/* Woke Progress Bar - LCARS style */
.woke-progress-container {
    width: 100%;
    max-width: 350px;
    margin-top: var(--space-lg);
    position: relative;
    z-index: 1;
}

.woke-progress-label {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-shadow: 0 0 10px rgba(18, 182, 207, 0.5);
}

.woke-progress-bar {
    height: 28px;
    background: linear-gradient(180deg, rgba(6, 12, 25, 0.95) 0%, rgba(12, 20, 40, 0.9) 100%);
    border-radius: 0 20px 20px 0;
    overflow: hidden;
    border: 2px solid rgba(18, 182, 207, 0.25);
    border-left: 8px solid var(--reform-cyan);
    box-shadow: 
        inset 0 2px 10px rgba(0,0,0,0.5),
        0 0 15px rgba(18, 182, 207, 0.1);
    position: relative;
}

/* Progress bar tick marks - LCARS style */
.woke-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 9.5%,
        rgba(255,255,255,0.08) 9.5%,
        rgba(255,255,255,0.08) 10%
    );
    z-index: 1;
    pointer-events: none;
}

.woke-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        var(--reform-cyan) 0%, 
        var(--member-purple) 50%, 
        var(--neon-pink) 100%
    );
    border-radius: 0 18px 18px 0;
    transition: width 0.5s ease-out;
    position: relative;
    box-shadow: 0 0 15px rgba(18, 182, 207, 0.4);
}

.woke-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
    border-radius: 0 18px 0 0;
}

/* Animated glow on progress fill */
.woke-progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    animation: progressShimmer 1.5s ease-in-out infinite;
}

@keyframes progressShimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.woke-progress-text {
    text-align: center;
    margin-top: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Right Panel - Shop */
.game-right {
    background: 
        linear-gradient(145deg, rgba(12, 20, 40, 0.95) 0%, rgba(6, 12, 25, 0.98) 100%);
    border: 2px solid rgba(251, 191, 36, 0.15);
    border-radius: 12px 30px 12px 30px;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    position: relative;
}

/* LCARS curved accent strip on right */
.game-right::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 100%;
    background: linear-gradient(180deg, var(--elon-gold) 0%, var(--lcars-orange) 100%);
    border-radius: 0 30px 12px 0;
    opacity: 0.7;
}

/* Hide mobile close button on desktop */
.mobile-shop-close {
    display: none;
}

/* Hide mobile shop toggle on desktop */
.mobile-shop-toggle {
    display: none;
}

/* Scrollbar styling */
.game-right::-webkit-scrollbar {
    width: 8px;
}

.game-right::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.game-right::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.3);
    border-radius: 4px;
}

.game-right::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 191, 36, 0.5);
}

.shop-header {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.1), transparent);
    border-bottom: 2px solid rgba(251, 191, 36, 0.3);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.shop-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    flex-shrink: 0;
}

.shop-tab {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(10, 15, 30, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px 8px 20px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.shop-tab:hover {
    border-color: rgba(251, 191, 36, 0.4);
    color: var(--text-primary);
    background: rgba(251, 191, 36, 0.08);
}

.shop-tab.active {
    color: var(--x-white);
    border-color: var(--elon-gold);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(18, 182, 207, 0.1) 100%);
    box-shadow: 
        0 0 15px rgba(251, 191, 36, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Notification badge for new items/upgrades */
.shop-tab.has-new::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--danger);
    animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.shop-panels {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: var(--space-xs);
}

/* Scrollbar styling for shop panels */
.shop-panels::-webkit-scrollbar {
    width: 8px;
}

.shop-panels::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.shop-panels::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.3);
    border-radius: 4px;
}

.shop-panels::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 191, 36, 0.5);
}

.shop-panel {
    display: none;
    min-height: 0;
}

.shop-panel.active {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* purchase animation styles */
.purchased-anim {
    animation: purchasePulse 0.9s cubic-bezier(.2,.9,.2,1);
}

@keyframes purchasePulse {
    0% { transform: scale(1); box-shadow: none; }
    30% { transform: scale(1.06); box-shadow: 0 6px 20px rgba(34,197,94,0.25); }
    100% { transform: scale(1); box-shadow: none; }
}

.fly-coin {
    position: fixed;
    z-index: 600;
    background: radial-gradient(circle at 30% 30%, #fff 0%, #ffd700 30%);
    color: #111;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
    transition: transform 0.75s cubic-bezier(.2,.9,.2,1), opacity 0.75s;
    pointer-events: none;
}

.shop-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.upgrades-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Shop Item Card - LCARS style */
.shop-item {
    background: linear-gradient(135deg, rgba(20, 30, 50, 0.85) 0%, rgba(12, 18, 35, 0.95) 100%);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 8px 25px 8px 25px;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    overflow: hidden;
}

/* LCARS accent bar on left of item */
.shop-item::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    bottom: 4px;
    width: 6px;
    background: linear-gradient(180deg, var(--lcars-lavender) 0%, var(--member-purple) 100%);
    border-radius: 0 3px 3px 0;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.shop-item:hover:not(.locked):not(.disabled)::before {
    opacity: 1;
}

.shop-item:hover:not(.locked):not(.disabled) {
    border-color: var(--reform-cyan);
    transform: translateX(4px);
    background: linear-gradient(135deg, rgba(30, 45, 70, 0.9) 0%, rgba(18, 28, 50, 0.95) 100%);
    box-shadow: 
        0 0 15px rgba(18, 182, 207, 0.2),
        inset 0 0 20px rgba(18, 182, 207, 0.03);
}

.shop-item.locked {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.shop-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-item.affordable {
    border-color: var(--success);
    box-shadow: 
        0 0 12px rgba(34, 197, 94, 0.25),
        inset 0 0 15px rgba(34, 197, 94, 0.03);
    animation: affordablePulse 2s ease-in-out infinite;
}

.shop-item.affordable::before {
    background: linear-gradient(180deg, var(--success) 0%, rgba(34, 197, 94, 0.6) 100%);
    opacity: 0.8;
}

@keyframes affordablePulse {
    0%, 100% { box-shadow: 0 0 12px rgba(34, 197, 94, 0.25), inset 0 0 15px rgba(34, 197, 94, 0.03); }
    50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.4), inset 0 0 25px rgba(34, 197, 94, 0.06); }
}

.shop-item.affordable:hover {
    box-shadow: 
        0 0 20px rgba(34, 197, 94, 0.4),
        inset 0 0 25px rgba(34, 197, 94, 0.06);
}

.item-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    text-align: center;
    line-height: 45px;
    background: rgba(0,0,0,0.4);
    border-radius: 8px 18px 8px 18px;
    border: 1px solid rgba(18, 182, 207, 0.2);
}

.item-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

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

.item-name {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.item-description {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: 2px;
    font-style: italic;
    line-height: 1.2;
}

.item-stats {
    display: flex;
    gap: var(--space-sm);
    font-size: var(--text-xs);
}

.item-cost {
    color: var(--elon-gold);
    font-weight: 700;
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
}

.item-rate {
    color: var(--reform-cyan);
    font-weight: 600;
}

.item-owned {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--text-secondary);
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    background: rgba(0,0,0,0.4);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 15px 6px 15px 6px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Upgrades - LCARS style */
.upgrades-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.upgrade-item {
    background: linear-gradient(135deg, rgba(20, 30, 50, 0.8) 0%, rgba(12, 18, 35, 0.9) 100%);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 25px 8px 25px 8px;
    padding: var(--space-xs) var(--space-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    overflow: hidden;
}

/* LCARS accent bar on right of upgrade */
.upgrade-item::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 0;
    bottom: 4px;
    width: 6px;
    background: linear-gradient(180deg, var(--elon-gold) 0%, var(--lcars-orange) 100%);
    border-radius: 3px 0 0 3px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.upgrade-item:hover:not(.locked):not(.purchased)::before {
    opacity: 1;
}

.upgrade-item:hover:not(.locked):not(.purchased) {
    border-color: var(--elon-gold);
    transform: translateX(-4px);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.upgrade-item.locked {
    opacity: 0.25;
    cursor: not-allowed;
    filter: grayscale(60%);
}

.upgrade-item.purchased {
    opacity: 0.6;
    cursor: default;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(20, 80, 50, 0.15) 100%);
    border-color: rgba(34, 197, 94, 0.35);
}

.upgrade-item.purchased::before {
    background: linear-gradient(180deg, var(--success) 0%, rgba(34, 197, 94, 0.5) 100%);
}

.upgrade-item.affordable {
    border-color: var(--elon-gold);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
    animation: upgradeGlow 1.5s ease-in-out infinite;
}

.upgrade-item.affordable::before {
    opacity: 0.9;
}

@keyframes upgradeGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(251, 191, 36, 0.25); }
    50% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.4); }
}

.upgrade-icon {
    font-size: 1.3rem;
    width: 32px;
    height: 32px;
    text-align: center;
    line-height: 32px;
    background: rgba(0,0,0,0.4);
    border-radius: 6px 12px 6px 12px;
}

.upgrade-info {
    flex: 1;
}

.upgrade-name {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-primary);
}

.upgrade-cost {
    font-size: var(--text-xs);
    color: var(--elon-gold);
    font-weight: 600;
}

/* Upgrade hint when no upgrades visible */
.upgrade-hint {
    text-align: center;
    padding: var(--space-md);
    color: var(--text-muted);
    font-style: italic;
    font-size: var(--text-xs);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px 8px 15px 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Game Modal - LCARS style */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(15px);
}

.modal-content {
    background: linear-gradient(145deg, rgba(12, 20, 40, 0.98) 0%, rgba(6, 12, 25, 0.99) 100%);
    border-radius: 12px 50px 12px 50px;
    padding: var(--space-2xl);
    max-width: 600px;
    width: 90%;
    text-align: center;
    border: 3px solid var(--reform-cyan);
    box-shadow: 
        0 0 80px rgba(18, 182, 207, 0.3),
        inset 0 0 40px rgba(18, 182, 207, 0.03);
    animation: modalAppear 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

/* LCARS top accent bar */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 8px;
    background: linear-gradient(90deg, var(--reform-cyan) 0%, var(--member-purple) 50%, var(--elon-gold) 100%);
    border-radius: 0 0 4px 4px;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    margin-top: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.modal-title.win {
    background: linear-gradient(135deg, var(--elon-gold), var(--reform-cyan), var(--member-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

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

.modal-title.lose {
    color: var(--danger);
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.modal-description {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.modal-stat {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px 20px 8px 20px;
    padding: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-stat-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: var(--text-primary);
}

.modal-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.modal-btn {
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--space-md) var(--space-2xl);
    background: linear-gradient(135deg, var(--reform-cyan), var(--member-purple));
    color: var(--bg-primary);
    border: none;
    border-radius: 25px 10px 25px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(18, 182, 207, 0.5);
}

/* Game Controls - LCARS style */
.game-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    flex-shrink: 0;
}

.control-btn {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    padding: var(--space-xs) var(--space-md);
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px 6px 15px 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.control-btn:hover {
    border-color: var(--reform-cyan);
    color: var(--text-primary);
    background: rgba(18, 182, 207, 0.1);
}

.control-btn.muted {
    border-color: var(--danger);
    color: var(--danger);
    opacity: 0.7;
}

/* Notification Toast - LCARS style */
.notification-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(12, 20, 40, 0.98) 0%, rgba(6, 12, 25, 0.99) 100%);
    border: 2px solid var(--reform-cyan);
    border-radius: 20px 8px 20px 8px;
    padding: var(--space-sm) var(--space-lg);
    z-index: 500;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 
        0 0 25px rgba(18, 182, 207, 0.3),
        inset 0 0 15px rgba(18, 182, 207, 0.03);
}

.notification-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notification-toast .toast-icon {
    font-size: var(--text-2xl);
    margin-right: var(--space-sm);
    vertical-align: middle;
}

.notification-toast .toast-text {
    font-family: var(--font-heading);
    font-weight: 600;
    vertical-align: middle;
    text-shadow: 0 0 10px rgba(18, 182, 207, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
    .game-main {
        grid-template-columns: 1fr;
    }
    
    .game-right {
        min-height: 0;
        /* become bottom sheet when mobile shop open */
        position: fixed;
        left: 0;
        right: 0;
        bottom: -100%;
        height: 80vh;
        border-radius: 30px 30px 0 0;
        transform: translateY(100%);
        transition: transform 300ms ease;
        z-index: 80;
        box-shadow: 0 -20px 60px rgba(0,0,0,0.6);
        padding-top: var(--space-lg);
    }

    /* LCARS accent bar at top of mobile shop */
    .game-right::after {
        content: '';
        position: absolute;
        top: 0;
        left: 20%;
        right: 20%;
        height: 5px;
        background: linear-gradient(90deg, var(--elon-gold), var(--reform-cyan), var(--elon-gold));
        border-radius: 0 0 3px 3px;
    }

    body.mobile-shop-open .game-right {
        transform: translateY(0);
        bottom: 0;
    }

    /* Close button for mobile shop - LCARS style */
    .mobile-shop-close {
        display: flex;
        position: absolute;
        top: 12px;
        right: 14px;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        background: rgba(220, 38, 38, 0.15);
        border: 2px solid rgba(220, 38, 38, 0.4);
        border-radius: 8px 20px 8px 20px;
        color: var(--danger);
        font-size: 1.4rem;
        cursor: pointer;
        z-index: 90;
        transition: all 0.2s ease;
    }

    .mobile-shop-close:hover {
        background: rgba(220, 38, 38, 0.25);
        border-color: var(--danger);
    }

    /* Mobile shop toggle - LCARS curved full-width */
    .mobile-shop-toggle {
        display: block;
        position: fixed;
        left: var(--space-md);
        right: var(--space-md);
        bottom: var(--space-md);
        z-index: 200;
        padding: var(--space-sm) var(--space-lg);
        border-radius: 0 0 30px 30px;
        background: linear-gradient(
            180deg,
            rgba(251, 191, 36, 0.2) 0%,
            rgba(12, 20, 40, 0.95) 100%
        );
        border: 2px solid var(--elon-gold);
        border-top: none;
        box-shadow: 
            0 8px 30px rgba(0, 0, 0, 0.5),
            0 0 20px rgba(251, 191, 36, 0.2),
            inset 0 2px 10px rgba(251, 191, 36, 0.1);
        font-family: var(--font-heading);
        font-size: var(--text-sm);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.15em;
        color: var(--elon-gold);
        transform: none;
    }

    /* Top accent bar on shop button */
    .mobile-shop-toggle::before {
        content: '';
        position: absolute;
        top: 0;
        left: 15%;
        right: 15%;
        height: 3px;
        background: linear-gradient(90deg, transparent, var(--elon-gold), transparent);
    }

    .game-left { 
        padding: var(--space-md); 
        border-radius: 20px 8px 20px 8px;
    }
    
    .game-stats {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }

    /* Smaller shop items on mobile */
    .shop-item {
        padding: var(--space-xs) var(--space-sm);
        gap: var(--space-xs);
        border-radius: 6px 18px 6px 18px;
    }
    .item-icon {
        font-size: 1.5rem;
        width: 36px;
        height: 36px;
        line-height: 36px;
    }
    .item-name { font-size: var(--text-xs); }
    .item-description { font-size: 0.65rem; line-height: 1.1; }
    .item-stats { font-size: 0.65rem; gap: var(--space-xs); }
    .item-owned {
        font-size: var(--text-base);
        min-width: 28px;
        padding: 2px 4px;
    }

    /* Smaller upgrade items */
    .upgrade-item {
        padding: var(--space-xs) var(--space-sm);
        gap: var(--space-xs);
        border-radius: 18px 6px 18px 6px;
    }
    .upgrade-icon {
        font-size: 1.1rem;
        width: 26px;
        height: 26px;
        line-height: 26px;
    }
    .upgrade-name { font-size: 0.7rem; }
    .upgrade-cost { font-size: 0.6rem; }

    /* Shop header smaller */
    .shop-header {
        font-size: var(--text-sm);
        margin-bottom: var(--space-sm);
        padding: var(--space-xs) var(--space-md);
    }

    .shop-tabs {
        margin-bottom: var(--space-sm);
    }

    .shop-tab {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.7rem;
    }
}

@media (max-width: 600px) {
    /* Reduce overall container padding */
    .game-container {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }

    /* Timer at top, currency boxes side by side below */
    .game-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: var(--space-xs);
        padding: 0;
    }

    /* Timer spans full width at top */
    .stat-box.game-timer {
        grid-column: 1 / -1;
        order: -1;
    }

    .stat-box.game-timer .stat-label {
        font-size: 0.6rem;
        margin-bottom: 2px;
    }

    .stat-box.game-timer .stat-value {
        font-size: 1.5rem;
    }

    /* Currency boxes side by side - compact */
    .stat-box.elon-bucks,
    .stat-box.reform-members {
        min-width: 0;
        flex: none;
        padding: var(--space-xs) var(--space-sm);
    }

    .stat-box .stat-label { font-size: 0.55rem; margin-bottom: 2px; }
    .stat-box .stat-value { font-size: 0.9rem; }
    .stat-box .stat-rate { font-size: 0.55rem; }

    /* Smaller post button area */
    .game-left {
        padding: var(--space-sm);
    }

    .tweet-counter {
        font-size: var(--text-xs);
        margin-bottom: var(--space-sm);
        padding: var(--space-xs) var(--space-md);
    }

    .post-button {
        width: 160px;
        height: 160px;
    }

    .post-button::before {
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }

    .post-button::after {
        top: -18px;
        left: -18px;
        right: -18px;
        bottom: -18px;
    }

    .post-icon {
        font-size: 3rem;
    }

    .post-text {
        font-size: var(--text-lg);
    }

    /* Smaller progress bar */
    .woke-progress-container {
        margin-top: var(--space-md);
        max-width: 280px;
    }

    .woke-progress-label {
        font-size: var(--text-xs);
        margin-bottom: var(--space-xs);
    }

    .woke-progress-bar {
        height: 24px;
    }

    .woke-progress-text {
        font-size: 0.65rem;
    }

    /* Game controls smaller */
    .game-controls {
        gap: var(--space-xs);
        padding: var(--space-xs) 0;
    }

    .control-btn {
        font-size: 0.65rem;
        padding: 4px var(--space-sm);
    }

    /* Account for bottom shop button */
    .game-main {
        padding-bottom: 50px;
    }
}

@media (max-width: 400px) {
    .game-container {
        padding: var(--space-xs);
    }
    
    .post-button {
        width: 140px;
        height: 140px;
    }
    
    .post-icon {
        font-size: 2.5rem;
    }

    .post-text {
        font-size: var(--text-base);
    }

    .stat-box.game-timer .stat-value {
        font-size: 1.4rem;
    }

    .stat-box .stat-value {
        font-size: 0.8rem;
    }

    .woke-progress-container {
        max-width: 240px;
    }
}

/* ============================================
   CHAT POPUP / SUPPORTER MESSAGES
   Styled to look like real X/Twitter tweets
   ============================================ */

.chat-popup {
    position: fixed;
    bottom: 100px;
    left: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: #000000;
    border: 1px solid #2f3336;
    border-radius: 16px;
    padding: 12px 16px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 
        0 0 15px rgba(0, 0, 0, 0.5),
        0 4px 30px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.chat-popup.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: none;
}

/* Tweet header with avatar, name, handle, and X logo */
.chat-popup-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
    padding-bottom: 0;
    border-bottom: none;
}

.chat-popup-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d9bf0 0%, #0d8bd9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.chat-popup-user-info {
    flex: 1;
    min-width: 0;
}

.chat-popup-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.chat-popup-name {
    font-weight: 700;
    color: #e7e9ea;
    font-size: 15px;
    line-height: 20px;
}

.chat-popup-verified {
    color: #1d9bf0;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.chat-popup-handle {
    color: #71767b;
    font-size: 15px;
    line-height: 20px;
}

.chat-popup-dot {
    color: #71767b;
    font-size: 15px;
}

.chat-popup-time {
    color: #71767b;
    font-size: 15px;
}

.chat-popup-x-logo {
    margin-left: auto;
    color: #e7e9ea;
    font-size: 20px;
    font-weight: 800;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* Tweet message content */
.chat-popup-message {
    color: #e7e9ea;
    font-size: 15px;
    line-height: 20px;
    font-style: normal;
    margin: 8px 0 12px 50px;
    word-wrap: break-word;
}

.chat-popup-message::before,
.chat-popup-message::after {
    content: none;
}

/* Tweet engagement stats */
.chat-popup-reactions {
    display: flex;
    justify-content: space-between;
    margin-left: 50px;
    margin-top: 0;
    padding-top: 8px;
    border-top: none;
    max-width: 250px;
}

.chat-popup-reaction {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #71767b;
    font-size: 13px;
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    border-radius: 50%;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.chat-popup-reaction:hover {
    background-color: rgba(29, 155, 240, 0.1);
}

.chat-popup-reaction.reply:hover {
    color: #1d9bf0;
}

.chat-popup-reaction.retweet:hover {
    color: #00ba7c;
}

.chat-popup-reaction.like:hover {
    color: #f91880;
}

.chat-popup-reaction.views {
    cursor: default;
}

.chat-popup-reaction.views:hover {
    background-color: transparent;
}

.chat-popup-reaction svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Mobile adjustments - position at top to avoid shop button */
@media (max-width: 768px) {
    .chat-popup {
        bottom: auto;
        top: 80px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        padding: 10px 12px;
    }
    
    .chat-popup-avatar {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .chat-popup-message {
        margin-left: 46px;
        font-size: 14px;
    }
    
    .chat-popup-reactions {
        margin-left: 46px;
    }
    
    .chat-popup-name,
    .chat-popup-handle,
    .chat-popup-time {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .chat-popup {
        top: 70px;
        left: 8px;
        right: 8px;
        padding: 8px 10px;
    }
    
    .chat-popup-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .chat-popup-message {
        margin-left: 42px;
        font-size: 13px;
        line-height: 18px;
    }
    
    .chat-popup-reactions {
        margin-left: 42px;
        max-width: 200px;
    }
    
    .chat-popup-reaction {
        font-size: 12px;
        padding: 6px;
        margin: -6px;
    }
    
    .chat-popup-reaction svg {
        width: 16px;
        height: 16px;
    }
}
