/* 
   FOOTBALL VISUALS PLATFORM - ELITE DESIGN SYSTEM 
   Theme: Minimalist, Futuristic, Studio-Grade
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    /* Color Palette */
    --color-bg: #050505;
    --color-bg-secondary: #0a0a0a;
    --color-text: #FFFFFF;
    --color-text-muted: #888888;
    --color-accent: #00F0FF;
    /* Electric Blue */
    --color-accent-dim: rgba(0, 240, 255, 0.1);
    --color-border: #1a1a1a;

    /* Spacing */
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Typography */
    --font-main: 'Inter', sans-serif;

    /* Animation */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* PWA Safe Area Support */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s var(--ease-out-expo);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* TYPOGRAPHY UTILITIES */
.display-text {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 0.95;
    text-transform: uppercase;
}

.text-hero {
    font-size: clamp(3rem, 10vw, 8rem);
}

.text-h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.text-h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.text-body {
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

.text-small {
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

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

/* LAYOUT UTILITIES */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.grid {
    display: grid;
    gap: var(--space-md);
}

.flex {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.section {
    padding: var(--space-xl) 0;
}

/* COMPONENTS */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid var(--color-text);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-text);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out-expo);
    z-index: -1;
}

.btn:hover {
    color: var(--color-bg);
    border-color: var(--color-text);
}

.btn:hover::before {
    transform: translateY(0);
}

.btn-primary {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

.btn-primary:hover {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

.btn-primary::before {
    background: var(--color-accent);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font-main);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: #151515;
}

.btn-accent {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-accent::before {
    background: var(--color-accent);
}

/* Cards (Pricing/Features) */
.card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    padding: var(--space-md);
    transition: transform 0.4s var(--ease-out-expo), border-color 0.4s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--color-text);
}

.card.highlight {
    border-color: var(--color-accent);
    box-shadow: 0 0 30px var(--color-accent-dim);
}

/* Navbar */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md) 0;
    z-index: 100;
    mix-blend-mode: difference;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

/* ANIMATIONS */
[data-scroll] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}

[data-scroll].in-view {
    opacity: 1;
    transform: translateY(0);
}


/* WIZARD STYLES */

.signup-wizard {
    display: none;
    /* Toggled via JS */
}

.progress-bar {
    height: 4px;
    background: var(--color-border);
    flex: 1;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.progress-bar.active {
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent-dim);
}

.step {
    animation: fadeIn 0.4s var(--ease-out-expo);
}

.step.hidden {
    display: none;
}

/* Selection Cards (Category / League) */
.selection-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.selection-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    background: #151515;
}

.selection-card img {
    height: 50px;
    object-fit: contain;
    margin: 0 auto 0.5rem;
}

/* List Items (Team / Player) */
.list-container {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
    border-radius: 4px;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.list-item span {
    margin-left: 1rem;
    font-weight: 500;
}

.search-input {
    margin-bottom: 0.5rem;
    background: var(--color-bg) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar for lists */
.list-container::-webkit-scrollbar {
    width: 6px;
}

.list-container::-webkit-scrollbar-track {
    background: var(--color-bg);
}

.list-container::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

/* =========================================
   FIFA 26 THEME - IMMERSIVE SIGNUP
   ========================================= */

.fifa-theme {
    background-color: #050505;
    color: white;
    overflow: hidden;
    /* Prevent scrolling during wizard */
}

/* Full Screen Container */
.fifa-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Dynamic Background */
.fifa-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a2c4e 0%, #050505 80%);
    z-index: -2;
    animation: bgPulse 10s infinite alternate;
}

.fifa-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/pattern.png');
    /* Optional texture */
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

@keyframes bgPulse {
    0% {
        transform: scale(1);
        filter: brightness(0.8);
    }

    100% {
        transform: scale(1.1);
        filter: brightness(1.0);
    }
}

/* Header */
.fifa-header {
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.back-link {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
}

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

/* Main Content */
.fifa-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center vertically */
    align-items: center;
    padding-bottom: 4rem;
    position: relative;
    z-index: 5;
}

/* Progress Indicators */
.fifa-progress {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: absolute;
    top: 1rem;
    width: 100%;
    justify-content: center;
}

.step-indicator {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
    letter-spacing: 0.1em;
    position: relative;
    transition: all 0.4s ease;
}

.step-indicator.active {
    color: var(--color-accent);
    text-shadow: 0 0 10px var(--color-accent-dim);
}

.step-indicator.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent);
}

