:root {
    /* CASINO THEME COLOR PSYCHOLOGY */
    /* Primary Gold - Trust, Wealth, Premium */
    --gold: #D4AF37;
    --gold-hover: #b5952f;
    --gold-glow: rgba(212, 175, 55, 0.3);
    
    /* Primary Emerald Green - Safety, Money, Security */
    --emerald-dark: #061f14;
    --emerald-mid: #0a3320;
    --emerald-light: #124d33;
    
    /* Backgrounds - Charcoal/Navy Black */
    --bg-main: #0B0C10;
    --bg-card: #151821;
    --bg-card-hover: #1c202b;
    --border: #2a2d3d;
    --border-gold: rgba(212, 175, 55, 0.4);
    
    /* Text */
    --text-light: #F5F6FA;
    --text-muted: #A0A5B5;
    
    /* System */
    --success: #00E676;
    --whatsapp: #25D366;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand-name { font-family: 'Playfair Display', serif; }

.hidden { display: none !important; }
.gold-text { color: var(--gold); }

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    transition: var(--transition);
}

.large-btn { padding: 16px 36px; font-size: 17px; }
.small-btn { padding: 8px 16px; font-size: 13px; }

.gold-btn {
    background: linear-gradient(135deg, #FADB5F, #D4AF37);
    color: #111;
    box-shadow: 0 4px 20px var(--gold-glow);
}

.gold-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px var(--gold-glow);
    filter: brightness(1.1);
}

.outline-btn {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.outline-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

/* ===================== LANDING NAV ===================== */
.landing-nav, .builder-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}

.brand-accent { color: var(--gold); }

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--gold); }

/* ===================== HERO SECTION ===================== */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, var(--emerald-mid) 0%, var(--bg-main) 70%);
    padding: 40px 5%;
    position: relative;
    overflow: hidden;
}

/* Grid pattern overlay */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease;
}

.header-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-guarantee {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===================== SECTIONS COMMON ===================== */
.section {
    padding: 100px 5%;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 16px;
}

.section-desc {
    text-align: center;
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 60px;
}

/* ===================== ABOUT (FEATURES) ===================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===================== HOW IT WORKS ===================== */
.how-it-works-section {
    background: var(--emerald-dark);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
}

.landing-step {
    padding: 20px;
}

.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.landing-step h4 { font-size: 20px; margin-bottom: 12px; }
.landing-step p { font-size: 14px; color: var(--text-muted); }

/* ===================== PRICING ===================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
}

.premium-card {
    border-color: var(--gold);
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--emerald-mid) 100%);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: #111;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

.pricing-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.price {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 30px;
}

.price .period {
    font-size: 16px;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    margin-bottom: 40px;
}

.pricing-features li {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.pricing-card .btn { width: 100%; }

/* ===================== BOTTOM CTA & FOOTER ===================== */
.cta-section {
    text-align: center;
    background: linear-gradient(0deg, var(--emerald-dark) 0%, var(--bg-main) 100%);
}

.cta-section h2 { font-size: 36px; margin-bottom: 16px; }
.cta-section p { color: var(--text-muted); margin-bottom: 30px; }

.landing-footer {
    border-top: 1px solid var(--border);
    padding: 60px 5% 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 10px;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-links h4 { margin-bottom: 20px; font-size: 16px; }
.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 14px;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--gold); }

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}


/* ===================== BUILDER UI ===================== */
#builder-ui {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-main);
}

.builder-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.builder-container .header { text-align: center; margin-bottom: 48px; }
.builder-container .header h1 { font-size: 40px; margin-bottom: 16px; }
.builder-container .header p { color: var(--text-muted); }

.nav-actions { display: flex; align-items: center; gap: 15px; }
.nav-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid var(--border-gold);
    padding: 5px 12px;
    border-radius: 30px;
}

/* API Card */
.api-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
}
.api-card-header { display: flex; gap: 16px; margin-bottom: 20px; }
.api-icon { font-size: 28px; }
.api-card-header h3 { font-size: 16px; color: var(--text-light); }
.api-card-header p { font-size: 13px; color: var(--text-muted); }
.api-card-header a { color: var(--gold); text-decoration: none; }

.input-group { display: flex; gap: 12px; flex-direction: column;}
.api-card .input-group { flex-direction: row; }
.input-group input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}
.input-group input:focus { border-color: var(--gold); }
.input-group label { font-size: 13px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }

