/* ==========================================================================
   Wasit Futsal - Design System & Custom Stylesheet
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-darker: #080a0c;
    --bg-dark: #0f1319;
    --bg-surface: rgba(22, 28, 36, 0.75);
    --bg-surface-hover: rgba(30, 38, 48, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(212, 255, 0, 0.3);
    
    /* Neon Referee Colors */
    --accent-neon: #d4ff00; /* Neon yellow/lime */
    --accent-neon-glow: rgba(212, 255, 0, 0.4);
    --accent-red: #ff3838;
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows & Blur */
    --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --glass-blur: blur(16px);
}

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

html, body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(212, 255, 0, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 240, 255, 0.02) 0%, transparent 40%);
}

/* Typography */
h1, h2, h3, h4, h5, h6, .font-display {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: #272e3f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-neon);
}

/* App Layout Grid */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Sticky Header */
.site-header {
    background-color: rgba(8, 10, 12, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-fast);
}

.site-header.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    background-color: rgba(8, 10, 12, 0.95);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.site-header.scrolled .header-inner {
    padding: 0.75rem 2rem;
}

/* Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-neon), #8cc600);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--accent-neon-glow);
}

.brand-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--bg-darker);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Badge Indicator */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(212, 255, 0, 0.08);
    border: 1px solid var(--border-color-glow);
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-neon);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-pulse {
    width: 6px;
    height: 6px;
    background-color: var(--accent-neon);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-neon);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(212, 255, 0, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(212, 255, 0, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(212, 255, 0, 0);
    }
}

/* Main Content Area */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Welcome Hero Card */
.hero-card {
    background-color: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 255, 0, 0.02));
    pointer-events: none;
}

.hero-text h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.hero-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 700px;
}

/* Interactive Action Buttons */
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--accent-neon);
    color: var(--bg-darker);
    border: none;
    box-shadow: 0 4px 15px rgba(212, 255, 0, 0.2);
}

.btn-primary:hover {
    background-color: #e5ff54;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 255, 0, 0.35);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

/* Flipbook Display Container */
.flipbook-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flipbook-container {
    background-color: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    position: relative;
}

.flipbook-container:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* The Embed Frame */
.embed-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 14px;
    overflow: hidden;
    background-color: #0c0e12;
    border: 1px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.embed-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    transition: var(--transition-smooth);
}

/* Custom Tool Bar above Frame */
.control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-title svg {
    fill: var(--accent-neon);
    width: 18px;
    height: 18px;
}

.control-btn {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.control-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Mobile Alert / Notice */
.mobile-notice {
    display: none;
    background: linear-gradient(135deg, rgba(212, 255, 0, 0.05), rgba(8, 10, 12, 0.1));
    border: 1px solid var(--border-color-glow);
    border-radius: 14px;
    padding: 1rem;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.mobile-notice svg {
    fill: var(--accent-neon);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.mobile-notice strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.15rem;
}

/* Footer Section */
.site-footer {
    border-top: 1px solid var(--border-color);
    background-color: #06080a;
    padding: 2.5rem 2rem;
    margin-top: auto;
    text-align: center;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer-credits {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-neon);
}

/* ==========================================================================
   Cinema Mode Overlay (JS triggered)
   ========================================================================== */
body.cinema-active {
    overflow: hidden;
}

body.cinema-active .site-header,
body.cinema-active .hero-card,
body.cinema-active .site-footer,
body.cinema-active .control-title {
    opacity: 0;
    pointer-events: none;
}

body.cinema-active .flipbook-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    border-radius: 0;
    background-color: #050608;
    padding: 0;
    border: none;
}

body.cinema-active .embed-wrapper {
    height: 100vh;
    padding-bottom: 0;
    border-radius: 0;
    border: none;
}

body.cinema-active .control-bar {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    margin-bottom: 0;
    background: rgba(8, 10, 12, 0.85);
    backdrop-filter: var(--glass-blur);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .embed-wrapper {
        padding-bottom: 60%; /* Taller on tablets */
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 1rem;
    }
    .main-content {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }
    .hero-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    .hero-actions {
        width: 100%;
    }
    .btn {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
    .embed-wrapper {
        padding-bottom: 75%; /* Taller ratio for mobile devices */
    }
    .mobile-notice {
        display: flex;
    }
}

@media (max-width: 480px) {
    .brand-subtitle {
        display: none;
    }
    .badge {
        padding: 0.25rem 0.5rem;
    }
    .embed-wrapper {
        padding-bottom: 120%; /* Portrait-focused aspect ratio for tiny mobile screens */
    }
}