/* Wizard Steps */
.fifa-step {
    display: none;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fifa-step.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transform: translateY(0);
}

.fifa-title {
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Cards Grid */
.fifa-cards-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    perspective: 1000px;
}

.fifa-card {
    width: 280px;
    height: 340px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.fifa-card:hover {
    transform: translateY(-20px) scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-accent);
    box-shadow: 0 20px 50px rgba(0, 240, 255, 0.2);
}

.fifa-card .card-content {
    text-align: center;
    z-index: 2;
}

.fifa-card .card-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    transition: transform 0.4s ease;
}

.fifa-card:hover .card-icon {
    transform: scale(1.2) rotate(5deg);
}

.fifa-card h2 {
    font-size: 1.5rem;
    text-transform: uppercase;
    font-weight: 700;
}

/* List Grid (for Teams/Players) */
.fifa-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 1000px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 1rem;
}

.fifa-list-grid::-webkit-scrollbar {
    width: 4px;
}

.fifa-list-grid::-webkit-scrollbar-thumb {
    background: var(--color-accent);
}

.fifa-list-grid>div {
    /* List items injected by JS */
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.fifa-list-grid>div:hover {
    background: var(--color-accent);
    color: black;
    transform: scale(1.05);
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.3);
}

/* Search Input */
.fifa-search-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
}

.fifa-search {
    width: 100%;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.25rem;
    font-family: var(--font-main);
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.fifa-search:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

/* Form Container */
.fifa-form-container {
    background: rgba(0, 0, 0, 0.6);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    width: 100%;

    max-width: 500px;
}

/* Card & Item Badges */
.card-badge,
.item-badge {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.item-badge {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    margin-right: 1.5rem;
    padding: 5px;
}

.card-badge img,
.item-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Category Images & Icons */
.card-image {
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.card-icon-container {
    width: 160px;
    height: 160px;
    background: rgba(0, 240, 255, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 240, 255, 0.2);
    transition: all 0.4s ease;
}

.fifa-card:hover .card-icon-container {
    background: rgba(0, 240, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

.category-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.4s ease;
}

.fifa-card:hover .category-img {
    transform: scale(1.15);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.fifa-card:hover .card-image img {
    transform: scale(1.1);
}

/* Updated List Item */
.fifa-list-item {
    background: rgba(255, 255, 255, 0.05);
    /* Standardized with other backgrounds */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-weight: 500;
}

/* Specific Centering for League Selection */
#league-list .fifa-list-item {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding: 2.5rem;
    gap: 1.5rem;
    aspect-ratio: 1/1;
    /* Make them more square/prominent */
}

#league-list .fifa-list-item .item-badge {
    margin-right: 0;
    width: 120px;
    height: 120px;
}

#league-list .fifa-list-item span {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Specific for Player Selection (Step 4) */
#player-list.fifa-list-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    max-width: 1100px;
    height: 60vh;
}

#player-list.fifa-list-grid>div,
#player-list .fifa-list-item {
    flex-direction: column;
    padding: 1.5rem 1rem;
    background: transparent !important;
    border: none !important;
    gap: 1.5rem;
    transition: all 0.4s var(--ease-out-expo);
    border-radius: 0;
    box-shadow: none !important;
}

#player-list .fifa-list-item .item-badge {
    width: 120px;
    height: 120px;
    margin-right: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    /* Clipped to round */
    border-radius: 50%;
    /* Perfect Circle */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

#player-list .fifa-list-item .item-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill the circle beautifully */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.4s ease;
}

