* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f172a;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
}

header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    color: #38bdf8;
    margin-bottom: 8px;
}

header p {
    color: #94a3b8;
}

/* Statistics Badges */
.stats-badge-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1e293b;
    border: 1px solid #334155;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #94a3b8;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.vip-stat-badge {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.stat-icon {
    font-size: 1.1rem;
}

.stat-label {
    font-weight: 500;
}

.stat-value {
    font-weight: bold;
    color: #38bdf8;
}

.vip-stat-badge .stat-value {
    color: #f59e0b;
}

.layout-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 1400px;
}

.ad-sidebar {
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-box {
    width: 100%;
    height: 750px;
    background-color: #1e293b;
    border: 1px dashed #475569;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #64748b;
    font-size: 0.85rem;
    padding: 10px;
    text-align: center;
}

.ad-sidebar-btn {
    padding: 12px 16px;
    background-color: #38bdf8;
    color: #0f172a;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s, background-color 0.2s;
}

.ad-sidebar-btn:hover {
    background-color: #0284c7;
    color: #ffffff;
    transform: translateY(-2px);
}

.container {
    flex: 1;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: #38bdf8;
    border-bottom: 2px solid #334155;
    padding-bottom: 8px;
}

.vip-badge {
    color: #f59e0b;
    border-color: #f59e0b;
}

.card {
    background-color: #1e293b;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.card h2 {
    font-size: 1.3rem;
    color: #f1f5f9;
    margin-bottom: 8px;
}

.card p {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 15px;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reset-btn {
    padding: 6px 12px;
    background-color: #334155;
    color: #38bdf8;
    border: 1px solid #38bdf8;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
}

/* 1. Soap Bubbles */
.bubble-area {
    width: 100%;
    height: 400px;
    background: radial-gradient(circle, #0f2027, #203a43, #2c5364);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.ceiling-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
}

.soap-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.2) 50%, rgba(255, 0, 150, 0.3) 75%, rgba(0, 200, 255, 0.5) 100%);
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.7), 0 0 10px rgba(56, 189, 248, 0.3);
    cursor: pointer;
    animation: floatUpSlow 18s linear forwards;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
}

@keyframes floatUpSlow {
    0% { transform: translateY(400px) scale(0.9); opacity: 0.2; }
    10% { opacity: 1; }
    100% { transform: translateY(5px) scale(1); opacity: 1; }
}

.soap-bubble.pop-expand {
    animation: popBounce 0.2s forwards !important;
}

@keyframes popBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* 2. Grid Switches */
.grid-5x4 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.toggle-btn {
    padding: 16px 8px;
    background-color: #334155;
    color: #94a3b8;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.toggle-btn.active {
    background-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 0 12px #22c55e;
}

/* 3. Canvas Studio */
.canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.canvas-tools { display: flex; gap: 8px; }

.tool-btn {
    padding: 8px 14px;
    background-color: #334155;
    color: white;
    border: 1px solid #475569;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.tool-btn.active { background-color: #38bdf8; color: #0f172a; }
.tool-btn.eraser { background-color: #ef4444; border-color: #ef4444; }

#multiCanvas {
    width: 100%;
    height: 480px;
    background-color: #020617;
    border-radius: 8px;
    border: 1px solid #334155;
    cursor: crosshair;
}

/* VIP 1: Packaging Wrap */
.air-wrap-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #334155;
}

.air-bubble {
    aspect-ratio: 1;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.9), rgba(255,255,255,0.3) 40%, rgba(200,225,255,0.15) 70%);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: inset -3px -3px 8px rgba(0,0,0,0.4), inset 2px 2px 5px rgba(255,255,255,0.8), 0 4px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.05s, background 0.1s;
}

.air-bubble.popped {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.9);
    transform: scale(0.9);
}