.api-status { margin-top: 12px; font-size: 13px; font-weight: 600; padding: 8px; border-radius: 8px; }
.api-status.success { color: var(--success); background: rgba(0, 230, 118, 0.1); }
.api-status.error { color: #ff5252; background: rgba(255, 82, 82, 0.1); }

/* Scene List */
.scene-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    margin-bottom: 24px;
    transition: var(--transition);
}
.scene-item:hover { border-color: var(--border-gold); }

.scene-number {
    font-size: 11px; font-weight: 700; color: var(--gold);
    text-transform: uppercase; margin-bottom: 18px;
}

.remove-scene-btn {
    position: absolute; top: 18px; right: 18px;
    background: var(--bg-main); border: 1px solid var(--border);
    color: var(--text-muted); width: 32px; height: 32px;
    border-radius: 8px; cursor: pointer; transition: var(--transition);
}
.remove-scene-btn:hover { background: rgba(212, 175, 55, 0.1); border-color: var(--gold); color: var(--gold); }

.file-drop-area {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 36px 24px; border: 2px dashed var(--border); border-radius: 12px;
    background: var(--bg-main); cursor: pointer; gap: 8px; text-align: center;
    transition: var(--transition);
}
.file-drop-area:hover { border-color: var(--gold); background: rgba(212, 175, 55, 0.05); }
.file-icon { font-size: 32px; }
.file-msg { font-size: 14px; color: var(--text-muted); }
.file-hint { font-size: 12px; color: var(--text-muted); opacity: 0.7; }
.scene-image { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-preview { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; margin-top: 4px; border: 1px solid var(--border); }

.actions { display: flex; justify-content: space-between; margin-top: 40px; margin-bottom: 60px; }

/* Upload Overlay & Modals */
#share-modal, #paywall-modal, #upload-overlay {
    position: fixed; inset: 0; z-index: 999;
    display: flex; align-items: center; justify-content: center;
}
#share-modal.hidden, #paywall-modal.hidden, #upload-overlay.hidden {
    display: none !important;
}
.modal-overlay {
    position: absolute; inset: 0; background: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(12px); z-index: 1;
}
.upload-box, .modal-box {
    position: relative; z-index: 2;
    background: var(--bg-card); border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg); padding: 48px 40px; text-align: center;
    max-width: 480px; width: 90%; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.progress-bar-outer { width: 100%; height: 6px; background: var(--border); border-radius: 100px; overflow: hidden; margin: 16px 0; }
.progress-bar-inner { height: 100%; background: linear-gradient(90deg, #FADB5F, #D4AF37); border-radius: 100px; width: 0%; transition: width 0.4s; }

.link-box { display: flex; gap: 10px; background: var(--bg-main); border: 1px solid var(--border); border-radius: 8px; padding: 4px 4px 4px 12px; margin-bottom: 20px; align-items: center; }
.link-box input { flex: 1; background: transparent; border: none; color: var(--text-muted); outline: none; }
.share-btns { display: flex; gap: 12px; margin-bottom: 20px; }
.share-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 600; text-decoration: none; border: none; }
.whatsapp-btn { background: var(--whatsapp); color: white; }
.preview-btn { background: var(--bg-main); color: var(--text-light); border: 1px solid var(--border); }

/* ===================== VIEWER UI ===================== */
#viewer-ui { width: 100%; height: 100vh; position: relative; background: #000; }
#panorama { width: 100%; height: 100%; }
#viewer-controls { position: absolute; top: 0; left: 0; right: 0; z-index: 100; display: flex; justify-content: space-between; padding: 16px 20px; background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent); pointer-events: none; }
#viewer-controls .btn { pointer-events: all; }
.floating-btn { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); padding: 10px 18px; border-radius: 30px; backdrop-filter: blur(10px); }
.viewer-title { font-size: 15px; font-weight: 700; color: white; }
.room-nav { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; gap: 10px; background: rgba(0,0,0,0.6); padding: 10px 16px; border-radius: 40px; backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.12); }
.room-nav-btn { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.7); padding: 8px 16px; border-radius: 30px; cursor: pointer; }
.room-nav-btn.active { background: var(--gold); border-color: var(--gold); color: #111; }
.toast { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%); background: var(--success); color: #111; padding: 12px 24px; border-radius: 30px; z-index: 200; font-weight: 600; }

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

/* Mobile */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-actions { flex-direction: column; }
    .actions { flex-direction: column; }
    .actions .btn { width: 100%; }
}