#player-list .fifa-list-item span {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0;
}

#player-list.fifa-list-grid>div:hover,
#player-list .fifa-list-item:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: translateY(-5px);
    color: white;
}

#player-list .fifa-list-item:hover .item-badge {
    border-color: var(--color-accent);
    box-shadow: 0 0 30px var(--color-accent-dim);
    transform: scale(1.1);
    /* Circle scales instead of card */
}

#player-list .fifa-list-item:hover span {
    color: var(--color-accent);
}

#player-list .fifa-list-item:hover .item-badge img {
    transform: translate(-50%, -50%) scale(1.1);
}



.fifa-list-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    transform: translateX(10px);
}

#league-list .fifa-list-item:hover {
    transform: translateY(-5px) scale(1.05);
}

/* --- MODERN FLUID TRANSITION --- */
.fifa-step {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.6s ease,
        filter 0.6s ease;
    display: none;
    flex-direction: column;
    align-items: center;
    filter: blur(15px);
}

.fifa-step.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
}

/* Slide-out (to the left) */
.fifa-step.step-exit {
    display: flex !important;
    opacity: 0;
    transform: translate(-60%, -50%) scale(0.95);
    filter: blur(25px);
}

/* Slide-in (from the right) */
.fifa-step.step-enter {
    display: flex !important;
    opacity: 0;
    transform: translate(-40%, -50%) scale(1.05);
    filter: blur(25px);
}

/* --- SHARED SCENE REFINEMENT --- */
.fifa-3d-scene {
    position: relative;
    width: 100%;
    height: calc(100vh - 100px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.steps-3d-container {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    position: relative;
}

/* --- DASHBOARD REVAMP --- */

.dashboard-layout {
    display: block;
    position: relative;
    /* grid-template-columns: 280px 1fr;  <-- REMOVED: Sidebar is now fixed */
    /* gap: var(--space-lg); */
}

.dashboard-sidebar {
    position: sticky;
    top: 120px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    width: 100%;
    text-align: left;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-accent);
    color: var(--color-text);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.1);
}

.nav-icon {
    margin-right: 1rem;
    font-size: 1.25rem;
}

.sub-nav {
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.sub-nav-item {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    text-align: left;
    transition: color 0.3s ease;
}

.sub-nav-item:hover {
    color: var(--color-accent);
}

.dashboard-section {
    display: none;
    animation: fadeIn 0.5s var(--ease-out-expo);
}

.dashboard-section.active {
    display: block;
}

/* Match Cards */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: var(--space-md);
}

.match-card {
    background: linear-gradient(145deg, #111, #050505);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.match-card:hover::before {
    opacity: 1;
}

.match-teams {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

.team-mini {
    text-align: center;
    flex: 1;
}

.team-mini img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5));
}

.team-name-mini {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.match-vs {
    font-weight: 800;
    color: var(--color-accent);
    font-size: 1.25rem;
    margin: 0 1rem;
}

.match-info {
    text-align: center;
}

.match-date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.match-competition {
    font-size: 0.7rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* Scores List */
.scores-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: var(--space-md);
}

.score-item {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s ease;
}

.score-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.score-teams {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-weight: 700;
    text-transform: uppercase;
}

.score-result {
    font-size: 1.5rem;
    font-weight: 800;
    padding: 0.25rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--color-accent);
}

/* =========================================
   VISUAL GENERATOR (NIKE-LEVEL REDESIGN)
   ========================================= */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(40px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.4s var(--ease-out-expo);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.back-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    transition: color 0.3s;
}

.back-btn:hover {
    color: var(--color-accent);
}

.format-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
}

.format-btn.active {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

/* Generator Steps */
.generator-step {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 3rem 2rem;
}

.generator-step.active {
    display: flex;
}

/* Template Grid Re-style */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.template-card {
    background: #0a0a0a;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    aspect-ratio: 1/1;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
}

.template-card:hover {
    border-color: var(--color-accent);
    transform: scale(1.02);
}

.template-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transition: transform 0.8s var(--ease-out-expo), opacity 0.5s;
}