/* VIP 2: Single Natural Flame Array */
.lighter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.retro-lighter {
    background: linear-gradient(145deg, #475569, #1e293b);
    border: 2px solid #94a3b8;
    border-radius: 12px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.flint-wheel {
    width: 28px;
    height: 28px;
    background: radial-gradient(circle, #94a3b8, #334155);
    border: 2px dashed #cbd5e1;
    border-radius: 50%;
    cursor: pointer;
    margin-bottom: 5px;
    transition: transform 0.1s;
}

.flint-wheel:active {
    transform: rotate(90deg) scale(0.95);
}

.flame-container {
    height: 65px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    width: 100%;
}

.natural-flame {
    position: relative;
    width: 22px;
    height: 52px;
    background: linear-gradient(to top, #3b82f6 5%, #f97316 40%, #eab308 80%, #ffffff 100%);
    border-radius: 50% 50% 20% 20%;
    filter: drop-shadow(0 0 10px #f97316);
    animation: singleFlamePulse 0.12s infinite alternate ease-in-out;
}

.spark {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 6px #eab308;
    animation: sparkUp 0.4s infinite linear;
}

.spark-1 { left: 4px; animation-delay: 0.1s; }
.spark-2 { right: 4px; animation-delay: 0.25s; }

.natural-flame.hidden { display: none; }

@keyframes singleFlamePulse {
    0% { transform: scaleX(0.92) scaleY(0.95) rotate(-2deg); }
    100% { transform: scaleX(1.08) scaleY(1.05) rotate(2deg); }
}

@keyframes sparkUp {
    0% { bottom: 15px; opacity: 1; transform: translateY(0) scale(1); }
    100% { bottom: 60px; opacity: 0; transform: translateY(-20px) scale(0.2); }
}

.lighter-label {
    font-size: 0.75rem;
    color: #cbd5e1;
    font-weight: bold;
    margin-top: 5px;
}

/* VIP 3: AI Machine */
.ai-box { display: flex; flex-direction: column; align-items: center; gap: 15px; }

.ai-text {
    font-size: 1.05rem;
    font-style: italic;
    color: #38bdf8;
    background: #020617;
    padding: 18px;
    border-radius: 8px;
    width: 100%;
    border: 1px solid #334155;
    text-align: center;
    line-height: 1.6;
}

/* VIP 4: Stackable Accumulating Wood Sticks */
.cliff-area {
    width: 100%;
    height: 340px;
    background: linear-gradient(to bottom, #020617 60%, #1e293b 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #334155;
}

.cliff-top {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 10;
}

.stick-pile {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.natural-stick {
    position: absolute;
    width: 6px;
    height: 55px;
    background: linear-gradient(to bottom, #78350f, #451a03);
    border-radius: 3px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    z-index: 5;
}

.natural-stick::before {
    content: '';
    position: absolute;
    top: 12px;
    left: -6px;
    width: 8px;
    height: 3px;
    background: #78350f;
    transform: rotate(-35deg);
    border-radius: 2px;
}

.natural-stick::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -7px;
    width: 9px;
    height: 3px;
    background: #451a03;
    transform: rotate(40deg);
    border-radius: 2px;
}

.landed-stick {
    position: absolute;
    height: 6px;
    background: linear-gradient(to right, #78350f, #451a03);
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.landed-stick::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 6px;
    width: 6px;
    height: 3px;
    background: #78350f;
    transform: rotate(45deg);
}

/* VIP Visibility & Crypto UI */
.vip-card { border: 2px solid #f59e0b; text-align: center; }
#pay-btn { width: 100%; padding: 15px; background-color: #f59e0b; color: #0f172a; border: none; border-radius: 8px; font-weight: bold; font-size: 1.1rem; cursor: pointer; transition: background 0.2s; }
#pay-btn:hover { background-color: #d97706; }
.payment-status { margin-top: 10px; font-size: 0.9rem; color: #38bdf8; }

.vip-hidden { display: none; }
.vip-visible { display: flex; flex-direction: column; gap: 25px; }
.vip-unlocked { border: 1px solid #f59e0b; }
.vip-action-btn { padding: 12px 24px; background-color: #38bdf8; color: #0f172a; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; }

@media (max-width: 900px) { .ad-sidebar { display: none; } }