/* ==========================================
   GameZone — Main Stylesheet
   Full Upgrade v2.0
   Brand: GameZone | gamezona.pages.dev
   ========================================== */

/* ---------- CSS VARIABLES ---------- */
:root {
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --secondary: #8B5CF6;
    --accent: #EC4899;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --dark: #0F172A;
    --darker: #020617;
    --light: #F8FAFC;
    --gray: #64748B;
    --gray-light: #CBD5E1;
    --bg: #F1F5F9;
    --card-bg: #FFFFFF;
    --shadow: 0 4px 20px rgba(99, 102, 241, 0.12);
    --shadow-lg: 0 10px 40px rgba(99, 102, 241, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --radius: 14px;
    --radius-lg: 20px;
    --radius-sm: 8px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

input, textarea {
    font-family: inherit;
}

ul {
    list-style: none;
}

/* ---------- LOADING SCREEN ---------- */
.loading-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--darker), var(--dark));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-logo {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.5rem;
}

.loading-logo .letter-G,
.loading-logo .letter-Z {
    font-size: 3.2rem;
    font-weight: 900;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.loading-logo .connector {
    width: 12px;
    height: 12px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 50%;
    margin: 0 -4px;
}

.loading-text {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

.dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(99, 102, 241, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ---------- HEADER & NAVIGATION ---------- */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

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

/* Logo — G Z connected */
.logo {
    display: flex;
    align-items: center;
    gap: 0;
    font-weight: 900;
    font-size: 1.5rem;
}

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

.logo .connector-bar {
    width: 10px;
    height: 10px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 50%;
    margin: 0 -3px;
}

.logo .Z {
    color: var(--accent);
}

.logo .rest-name {
    color: var(--dark);
    opacity: 0.9;
}

/* Hamburger Menu */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    padding: 6px 4px;
    z-index: 600;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* Navigation Menu */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 5rem 1.5rem 2rem;
    transition: right 0.35s ease;
    z-index: 550;
    overflow-y: auto;
}

.nav-menu.active {
    right: 0;
}

.nav-menu a {
    padding: 0.9rem 1rem;
    color: var(--dark);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-menu a:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    padding-left: 1.25rem;
}

.nav-menu .signup-btn {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white !important;
    text-align: center;
    margin-top: 0.5rem;
}

.nav-menu .signup-btn:hover {
    padding-left: 1rem;
    transform: scale(1.02);
}

.nav-menu .user-display {
    padding: 1rem;
    color: var(--gray);
    font-size: 0.95rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
}

.nav-menu .logout-link {
    color: var(--danger);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 499;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* ---------- MAIN CONTENT WRAPPER ---------- */
.content {
    padding-top: 80px;
    min-height: calc(100vh - 60px);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid #E5E7EB;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

/* ---------- FORM ELEMENTS ---------- */
.form-container {
    max-width: 440px;
    margin: 2rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.form-container h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.form-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--gray);
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary);
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 5px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-text {
    font-size: 0.85rem;
    color: var(--gray);
}

.password-requirements {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.25rem;
}

.requirement {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.requirement.passed {
    color: var(--success);
}

.requirement::before {
    content: '◡';
}

.requirement.passed::before {
    content: '✓';
    font-weight: bold;
}

.form-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--gray);
}

.form-link a {
    color: var(--primary);
    font-weight: 600;
}

.error-message {
    background: #FEF2F2;
    color: var(--danger);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--danger);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.success-message {
    background: #F0FDF4;
    color: #166534;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--success);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* ---------- HERO SECTION ---------- */
.hero {
    text-align: center;
    padding: 2rem 0 3rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--dark);
    margin-bottom: 1rem;
}

.hero h1 span {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- CAROUSEL / SLIDER ---------- */
.carousel-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

.carousel-slide {
    min-width: 100%;
    padding: 1px;
}

.carousel-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 240px;
}

.carousel-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    z-index: 10;
    color: var(--primary);
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    padding: 0;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* ---------- GAMES GRID ---------- */
.games-section {
    margin-bottom: 3.5rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

.game-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(99, 102, 241, 0.06);
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.15);
}

.game-thumbnail {
    height: 160px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.game-info {
    padding: 1.25rem;
}

.game-info h3 {
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.game-info p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.game-play-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.game-play-btn:hover {
    opacity: 0.92;
    color: white;
}

/* ---------- FOOTER ---------- */
footer {
    background: white;
    border-top: 1px solid rgba(99, 102, 241, 0.08);
    padding: 1.5rem 1rem;
    text-align: center;
    margin-top: auto;
}

footer p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
@media (min-width: 576px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .nav-menu {
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        padding: 0;
        box-shadow: none;
        background: transparent;
        gap: 0.3rem;
    }
    .hamburger, .menu-overlay {
        display: none;
    }
    .nav-menu a, .nav-menu .user-display {
        padding: 0.6rem 0.9rem;
        margin: 0;
    }
    .nav-menu a:hover {
        padding: 0.6rem 0.9rem;
    }
    .form-container {
        margin: 3rem auto;
        padding: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575px) {
    .logo {
        font-size: 1.3rem;
    }
    .form-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    .carousel-card {
        padding: 2rem 1.25rem;
        min-height: 200px;
    }
    .carousel-card h3 {
        font-size: 1.3rem;
    }
}

/* ---------- UTILITY CLASSES ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.w-full { width: 100%; }