.template-card:hover img {
    opacity: 0.8;
    transform: scale(1.1);
}

.template-name {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    z-index: 2;
}

/* Editor Layout */
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 0;
    width: 100%;
    height: calc(100vh - 80px);
}

.editor-preview-container {
    background: #020202;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.visual-preview {
    background: #050505;
    position: relative;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    transition: all 0.6s var(--ease-out-expo);
}

.format-square {
    width: 500px;
    aspect-ratio: 1/1;
}

.format-story {
    width: 350px;
    aspect-ratio: 9/16;
}

/* Canvas Layers */
.preview-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    transition: background 0.5s;
}

.preview-overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 2;
}

.preview-player-container {
    position: absolute;
    bottom: -5%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 90%;
    z-index: 3;
    transition: all 0.4s var(--ease-out-expo);
}

.preview-player-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

.preview-content-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10%;
    pointer-events: none;
}

#preview-title {
    font-size: 4rem;
    line-height: 0.8;
    color: var(--color-accent);
    opacity: 0.9;
    text-align: center;
    filter: drop-shadow(0 0 20px var(--color-accent-dim));
}

.preview-match-info {
    text-align: center;
}

#preview-opponent {
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

/* Controls Panel */
.editor-controls {
    background: var(--color-bg-secondary);
    border-left: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.controls-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
}

.control-group {
    margin-bottom: 3rem;
}

.control-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
    letter-spacing: 0.2em;
    display: block;
}

/* Custom Inputs */
.input-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-stack input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
}

.input-stack input:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Pose Picker */
.pose-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.pose-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.pose-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pose-btn.active {
    background: var(--color-accent-dim);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.pose-icon {
    font-size: 1.25rem;
}

/* DA Presets */
.da-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.da-preset-btn {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: white;
    padding: 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.da-preset-btn.active {
    background: var(--color-text);
    color: var(--color-bg);
}

/* Select & Sliders */
.modern-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: white;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
}

.slider-item {
    margin-bottom: 1.5rem;
}

.slider-item label {
    display: block;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--color-accent-dim);
}

/* =========================================
   RESPONSIVE OVERRIDES & WEBAPP OPTIMIZATION
   ========================================= */

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 3000;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 2500;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    animation: fadeIn 0.3s var(--ease-out-expo);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.mobile-menu a.btn {
    font-size: 1.25rem;
    padding: 1rem 2rem;
    color: var(--color-bg);
    /* Ensure button text is visible against background */
}

