/* ========================================
   iPhone 17 Pro Max Lucky Draw 
   LIGHT NEUMORPHISM SOFT DESIGN
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ----------------------------------------
   CSS VARIABLES - PREMIUM NEUMORPHISM
   ---------------------------------------- */
:root {
    /* Light Theme Base */
    --bg-primary: #e8eef3;
    --bg-secondary: #f0f4f8;
    --bg-white: #ffffff;

    /* Text Colors */
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-tertiary: #8888a0;
    --text-muted: #b0b0c0;

    /* Accent Colors */
    --accent-orange: #FF6B00;
    --accent-sunset: #FF8C00;
    --accent-gold: #FFB347;
    --accent-green: #00C853;

    /* Neumorphism Shadows */
    --shadow-light: -8px -8px 20px rgba(255, 255, 255, 0.9);
    --shadow-dark: 8px 8px 20px rgba(163, 177, 198, 0.5);
    --shadow-inset-light: inset -4px -4px 10px rgba(255, 255, 255, 0.8);
    --shadow-inset-dark: inset 4px 4px 10px rgba(163, 177, 198, 0.4);

    /* Gradients */
    --gradient-orange: linear-gradient(135deg, #FF6B00 0%, #FF8C00 50%, #FFB347 100%);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 40px;
}

/* ----------------------------------------
   RESET & BASE
   ---------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ----------------------------------------
   SOFT ANIMATED BACKGROUND
   ---------------------------------------- */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(135deg, #e8eef3 0%, #dce4ec 50%, #f0f4f8 100%);
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: floatOrb 25s ease-in-out infinite;
}

.bg-orb--1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.2) 0%, transparent 70%);
    top: -10%;
    left: -10%;
}

.bg-orb--2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.15) 0%, transparent 70%);
    top: 40%;
    right: -15%;
    animation-delay: -8s;
}

.bg-orb--3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 179, 71, 0.2) 0%, transparent 70%);
    bottom: -5%;
    left: 30%;
    animation-delay: -15s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(20px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-15px, 20px) scale(0.95);
    }
}

/* ----------------------------------------
   LAYOUT
   ---------------------------------------- */
.page-wrapper {
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ----------------------------------------
   HEADER (GLASSMORPHISM)
   ---------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 20px;
    background: rgba(232, 238, 243, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.header__inner {
    max-width: 440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header__name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.header__live {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 100px;
    box-shadow: 2px 2px 5px rgba(163, 177, 198, 0.2), -2px -2px 5px rgba(255, 255, 255, 0.5);
}

.header__live-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 1.5s ease-in-out infinite;
}

.header__live-text {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }
}

/* ----------------------------------------
   HERO & SHOWCASE
   ---------------------------------------- */
.hero {
    padding: 90px 0 20px;
    text-align: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--gradient-orange);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
}

.hero__title {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 8px;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.6);
}

.hero__subtitle {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-secondary);
}

.showcase {
    padding: 10px 0;
}

.showcase__card {
    border-radius: var(--radius-lg);
    padding: 30px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-light), var(--shadow-dark);
    position: relative;
    overflow: hidden;
}

.showcase__image {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
    animation: softFloat 4s ease-in-out infinite;
}

.showcase__info {
    text-align: center;
    margin-top: 25px;
}

.showcase__model {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.showcase__color {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-orange);
}

@keyframes softFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ----------------------------------------
   COMMON CARDS (NEUMORPHISM)
   ---------------------------------------- */
.video-card,
.specs__item,
.counter__card,
.form-card,
.share-card,
.success-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light), var(--shadow-dark);
    transition: all 0.3s ease;
}

/* Video */
.video-section {
    padding: 15px 0;
}

.video-card {
    padding: 16px;
}

.video-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.video-card video {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-inset-light), var(--shadow-inset-dark);
}

/* Specs */
.specs {
    padding: 15px 0;
}

.specs__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.specs__item {
    padding: 20px 14px;
    text-align: center;
    border-radius: var(--radius-md);
}

.specs__label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.specs__value {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

/* Counter */
.counter {
    padding: 15px 0;
}

.counter__card {
    padding: 24px;
    text-align: center;
}

.counter__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.counter__number {
    font-size: 52px;
    font-weight: 900;
    line-height: 1;
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.counter__text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-top: 6px;
}

/* ----------------------------------------
   FORMS & INPUTS
   ---------------------------------------- */
.form-section {
    padding: 15px 0;
}

.form-card {
    padding: 32px 24px;
}

.form-card__title {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    margin-left: 4px;
}

.form-input {
    width: 100%;
    padding: 18px 22px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    outline: none;
    box-shadow: var(--shadow-inset-light), var(--shadow-inset-dark);
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    box-shadow: var(--shadow-inset-light), var(--shadow-inset-dark), 0 0 0 2px rgba(255, 107, 0, 0.1);
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 20px;
    margin-top: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-orange);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.4), var(--shadow-light), var(--shadow-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(255, 107, 0, 0.5), var(--shadow-light);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-inset-light), var(--shadow-inset-dark);
}

/* ----------------------------------------
   SHARE SECTION
   ---------------------------------------- */
.share-section {
    padding: 15px 0;
}

.share-card {
    padding: 32px 24px;
    text-align: center;
}

