/* ===== ROOT & VARIABLES ===== */
:root {
    --gold: #FFD700;
    --gold-dark: #B8860B;
    --orange: #FF8C00;
    --dark-bg: #0d0d0f;
    --glass-bg: rgba(20, 20, 25, 0.7);
    --glass-border: rgba(255, 215, 0, 0.2);
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --red-btn: #e62429;
    --red-btn-hover: #c21a1f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

/* ===== VIDEO BACKGROUND ===== */
.video-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-color: var(--dark-bg); /* Fallback */
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(13, 13, 15, 0.8) 0%, rgba(13, 13, 15, 0.95) 100%);
    z-index: -1;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-img {
    height: 50px; 
    width: auto;
    object-fit: contain;
    transform: scale(2.2); /* Dikecilkan sedikit dari 2.5 agar tidak menabrak batas atas/bawah */
    transform-origin: left center; 
    margin-top: 5px; /* Menggunakan angka positif untuk mendorongnya turun sedikit ke tengah */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    transition: 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold);
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gold);
}

/* ===== GENERAL SECTIONS ===== */
.section {
    padding: 100px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }

.section-title {
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.gold-text {
    background: linear-gradient(90deg, var(--gold), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== HOME SECTION ===== */
.home-section {
    position: relative;
    text-align: center;
}

.hero-title {
    font-size: 60px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-generate, .btn-download, .btn-share, .btn-discord, .btn-roblox {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--gold), var(--orange));
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.6);
}

.btn-generate {
    width: 100%;
    background: var(--red-btn);
    color: white;
    margin-top: 20px;
}

.btn-generate:hover { background: var(--red-btn-hover); }

.btn-download {
    background: white;
    color: black;
}
.btn-download:disabled { background: #555; color: #888; cursor: not-allowed; }

.btn-share {
    background: var(--red-btn);
    color: white;
}
.btn-share:disabled { background: #555; color: #888; cursor: not-allowed; }

.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.btn-discord { background: #5865F2; color: white; }
.btn-roblox { background: #111; color: white; border: 1px solid #333; display: flex; align-items: center; gap: 10px;}
.btn-small { padding: 8px 15px; font-size: 12px; }

/* ===== GLASSMORPHISM ===== */
.glass-panel, .glass-section .container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* ===== AVATAR STORY ===== */
.avatar-section {
    align-items: flex-start;
    padding-top: 120px;
}

.story-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.panel-title {
    font-size: 20px;
    font-style: italic;
    margin-bottom: 5px;
}

.panel-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.input-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

.input-wrapper input:focus {
    border-color: var(--gold);
}

/* User Info Card */
.user-info-card {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    gap: 15px;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    background-color: #333;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.user-details h4 { font-size: 14px; margin-bottom: 2px; }
.user-details p { font-size: 11px; color: var(--text-muted); }

.status-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dot {
    width: 6px;
    height: 6px;
    background: #4CAF50;
    border-radius: 50%;
}

/* Instructions */
.instructions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.instructions h4 {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.instructions ul { list-style: none; }
.instructions li {
    font-size: 13px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #ccc;
}

.step-num {
    background: rgba(255,255,255,0.1);
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    flex-shrink: 0;
}

/* Phone Mockup */
.story-right {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
    justify-content: center;
}

.phone-mockup {
    width: 300px; /* Ukuran display di web */
    height: 533px; /* Aspek rasio 9:16 dari 300px */
    background: #000;
    border-radius: 30px;
    padding: 10px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    border: 2px solid #333;
}

.phone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #000;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #111;
}

#story-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.canvas-loading {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.spinner {
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid var(--gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

/* ===== SCHEDULE ===== */
.admin-panel {
    background: rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-panel input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--glass-border);
    background: #222;
    color: white;
}

.schedule-list {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.schedule-item {
    background: rgba(255,255,255,0.05);
    border-left: 4px solid var(--gold);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-date {
    color: var(--gold);
    font-weight: 700;
    font-size: 18px;
}

.schedule-name {
    font-size: 20px;
    font-weight: 700;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 20px;
    background: rgba(0,0,0,0.8);
    color: var(--text-muted);
    font-size: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(10,10,12,0.95);
        width: 100%;
        text-align: center;
        padding: 20px 0;
        transition: 0.3s;
    }
    .nav-menu.active { left: 0; }
    .menu-toggle { display: block; }
    
    .hero-title { font-size: 40px; }
    
    .story-grid { grid-template-columns: 1fr; }
    .btn-group { flex-direction: column; }
    
    .schedule-item { flex-direction: column; text-align: center; gap: 10px; }
}