/* Base Breakpoints */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .mobile-nav-toggle {
        display: block;
    }

    /* Homepage Hero Adjustments */
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 15vh;
    }

    .hero-content {
        z-index: 2;
        width: 100%;
    }

    .hero-image-container {
        width: 100% !important;
        height: 50vh !important;
        position: relative !important;
        opacity: 0.5 !important;
        mask-image: linear-gradient(to bottom, black, transparent) !important;
    }

    h1 {
        font-size: clamp(3rem, 10vw, 5rem) !important;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Dashboard Specific Responsive */
@media (max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr !important;
    }

    /* Signup Wizard Mobile Optimizations */
    .fifa-header {
        padding: 1.5rem 2rem;
    }

    .fifa-title {
        font-size: 2.5rem !important;
        margin-bottom: 2rem;
    }

    .fifa-cards-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        perspective: none;
    }

    .fifa-card {
        width: 100%;
        max-width: 320px;
        height: 200px;
    }

    .fifa-card:hover {
        transform: translateY(-10px) scale(1.02);
    }

    .fifa-card .card-image {
        height: 100px;
    }

    .fifa-list-grid {
        grid-template-columns: 1fr;
        max-height: 40vh;
    }

    .fifa-form-container {
        padding: 2rem 1.5rem;
    }

    .fifa-step {
        max-width: 90%;
    }

    /* iPhone Pro Max & Large Mobile Specific Scaling */
    @media (min-width: 400px) and (min-height: 800px) {
        .fifa-title {
            font-size: 3.5rem !important;
            margin-bottom: 3rem;
        }

        .fifa-card {
            height: 250px;
            max-width: 380px;
        }

        .fifa-list-grid {
            max-height: 60vh;
        }

        .fifa-form-container {
            max-width: 100%;
            padding: 3rem 2rem;
        }
    }

    /* ... existent dashboard styles ... */
    .dashboard-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100%;
        width: 280px;
        z-index: 1000;
        transition: left 0.4s var(--ease-out-expo);
        background: var(--color-bg-secondary);
        border-right: 1px solid var(--color-border);
    }

    .dashboard-sidebar.active {
        left: 0;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        z-index: 999;
        display: none;
        backdrop-filter: blur(5px);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .dashboard-main {
        padding: 0;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Profile Header */
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Generator Modal Mobile Fixes */
    .modal-header {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    #generator-title {
        font-size: 1rem;
        order: 1;
        width: 60%;
    }

    .close-btn {
        order: 2;
    }

    #export-selector {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .editor-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow-y: auto;
    }

    .editor-preview-container {
        padding: 1rem;
        height: 50vh;
    }

    .visual-preview {
        transform: scale(0.8);
    }

    .controls-scroll {
        padding: 1.5rem;
    }

    .pose-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Device Optimizations */
@media (max-width: 480px) {
    #preview-title {
        font-size: 2.5rem !important;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .match-card {
        padding: 1.5rem 1rem;
    }

    .match-card .btn-small {
        width: 100%;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        margin-top: 1rem !important;
    }

    .match-info {
        width: 100%;
    }

    .team-mini img {
        width: 32px;
        height: 32px;
    }
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    /* Slightly thicker for touch */
    background: var(--color-border);
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    /* Larger for touch */
    height: 24px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--color-accent-dim);
}

/* =========================================
   REFINEMENTS - ICON CENTERING
   ========================================= */

/* Center Category Selection (Step 1) */
#step-1 .fifa-card {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
}

#step-1 .fifa-card:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, rgba(0, 240, 255, 0.02) 100%);
}

/* Center League Selection (Step 2) */
#league-grid .fifa-card {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding: 2rem;
}

#league-grid .fifa-card .card-content,
#team-list.fifa-list-grid .fifa-list-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#league-grid .fifa-card .card-badge {
    margin: 0 !important;
    width: 200px;
    /* Larger logo container since text is gone */
    height: 200px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

#league-grid .fifa-card .card-badge img {
    width: 100%;
    height: 100%;
    max-width: 180px;
    max-height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.2));
}

#league-grid .fifa-card h2 {
    font-size: 1.25rem;
    /* Slightly smaller for mobile if needed */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Center Team Selection (Step 3) - if they are cards */
#team-list.fifa-list-grid .fifa-list-item {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding: 2rem;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

#team-list.fifa-list-grid .item-badge {
    margin-right: 0 !important;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#team-list.fifa-list-grid .item-badge img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* =========================================
   IMAGE LAB - AI GENERATION
   ========================================= */

.imagelab-container {
    max-width: 900px;
    margin: 0 auto;
}

