/* ========================================
   WCity Landing Page - Coming Soon
   ======================================== */

:root {
    --color-bg-primary: #0f172a;
    --color-bg-secondary: #1e1b4b;
    --color-bg-tertiary: #1e293b;
    --color-accent: #38bdf8;
    --color-accent-glow: rgba(56, 189, 248, 0.5);
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-text-muted: rgba(255, 255, 255, 0.4);
}

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

html {
    width: 100%;
    height: 100%;
    /* CRITICAL: Same as theme-color for Safari/Chrome status bar */
    background-color: #0f172a;
}

body {
    width: 100%;
    min-height: 100%;
    min-height: 100dvh;
    /* Dynamic viewport height for mobile */
    overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    /* Same background-color for overscroll protection */
    background-color: #0f172a;
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-primary) 50%, var(--color-bg-tertiary) 100%);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Safe area for iOS notch and home indicator */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ========================================
   Background Animation
   ======================================== */
.background-animation {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float1 8s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    animation: float2 10s ease-in-out infinite;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float3 6s ease-in-out infinite;
}

@keyframes float1 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-30px, 30px);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(40px, -20px);
    }
}

@keyframes float3 {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* ========================================
   Info Button (Top Right)
   ======================================== */
.info-button {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-button span {
    color: var(--color-accent);
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
}

.info-button:hover {
    background: var(--color-accent);
    box-shadow: 0 0 20px var(--color-accent-glow);
    transform: scale(1.1);
}

.info-button:hover span {
    color: var(--color-bg-primary);
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid var(--color-accent);
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.2);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-accent);
}

.modal h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-accent);
}

.modal p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.modal ul {
    list-style: none;
    margin-bottom: 20px;
}

.modal li {
    padding: 8px 0;
    color: var(--color-text-secondary);
    font-size: 15px;
}

.modal-section {
    margin-top: 8px;
    margin-bottom: 8px;
}

.modal-section strong {
    color: var(--color-accent);
}

.modal-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--color-text-muted);
    font-size: 14px;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 24px;
}

/* Logo */
.logo-container {
    margin-bottom: 60px;
}

.logo {
    font-size: clamp(48px, 12vw, 96px);
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 12px;
}

.logo-w {
    color: var(--color-accent);
    text-shadow: 0 0 30px var(--color-accent-glow);
}

.logo-n {
    color: #a78bfa;
    text-shadow: 0 0 30px rgba(167, 139, 250, 0.5);
}

.logo-c {
    color: var(--color-text-primary);
}

.tagline {
    font-size: clamp(14px, 3vw, 18px);
    color: var(--color-text-muted);
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Coming Soon Section */
.coming-soon {
    position: relative;
    display: inline-block;
    margin-bottom: 60px;
}

.coming-text {
    font-size: clamp(24px, 6vw, 42px);
    font-weight: 600;
    letter-spacing: 8px;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--color-accent), #a78bfa, var(--color-accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s linear infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 200%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    opacity: 0;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Progress Section */
.progress-section {
    max-width: 400px;
    margin: 0 auto;
}

.progress-bar {
    height: 4px;
    background: rgba(56, 189, 248, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    width: 75%;
    background: linear-gradient(90deg, var(--color-accent), #a78bfa);
    border-radius: 2px;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: scan 2s ease-in-out infinite;
}

@keyframes scan {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

.progress-text {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 300;
}

/* ========================================
   Decorative Lines
   ======================================== */
.decorative-lines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.h-line,
.v-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.2), transparent);
}

.h-line {
    height: 1px;
    width: 100%;
}

.v-line {
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.2), transparent);
}

.line-1 {
    top: 15%;
}

.line-2 {
    bottom: 15%;
}

.line-3 {
    left: 10%;
}

.line-4 {
    right: 10%;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 640px) {
    .info-button {
        width: 40px;
        height: 40px;
        top: 16px;
        right: 16px;
    }

    .info-button span {
        font-size: 20px;
    }

    .modal {
        padding: 24px;
    }

    .modal h2 {
        font-size: 20px;
    }

    .tagline {
        letter-spacing: 2px;
    }

    .coming-text {
        letter-spacing: 4px;
    }
}

/* ========================================
   Pull to Refresh
   ======================================== */
.pull-to-refresh {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    z-index: 1000;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ptr-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(56, 189, 248, 0.3);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pull-to-refresh.ready .ptr-spinner {
    border-top-color: #a78bfa;
}

.pull-to-refresh.refreshing .ptr-spinner {
    opacity: 1;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Preview Section in Modal
   ======================================== */
.preview-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin: 16px 0 8px 0;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    color: var(--color-accent);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-toggle:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--color-accent);
}

.preview-toggle-icon {
    transition: transform 0.3s ease;
    font-size: 10px;
}

.preview-toggle.active .preview-toggle-icon {
    transform: rotate(180deg);
}

.preview-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.preview-section.active {
    max-height: 400px;
    opacity: 1;
    margin-bottom: 16px;
}

.preview-main {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: transparent;
    cursor: pointer;
}

.preview-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.preview-main:hover img {
    transform: scale(1.02);
}

.preview-main.transitioning img {
    opacity: 0.5;
}

.preview-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.preview-carousel::-webkit-scrollbar {
    display: none;
}

.preview-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.preview-thumb:hover {
    opacity: 1;
}

.preview-thumb.active {
    border-color: var(--color-accent);
    opacity: 1;
}

.preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fullscreen preview */
.preview-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.preview-fullscreen.active {
    opacity: 1;
    visibility: visible;
}

.preview-fullscreen img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.preview-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.preview-fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.2);
}