/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Tajawal:wght@300;400;700&display=swap');

:root {
    --primary: #10b981;
    /* Emerald */
    --primary-dark: #059669;
    --accent: #fbbf24;
    /* Amber/Gold */
    --bg-dark: #0f172a;
    /* Slate 900 */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Translucent Slate 800 */
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(251, 191, 36, 0.05) 0%, transparent 20%);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
    /* Arabic support */
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

.glass-nav {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 10px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
}

/* Feature Cards */
.feature-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Podium Styles */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5rem;
    margin: 4rem 0;
}

.podium-item {
    text-align: center;
    flex: 1;
    max-width: 250px;
    position: relative;
}

.podium-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: -20px auto 10px;
    display: grid;
    place-items: center;
    font-weight: 700;
    z-index: 2;
    position: relative;
}

.podium-first {
    height: var(--podium-first-h, 350px);
}

.podium-second {
    height: var(--podium-second-h, 300px);
}

.podium-third {
    height: var(--podium-third-h, 260px);
}

.podium-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.podium-card:hover {
    transform: scale(1.02);
}

.avatar-glow {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.avatar-glow img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    position: relative;
    z-index: 1;
}

.avatar-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    filter: blur(15px);
    opacity: 0.5;
    z-index: 0;
}

.podium-first .avatar-glow::after {
    background: var(--accent);
}

.podium-second .avatar-glow::after {
    background: #cbd5e1;
}

.podium-third .avatar-glow::after {
    background: #b45309;
}

/* Match Cards */
.match-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    text-align: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.match-card::before {
    content: 'VS';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    font-weight: 900;
    opacity: 0.03;
    color: white;
}


/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

.grid-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 20vw, 180px), 1fr));
    gap: clamp(1rem, 2vw, 2rem);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #d97706);
    color: #000;
}

/* Mobile-first responsiveness tweaks */
.btn.glass-card {
    color: white !important;
    border: 1px solid var(--glass-border);
}

.btn.glass-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    :root {
        --podium-first-h: 300px;
        --podium-second-h: 250px;
        --podium-third-h: 220px;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 1.8rem !important;
    }

    .podium-container {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .podium-item {
        width: 100%;
        max-width: 100%;
        height: auto !important;
    }

    .podium-card {
        height: auto !important;
        padding: 1.5rem;
    }

    .podium-first {
        order: 1;
    }

    .podium-second {
        order: 2;
    }

    .podium-third {
        order: 3;
    }

    .container {
        padding: 0 1rem;
    }
}

/* Tablet responsiveness tweaks */
@media (min-width: 769px) and (max-width: 1024px) {
    .podium-container {
        gap: 1rem;
    }

    .podium-item {
        max-width: 200px;
    }
}

/* Global Responsive Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
}

@media (max-width: 1100px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hide-mobile {
        display: none !important;
    }

    .mobile-scroll-x {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Table to Card View Pattern */
    .responsive-table thead {
        display: none;
    }

    .responsive-table tr {
        display: block;
        background: rgba(255, 255, 255, 0.03);
        margin-bottom: 1rem;
        border-radius: 15px;
        border: 1px solid var(--glass-border) !important;
        padding: 1rem;
    }

    .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0 !important;
        border: none !important;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.85rem;
    }

    /* Mobile Button Polish */
    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1rem;
    }

    /* Mobile Heading Scale */
    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.4rem !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    /* Nav adjustments */
    .glass-nav .container {
        padding: 0.5rem 1rem !important;
    }
}

/* Premium UI Utilities */
.glass-hero {
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.15), transparent),
        radial-gradient(circle at bottom right, rgba(251, 191, 36, 0.1), transparent),
        var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.neon-border {
    position: relative;
}

.neon-border::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--primary), var(--accent), var(--primary));
    filter: blur(10px);
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.neon-border:hover::after {
    opacity: 0.5;
}

.stat-card-premium {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card-premium:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.animate-entry {
    animation: entryFade 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

@keyframes entryFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-museum {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
}

/* Animations for stats */
@keyframes countUp {
    from {
        opacity: 0;
        filter: blur(5px);
    }

    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* Score Dashboard & Tactical Stats */
.score-dashboard {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.score-input-large {
    width: 90px;
    height: 90px;
    text-align: center;
    font-size: 3rem;
    font-weight: 900;
    background: #0f172a;
    border: 3px solid var(--glass-border);
    border-radius: 20px;
    color: white;
    transition: all 0.3s ease;
}

.score-input-large:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    outline: none;
}

.stat-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    justify-content: center;
}

.counter-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.counter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.counter-btn.plus:hover {
    background: var(--primary);
    color: white;
}

.counter-btn.minus:hover {
    background: #ef4444;
    color: white;
}

.stat-input-small {
    width: 40px;
    background: transparent;
    border: none;
    color: white;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    outline: none;
    -moz-appearance: textfield;
    appearance: none;
}

.stat-input-small::-webkit-outer-spin-button,
.stat-input-small::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.rating-input {
    width: 70px;
    padding: 0.6rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--primary);
    border-radius: 10px;
    color: var(--primary);
    font-weight: 900;
    text-align: center;
    font-size: 1rem;
    outline: none;
}

@media (max-width: 768px) {
    .score-dashboard {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}