.loader-wave {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.loader-wave span {
    width: 6px;
    height: 30px;
    background: var(--color-accent);
    border-radius: 3px;
    animation: wave 1.2s infinite ease-in-out;
}

.loader-wave span:nth-child(1) {
    animation-delay: 0.1s;
}

.loader-wave span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-wave span:nth-child(3) {
    animation-delay: 0.3s;
}

.loader-wave span:nth-child(4) {
    animation-delay: 0.4s;
}

.loader-wave span:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes wave {

    0%,
    40%,
    100% {
        transform: scaleY(0.4);
    }

    20% {
        transform: scaleY(1);
    }
}

.ai-output .card {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideUpFade 0.6s var(--ease-out-expo);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- FLOATING SIDEBAR REDESIGN --- */

/* Sidebar */
.sidebar {
    position: fixed;
    top: 100px;
    left: 2rem;
    bottom: 2rem;
    width: 280px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Make main content respect floating sidebar */
.main-content {
    margin-left: 350px;
    /* Increased for better spacing */
    padding: 2rem 2rem 2rem 0;
    /* Removing left padding since margin handles it */
}

/* Navigation Items within Floating Sidebar */
.nav-item {
    margin-bottom: 0.5rem;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.nav-item.active {
    background: var(--color-accent);
    color: black;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

/* User Profile Section in Sidebar */
.sidebar-profile {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-accent);
    font-weight: bold;
    color: var(--color-accent);
}

/* Mobile Responsiveness for Floating Sidebar */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-120%);
        width: 280px;
        left: 2rem;
        /* Keep floating look even on mobile open */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 2rem;
    }
}

/* GALLERY STYLES */
.gallery-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--color-accent);
}

.gallery-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.gallery-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-image-container img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-download-btn {
    width: 50px;
    height: 50px;
    background: white;
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.25rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-download-btn:hover {
    transform: scale(1.1);
}

.gallery-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    justify-content: space-between;
}

.gallery-prompt {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Desktop - Hide hamburger by default */
.mobile-nav-toggle {
    display: none;
}

/* Mobile/Tablet - Show hamburger */
@media (max-width: 1024px) {
    .mobile-nav-toggle {
        display: block;
    }
}

/* Improved Match Card Layout */
.match-logos-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.team-logo-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.team-logo-container img {
    width: 70px;
    /* Slightly larger */
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}

.match-card:hover .team-logo-container img {
    transform: scale(1.1);
}

.match-names-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    margin-bottom: 1rem;
}

.team-name-display {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text);
    line-height: 1.2;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Visuals Grid Layout */
.visuals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .visuals-grid {
        grid-template-columns: 1fr;
    }
}

/* --- NEW GALLERY & LIGHTBOX STYLES (User Request) --- */

/* Updated Gallery Card Actions */
.gallery-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
}

.btn-gallery-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--color-text);
}

.btn-gallery-download {
    background: rgba(255, 255, 255, 0.05);
}

.btn-gallery-download:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-accent);
}

.btn-gallery-delete {
    background: rgba(255, 50, 50, 0.1);
    color: #ff4d4d;
    max-width: 40px;
    /* Square-ish for delete */
}

.btn-gallery-delete:hover {
    background: rgba(255, 50, 50, 0.2);
    border-color: #ff4d4d;
}

/* Make image clickable for lightbox */
.gallery-image-container {
    cursor: zoom-in;
}

/* LIGHTBOX MODAL */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

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

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-download {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
    transition: transform 0.2s;
}

.lightbox-download:hover {
    transform: translateX(-50%) scale(1.05);
}

/* --- FIFA DYNAMIC PLAYER CARD (SIDEBAR) --- */

.player-card-container {
    padding: 1.5rem;
    margin-top: auto;
    /* Push to bottom of sidebar */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--color-border);
    background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.03));
}

.fifa-mini-card {
    width: 200px;
    height: 280px;
    background: linear-gradient(135deg, #d4af37 0%, #f9e272 50%, #b8860b 100%);
    border-radius: 10px;
    position: relative;
    padding: 5px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.2);
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
    cursor: pointer;
    clip-path: polygon(10% 0, 90% 0, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0 90%, 0 10%);
}

.fifa-mini-card:hover {
    transform: translateY(-10px) rotateY(10deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(212, 175, 55, 0.4);
}

.card-inner {
    width: 100%;
    height: 100%;
    background: #111;
    clip-path: polygon(10% 0, 90% 0, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0 90%, 0 10%);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.2;
}

.card-player-photo {
    width: 160px;
    height: 160px;
    z-index: 2;
    margin-top: 10px;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.9));
    position: relative;
}

.card-player-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Transparent background - no circular mask */
    background: transparent;
    mix-blend-mode: normal;
}