.share-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: var(--shadow-light), var(--shadow-dark);
}

.share-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.share-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1), var(--shadow-light), var(--shadow-dark);
    transition: all 0.3s ease;
    position: relative;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn:active {
    transform: translateY(0);
}

.share-btn svg {
    width: 24px;
    height: 24px;
}

.share-btn--whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3), var(--shadow-light), var(--shadow-dark);
}

.share-btn--telegram {
    background: linear-gradient(135deg, #229ED9 0%, #0088CC 100%);
    box-shadow: 0 8px 20px rgba(34, 158, 217, 0.3), var(--shadow-light), var(--shadow-dark);
}

.share-btn--facebook {
    background: linear-gradient(135deg, #1877F2 0%, #1864D0 100%);
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3), var(--shadow-light), var(--shadow-dark);
}

.share-btn--messenger {
    background: linear-gradient(135deg, #00B2FF 0%, #006AFF 50%, #A033FF 100%);
    box-shadow: 0 8px 20px rgba(0, 106, 255, 0.3), var(--shadow-light), var(--shadow-dark);
}

/* Verifying State */
.share-btn.verifying {
    opacity: 0.9;
    cursor: wait;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Progress Bar */
.progress-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(163, 177, 198, 0.3);
}

.progress-bar {
    height: 14px;
    background: var(--bg-primary);
    border-radius: 100px;
    overflow: hidden;
    box-shadow: var(--shadow-inset-light), var(--shadow-inset-dark);
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-orange);
    border-radius: 100px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.4);
}

.progress-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Locked/Unlocked Button */
.lock-section {
    margin-top: 15px;
}

.btn-locked {
    background: var(--bg-primary);
    color: var(--text-muted);
    box-shadow: var(--shadow-inset-light), var(--shadow-inset-dark);
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-unlocked {
    animation: softBounce 1s infinite;
}

@keyframes softBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* Trust Badge */
.trust-badge {
    margin-top: 24px;
    padding: 14px;
    background: rgba(0, 200, 83, 0.04);
    border-radius: 16px;
    border: 1px solid rgba(0, 200, 83, 0.1);
    font-size: 12px;
    color: var(--accent-green);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ----------------------------------------
   SUCCESS STATE
   ---------------------------------------- */
.success-section {
    padding: 15px 0;
}

.success-card {
    padding: 40px 30px;
    text-align: center;
}

.success-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #00C853 0%, #00E676 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0, 200, 83, 0.4), var(--shadow-light), var(--shadow-dark);
}

.success-icon svg {
    width: 45px;
    height: 45px;
    color: #fff;
}

.success-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.success-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ----------------------------------------
   POPUPS (ELEGANT NOTIFICATION)
   ---------------------------------------- */
.popup {
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: auto;
    width: auto;
    max-width: 300px;

    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-radius: 14px;
    padding: 12px 16px 12px 12px;
    z-index: 1000;

    display: flex;
    align-items: center;
    gap: 10px;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.04);

    transform: translateX(-120%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.popup.show {
    transform: translateX(0);
    opacity: 1;
}

.popup__avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #FF6B00, #FF8C00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 2px 6px rgba(255, 107, 0, 0.2);
}

.popup__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0;
}

.popup__name {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup__action {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #636366;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.popup__action::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background-color: #34C759;
    border-radius: 50%;
}

/* "Just now" text - small and subtle */
.popup__time {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: #aeaeb2;
    line-height: 1;
    margin-top: 2px;
}

.popup__close {
    display: none;
}

@media (max-width: 480px) {
    .popup {
        bottom: 16px;
        left: 12px;
        max-width: 260px;
        padding: 10px 12px;
        border-radius: 12px;
    }

    .popup__avatar {
        width: 32px;
        height: 32px;
        font-size: 10px;
    }

    .popup__name {
        font-size: 12px;
    }

    .popup__action {
        font-size: 10px;
    }

    .popup__time {
        font-size: 9px;
    }
}

/* ----------------------------------------
   FOOTER
   ---------------------------------------- */
.footer {
    padding: 40px 0 120px;
    text-align: center;
}

.footer__divider {
    width: 60px;
    height: 4px;
    background: var(--text-muted);
    opacity: 0.2;
    margin: 0 auto 24px;
    border-radius: 100px;
}

.footer__link {
    color: var(--text-tertiary);
    margin: 0 10px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
}

.footer__brand {
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Utilities */
.hidden {
    display: none !important;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(120px + env(safe-area-inset-bottom));
    }

    .popup {
        bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* ----------------------------------------
   LOADING OVERLAY
   ---------------------------------------- */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(232, 238, 243, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-overlay.hidden {
    display: none !important;
}

.loading-content {
    text-align: center;
    padding: 40px;
    max-width: 320px;
}

.loading-spinner {
    width: 70px;
    height: 70px;
    margin: 0 auto 24px;
    border: 4px solid rgba(255, 107, 0, 0.15);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
}

@keyframes loadingSpin {
    to {
        transform: rotate(360deg);
    }
}

.loading-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.loading-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-light), var(--shadow-dark);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.loading-step.active {
    opacity: 1;
}

.loading-step .step-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-orange);
    border-radius: 50%;
    font-size: 14px;
    color: #fff;
}

.loading-step .step-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}