/* =============================================
   Azaleainstyle — Custom Stylesheet
   =============================================
   Design System:
   - Dark theme (surface-900 base)
   - Brand gradient: Purple → Rose
   - Glassmorphism cards
   - CSS Scroll Snap for Reels
   ============================================= */

/* ---- Base Reset & Global ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    background-color: #0F0F1A;
    color: #ffffff;
}

/* ---- Scrollbar Styling ---- */
::-webkit-scrollbar {
    width: 4px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #6C2BD9, #E91E8C);
    border-radius: 10px;
}

/* ---- Brand Gradient Text ---- */
.gradient-text {
    background: linear-gradient(135deg, #a78bfa 0%, #E91E8C 50%, #6C2BD9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Gradient Background ---- */
.gradient-bg {
    background: linear-gradient(135deg, #6C2BD9 0%, #E91E8C 100%);
}

.gradient-bg-subtle {
    background: linear-gradient(135deg, rgba(108, 43, 217, 0.15) 0%, rgba(233, 30, 140, 0.15) 100%);
}

/* ---- Glassmorphism Card ---- */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ---- Glassmorphism Navbar ---- */
.glass-nav {
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- Buttons ---- */
.btn-primary {
    background: linear-gradient(135deg, #6C2BD9 0%, #E91E8C 100%);
    color: white;
    padding: 12px 32px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #7c3aed 0%, #f472b6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108, 43, 217, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    padding: 12px 32px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

/* ---- Google Login Button ---- */
.btn-google {
    background: #ffffff;
    color: #1f2937;
    padding: 14px 40px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-google:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
    background: #f3f4f6;
}

.btn-google img {
    width: 22px;
    height: 22px;
}

/* =============================================
   REELS LAYOUT — CSS Scroll Snap
   ============================================= */

.reels-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.reel-item {
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0a0a14;
}

/* Video di dalam reel */
.reel-item video,
.reel-item iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Overlay gradient atas & bawah */
.reel-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        transparent 20%,
        transparent 60%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 2;
}

/* Info di bagian bawah reel */
.reel-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px 80px; /* Padding bawah ditambah agar tidak tertutup nav */
    z-index: 3;
    pointer-events: auto;
}

.reel-info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.reel-info p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Action buttons (like, share, dll) di sisi kanan */
.reel-actions {
    position: absolute;
    right: 16px;
    bottom: 140px; /* Digeser ke atas agar tidak tertutup nav */
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.reel-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.reel-action-btn:hover {
    transform: scale(1.15);
}

.reel-action-btn .icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.reel-action-btn:hover .icon {
    background: rgba(255, 255, 255, 0.2);
}

.reel-action-btn.liked .icon {
    background: rgba(233, 30, 140, 0.3);
    color: #E91E8C;
}

.reel-action-btn .count {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Progress indicator dots */
.reel-progress {
    position: fixed;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reel-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.reel-dot.active {
    height: 20px;
    border-radius: 3px;
    background: linear-gradient(to bottom, #6C2BD9, #E91E8C);
}

/* =============================================
   DASHBOARD STYLES
   ============================================= */

/* Stat Card */
.stat-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Points display */
.points-value {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a78bfa 0%, #E91E8C 50%, #f9a8d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

/* Points pulse animation */
.points-pulse {
    animation: pointsPulse 2s ease-in-out infinite;
}

@keyframes pointsPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* QR Code container */
.qr-container {
    background: white;
    border-radius: 20px;
    padding: 24px;
    display: inline-block;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.qr-container:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 50px rgba(108, 43, 217, 0.3);
}

/* Avatar */
.avatar-ring {
    background: linear-gradient(135deg, #6C2BD9, #E91E8C, #f472b6);
    padding: 3px;
    border-radius: 50%;
    display: inline-block;
}

.avatar-ring img {
    border-radius: 50%;
    border: 3px solid #0F0F1A;
    display: block;
}

/* Transaction history */
.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s ease;
}

.transaction-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.transaction-add {
    color: #34d399;
}

.transaction-deduct {
    color: #f87171;
}

/* =============================================
   LOGIN PAGE
   ============================================= */

.login-bg {
    background: radial-gradient(ellipse at 20% 50%, rgba(108, 43, 217, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(233, 30, 140, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(167, 139, 250, 0.08) 0%, transparent 50%),
                #0F0F1A;
    min-height: 100vh;
}

/* Floating orbs animation */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: floatOrb 8s ease-in-out infinite;
    pointer-events: none;
}

.floating-orb:nth-child(1) {
    width: 300px;
    height: 300px;
    background: rgba(108, 43, 217, 0.2);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-orb:nth-child(2) {
    width: 200px;
    height: 200px;
    background: rgba(233, 30, 140, 0.15);
    top: 60%;
    right: 15%;
    animation-delay: -3s;
}

.floating-orb:nth-child(3) {
    width: 250px;
    height: 250px;
    background: rgba(167, 139, 250, 0.12);
    bottom: 10%;
    left: 30%;
    animation-delay: -5s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 10px) scale(1.02); }
}

/* =============================================
   ANIMATIONS
   ============================================= */

/* Fade in up */
.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

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

/* Stagger animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Shimmer loading */
.shimmer {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.03) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.03) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Glow effect */
.glow {
    box-shadow: 0 0 30px rgba(108, 43, 217, 0.3), 0 0 60px rgba(233, 30, 140, 0.15);
}

/* =============================================
   LOGIN TABS
   ============================================= */

.login-tab {
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.3s ease;
}

.login-tab.active {
    background: linear-gradient(135deg, rgba(108, 43, 217, 0.3) 0%, rgba(233, 30, 140, 0.3) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 43, 217, 0.2);
}

.login-tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

/* =============================================
   OTP PIN INPUT
   ============================================= */

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Outfit', monospace;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    outline: none;
    transition: all 0.2s ease;
    caret-color: #E91E8C;
}

.otp-input:focus {
    border-color: #6C2BD9;
    background: rgba(108, 43, 217, 0.1);
    box-shadow: 0 0 20px rgba(108, 43, 217, 0.2);
    transform: translateY(-2px);
}

.otp-input:not(:placeholder-shown) {
    border-color: rgba(233, 30, 140, 0.4);
    background: rgba(233, 30, 140, 0.08);
}

/* =============================================
   PHONE VERIFIED BADGE
   ============================================= */

.phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.phone-badge.verified {
    background: rgba(34, 197, 94, 0.12);
    color: #34d399;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.phone-badge.unverified {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* =============================================
   NEWS DRAWER / MODAL
   ============================================= */

.news-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 8px 16px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.news-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 30, 140, 0.3);
}

.news-drawer {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 85%;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px 24px 0 0;
    z-index: 200;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.news-drawer.open {
    bottom: 0;
}

.news-drawer-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-drawer-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.news-drawer-close:hover {
    color: white;
}

.news-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.news-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
}

.news-media {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    background: #000;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .points-value {
        font-size: 2.5rem;
    }

    .reel-actions {
        right: 12px;
        bottom: 100px;
        gap: 16px;
    }

    .reel-action-btn .icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 20px;
    }

    .glass-card {
        border-radius: 16px;
    }

    .btn-primary, .btn-secondary {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    .otp-input {
        width: 42px;
        height: 50px;
        font-size: 1.3rem;
        border-radius: 12px;
    }
}