.card-info-top {
    position: absolute;
    top: 30px;
    left: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
}

.card-rating {
    font-size: 1.8rem;
    font-weight: 800;
    color: #f9e272;
    line-height: 1;
}

.card-position {
    font-size: 0.8rem;
    font-weight: 700;
    color: #f9e272;
    text-transform: uppercase;
}

.card-name-banner {
    width: 100%;
    padding: 10px 0;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    text-align: center;
    margin-top: -5px;
    z-index: 3;
}

.card-player-name {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    color: white;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-stats {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 10px 20px;
    gap: 5px;
    z-index: 3;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
}

.stat-value {
    color: #f9e272;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, rgba(212, 175, 55, 0.2), transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* --- LANGUAGE SWITCHER --- */
.language-switcher {
    display: none !important;
    /* Temporarily hidden per user request */
    position: relative;
    /* display: inline-block; */
    margin-left: 1rem;
}

.lang-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: white;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
}

.lang-icon {
    font-size: 1.2rem;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 150px;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lang-dropdown.active {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: var(--color-text);
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.lang-option.active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--color-accent);
}

.lang-flag {
    font-size: 1.5rem;
    line-height: 1;
}

.lang-name {
    flex: 1;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    :root {
        --space-xl: 3rem;
        --space-lg: 2rem;
        --space-md: 1.5rem;
    }

    .container {
        width: 90%;
        padding: 0;
    }

    .text-hero {
        font-size: 3.5rem;
    }

    .text-h1 {
        font-size: 2.5rem;
    }

    .text-h2 {
        font-size: 1.75rem;
    }

    /* Stack flex containers vertically on mobile, but keep nav aligned */
    .flex {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-container .flex,
    .nav-links.flex,
    .hero-actions.flex,
    .footer .flex {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Force grids to single column */
    .grid {
        grid-template-columns: 1fr !important;
    }

    /* Hero adjustments */
    .hero-image-container {
        width: 100% !important;
        opacity: 0.3 !important;
        mask-image: linear-gradient(to bottom, transparent, black) !important;
        -webkit-mask-image: linear-gradient(to bottom, transparent, black) !important;
    }

    .hero-image-container img {
        object-position: center !important;
    }

    .hero-content {
        text-align: center;
    }

    .hero-actions {
        width: 100%;
        flex-direction: column !important;
    }

    .hero-actions .btn {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Comparison Section Mobile Height */
    .before-after-container {
        height: 300px;
    }

    /* Forms */
    .form-group input {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .fifa-form-container {
        padding: 1.5rem;
    }

    /* Pricing Card Overrides */
    .card {
        padding: 1.5rem !important;
    }

    /* Section Padding Override */
    .section,
    section.container {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* FIFA Theme Mobile Fixes */
    .fifa-cards-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .fifa-card {
        width: 100%;
        max-width: 280px;
        height: 280px;
        /* Slightly shorter on mobile */
    }

    .fifa-title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .fifa-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .fifa-progress {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }

    .fifa-content {
        justify-content: flex-start;
        padding-top: 2rem;
        overflow-y: auto;
        /* Allow scrolling content */
    }

    /* Fix List Grid on mobile */
    .fifa-list-grid {
        grid-template-columns: 1fr;
        max-height: 40vh;
    }

    /* Login Container Adjustment */
    .login-container {
        padding: 1.5rem;
    }
}

/* DESKTOP ONLY DEFAULTS (that need to be implicit) */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

/* ADDITIONAL DASHBOARD MOBILE FIXES */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .main-content {
        padding: 1rem !important;
        /* Override desktop padding */
        width: 100%;
        margin-left: 0 !important;
    }

    .sidebar {
        /* Ensure sidebar covers screen or behaves as drawer on mobile */
        left: 0 !important;
        height: 100vh !important;
        top: 0 !important;
        border-radius: 0 !important;
        margin: 0 !important;
        z-index: 999 !important;
    }

    /* Generator Modal Mobile */
    .modal-content {
        width: 95% !important;
        height: 90vh !important;
        display: flex;
        flex-direction: column;
    }

    .editor-layout {
        flex-direction: column;
        overflow-y: auto;
    }

    .editor-preview-container {
        height: 400px;
        /* Fixed height for preview on mobile */
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .editor-controls {
        width: 100%;
        height: auto;
        overflow-y: visible;
    }

    .visual-preview {
        transform: scale(0.6);
        /* Scale down preview to fit */
    }

    /* Credits Widget in Header */
    .nav-container {
        padding: 0 0.5rem !important;
    }

    /* --- HOMEPAGE SPECIFIC MOBILE IMPROVEMENTS --- */

    /* Hero Section */
    .hero-container {
        min-height: 100vh;
        /* Ensure full viewport height */
        padding-top: 80px;
        /* Account for fixed header */
        display: flex;
        align-items: center;
    }

    .hero-content {
        padding: 2rem 1rem;
        z-index: 5;
        /* Ensure content is above image */
    }

    .hero-image-container {
        /* Make image less obtrusive on mobile to let text pop */
        opacity: 0.25 !important;
        width: 100% !important;
        height: 100% !important;
        mask-image: linear-gradient(to bottom, transparent, black 80%) !important;
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 80%) !important;
    }

    .text-hero {
        font-size: 3rem;
        /* Slightly smaller for better fit */
        line-height: 1.1;
    }

    /* Comparison Section */
    .before-after-container {
        height: 350px;
        /* Taller touch area */
        border-width: 1px;
    }

    .slider-button {
        width: 40px;
        height: 40px;
        /* Slightly smaller handle */
    }

    /* Why Us / Features Grid */
    .section {
        padding: 3rem 1rem;
    }

    .card {
        margin-bottom: 1rem;
        /* Spacing between stacked visuals */
    }

    /* Pricing Grid */
    .grid {
        gap: 1.5rem !important;
        /* Consistent gap */
    }

    /* Showcase Layout */
    #showcase .grid {
        gap: 3rem;
    }

    #showcase img {
        width: 100%;
        height: auto;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    }

    /* Dashboard Header Specifics */
    .logo {
        font-size: 1.2rem;
        /* Smaller logo */
    }

    /* Compact Language Switcher */
    .language-switcher .lang-toggle {
        padding: 0.4rem;
        font-size: 0.8rem;
    }

    .language-switcher #currentLangText {
        display: none;
        /* Hide text "FR" on mobile, just show icon/flag if possible or Keep it minimal */
    }

    /* Alternatively, if icon is generic globe, keep text but make it small. 
       Let's hide the text to save space as requested */

    /* Compact "Buy Credits" button */
    .btn-accent[onclick*="pricing"] {
        padding: 0.4rem !important;
    }

    .btn-accent[onclick*="pricing"] span:last-child {
        display: none;
        /* Hide "Buy credits" text */
    }

    .btn-accent[onclick*="pricing"] span:first-child {
        font-size: 1.2rem !important;
        /* Make "+" larger */
        margin: 0 !important;
    }

    /* Hide "Credits" label */
    p[data-i18n="dashboard_credits"] {
        display: none;
    }
}

/* --- Custom Premium Modal --- */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.custom-modal-content {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    animation: slideUp 0.3s ease;
    position: relative;
}

.custom-modal-content::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
}

.modal-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem auto;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.modal-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px var(--color-accent));
}

.custom-modal-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.custom-modal-content p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    width: calc(100% - 40px);
}

.toast {
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.toast.toast-success {
    border-left: 4px solid #4ade80;
}

.toast.toast-info {
    border-left: 4px solid var(--color-accent);
}

.toast.toast-error {
    border-left: 4px solid #f87171;
}

.toast.toast-loading .toast-icon {
    animation: spin 1s linear infinite;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.toast-icon {
    font-size: 1.2rem;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .notification-container {
        top: auto;
        bottom: 20px;
        right: 20px;
    }
}