/* 
 * TournamentArena - Premium Dark Theme
 * CSS Variables & Core Setup
 */

 :root {
    /* Core Colors */
    --clr-bg: #0a0e27;
    --clr-bg-alt: #131836;
    --clr-bg-card: rgba(25, 30, 60, 0.7);
    --clr-border: rgba(255, 255, 255, 0.1);
    
    /* Accents */
    --clr-primary: #7c3aed;
    --clr-primary-hover: #6d28d9;
    --clr-secondary: #06b6d4;
    --clr-accent: #f43f5e;
    
    /* Text */
    --clr-text: #f8fafc;
    --clr-text-muted: #94a3b8;
    
    /* Status Colors */
    --clr-success: #10b981;
    --clr-warning: #f59e0b;
    --clr-danger: #ef4444;
    --clr-info: #3b82f6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    --gradient-glow: linear-gradient(135deg, rgba(124, 58, 237, 0.5), rgba(6, 182, 212, 0.5));
    
    /* Shadows & Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3);
    --blur-card: blur(12px);

    /* Fonts */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: var(--clr-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--clr-text);
}

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

ul {
    list-style: none;
}

/* Typography Utilities */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-center { text-align: center; }
.text-muted { color: var(--clr-text-muted); }

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-content {
    flex: 1;
    padding: 2rem 0 4rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-8 { margin-top: 4rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-8 { margin-bottom: 4rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-size: 1rem;
    text-decoration: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
    color: white;
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--clr-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--clr-danger);
    color: white;
}

/* Cards & Glassmorphism */
.card {
    background: var(--clr-bg-card);
    backdrop-filter: var(--blur-card);
    -webkit-backdrop-filter: var(--blur-card);
    border: 1px solid var(--clr-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(124, 58, 237, 0.3);
}

/* Professional Tournament Card - Enhanced */
.tournament-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding: 0 !important;
    position: relative;
    background: rgba(19, 24, 54, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 1.25rem;
}

.tournament-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(124, 58, 237, 0.2);
    border-color: var(--clr-primary);
    background: rgba(19, 24, 54, 0.8);
}

.tournament-card .image-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.tournament-card:hover .image-container img {
    transform: scale(1.15);
}

.tournament-card .card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(10, 14, 39, 0.95));
}

.tournament-card .prize-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(184, 134, 11, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tournament-card .status-badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 3;
}

.tournament-card .card-body {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tournament-card .tournament-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--clr-text);
    margin-bottom: 0;
    line-height: 1.2;
}

.tournament-card .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tournament-card .info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--clr-text-muted);
    font-size: 0.85rem;
}

.tournament-card .info-item i {
    color: var(--clr-primary);
    width: 16px;
    text-align: center;
}

.tournament-card .p-bar-container {
    background: rgba(255, 255, 255, 0.05);
    height: 8px;
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
    position: relative;
}

.tournament-card .p-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
    background-size: 200% auto;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
    animation: shine 2s linear infinite, glow 1.5s ease-in-out infinite alternate;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shine {
    to { background-position: 200% center; }
}

@keyframes glow {
    from { box-shadow: 0 0 5px rgba(124, 58, 237, 0.3); }
    to { box-shadow: 0 0 15px rgba(124, 58, 237, 0.7); }
}

.tournament-card .card-footer {
    padding: 1.25rem 1.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tournament-card .footer-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tournament-card .footer-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--clr-text-muted);
}

.tournament-card .footer-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--clr-text);
}

.tournament-card .btn-join {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    border-radius: 0.85rem;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.2);
    margin-top: auto;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--clr-text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--clr-border);
    border-radius: 0.5rem;
    color: var(--clr-text);
    font-family: var(--font-sans);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em;
    padding-right: 2.5rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-upcoming { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-live { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); animation: pulse-red 2s infinite; }
.badge-completed { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-pending { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-approved { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-rejected { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-admin { background: var(--gradient-primary); color: white; }

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Navigation */
.navbar {
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--clr-border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--clr-text);
}

.nav-logo i {
    color: var(--clr-primary);
    font-size: 1.25rem;
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--clr-text-muted);
    font-weight: 500;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--clr-text);
}

.nav-link.active i {
    color: var(--clr-secondary);
}

.nav-admin-link {
    color: var(--clr-warning);
}

.nav-admin-link:hover {
    color: #fcd34d;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--clr-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--clr-primary);
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--clr-bg-alt);
    border: 1px solid var(--clr-border);
    border-radius: 0.5rem;
    min-width: 150px;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-short);
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--clr-text-muted);
}

.nav-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--clr-text);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--clr-text);
    position: relative;
    transition: var(--transition-fast);
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--clr-text);
    left: 0;
    transition: var(--transition-fast);
}

.hamburger::before { top: -6px; }
.hamburger::after { bottom: -6px; }

.nav-toggle.active .hamburger { background: transparent; }
.nav-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-toggle.active .hamburger::after { transform: rotate(-45deg); bottom: 0; }

/* Footer */
.footer {
    background: var(--clr-bg-alt);
    border-top: 1px solid var(--clr-border);
    padding: 4rem 0 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--clr-text);
    margin-bottom: 1rem;
}

.footer-desc {
    color: var(--clr-text-muted);
    margin-bottom: 1.5rem;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--clr-text);
    transition: all var(--transition-fast);
}

.footer-socials a:hover {
    background: var(--clr-primary);
    transform: translateY(-3px);
}

.footer-links h4 {
    color: var(--clr-text);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--clr-text-muted);
}

.footer-links a:hover {
    color: var(--clr-secondary);
    padding-left: 5px;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--clr-text-muted);
    font-size: 0.875rem;
}

/* Toasts */
#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background: var(--clr-bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--clr-border);
    box-shadow: var(--shadow-lg);
    color: var(--clr-text);
    transform: translateX(120%);
    transition: transform var(--transition-normal);
}

.toast.show {
    transform: translateX(0);
}

.toast-success { border-left: 4px solid var(--clr-success); }
.toast-success i { color: var(--clr-success); }

.toast-error { border-left: 4px solid var(--clr-danger); }
.toast-error i { color: var(--clr-danger); }

.toast-close {
    background: none;
    border: none;
    color: var(--clr-text-muted);
    cursor: pointer;
    margin-left: 1rem;
}

.toast-close:hover {
    color: var(--clr-text);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* ================================================================
   RESPONSIVE DESIGN — All Devices
   ================================================================ */

/* ---------- Large Tablets / Small Desktops (max 1024px) ---------- */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.25rem;
    }

    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    /* Fix inline 2fr/1fr grids used in pages */
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 1fr 2fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ---------- Tablets / Mobile Landscape (max 768px) ---------- */
@media (max-width: 768px) {
    /* Navigation */
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--clr-bg-alt);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.75rem;
        border-bottom: 1px solid var(--clr-border);
        box-shadow: var(--shadow-lg);
        clip-path: circle(0% at 100% 0);
        transition: clip-path 0.4s ease-out;
    }

    .nav-menu.active {
        clip-path: circle(150% at 100% 0);
    }

    .nav-cta {
        width: 100%;
        justify-content: center;
    }

    .nav-dropdown-toggle {
        width: 100%;
    }

    /* Typography sizing */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.15rem; }

    /* Hero */
    .hero {
        padding: 3rem 0 !important;
    }

    .hero h1,
    [style*="font-size: 3.5rem"],
    [style*="font-size: 2.5rem"] {
        font-size: 2rem !important;
    }

    [style*="font-size: 1.25rem"] {
        font-size: 1rem !important;
    }

    /* Main content */
    .main-content {
        padding: 1rem 0 2rem;
    }

    /* Grid overrides */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

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

    /* Flex wrapping */
    .flex {
        flex-wrap: wrap;
    }

    .flex.justify-between {
        gap: 1rem;
    }

    /* Cards */
    .card {
        padding: 1.25rem;
    }

    .card:hover {
        transform: none;
    }

    /* Buttons */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Footer */
    .footer {
        padding: 2.5rem 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-container {
        padding: 0 1.25rem;
    }

    /* Tables responsive — horizontal scroll */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Profile page — stack avatar and form */
    [style*="grid-template-columns: 1fr 2fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Toasts */
    #toast-container {
        left: 1rem;
        right: 1rem;
        top: 75px;
    }

    .toast {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    /* Tournament bracket scrollable */
    .bracket {
        gap: 2rem !important;
    }

    /* Admin match forms */
    .card form.flex {
        flex-direction: column;
        align-items: stretch !important;
    }

    .card form.flex > div,
    .card form.flex > select,
    .card form.flex > button {
        width: 100%;
    }

    /* Action button groups */
    .flex.justify-end {
        justify-content: flex-start;
    }

    /* Filter bars */
    .card form.flex[style*="flex-wrap"] {
        flex-direction: column;
    }

    .card form.flex[style*="flex-wrap"] > * {
        width: 100% !important;
        min-width: unset !important;
    }
}

/* ---------- Small Mobile (max 480px) ---------- */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }

    .hero h1,
    [style*="font-size: 3.5rem"],
    [style*="font-size: 2.5rem"] {
        font-size: 1.5rem !important;
    }

    [style*="font-size: 8rem"] {
        font-size: 4rem !important;
    }

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

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

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
    }

    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .card {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .navbar {
        height: 60px;
    }

    .nav-logo {
        font-size: 1.25rem;
    }

    .nav-logo i {
        font-size: 1rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    /* Footer compact */
    .footer-socials a {
        width: 35px;
        height: 35px;
    }

    /* Admin stat cards — stack vertically */
    .grid-4 .card h2,
    .grid-4 .card h3,
    [style*="font-size: 2.5rem"],
    [style*="font-size: 2rem"] {
        font-size: 1.5rem !important;
    }

    /* Profile avatar smaller */
    [style*="width: 120px"] {
        width: 80px !important;
        height: 80px !important;
    }

    /* Team/tournament banner - reduce height */
    [style*="height: 250px"] {
        height: 150px !important;
    }

    [style*="height: 160px"],
    [style*="height: 150px"] {
        height: 120px !important;
    }

    /* Fix modals on small screens */
    #create-team-modal > .card {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Form grid compact */
    .grid-3.form-row {
        grid-template-columns: 1fr;
    }
}

/* ---------- Touch-friendly enhancements ---------- */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }

    .btn:hover {
        transform: none;
    }

    .footer-socials a:hover {
        transform: none;
    }

    /* Larger touch targets */
    .nav-link {
        padding: 0.5rem 0;
    }

    .btn-sm {
        min-height: 40px;
        min-width: 40px;
    }

    .form-control {
        font-size: 16px; /* Prevents iOS zoom on focus */
        min-height: 44px;
    }
}

/* ---------- Print styles ---------- */
@media print {
    .navbar, .footer, #toast-container, .nav-toggle, .btn {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
/* 
 * Admin Utilities
 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    background: rgba(45, 50, 90, 0.8) !important;
    border-color: var(--clr-primary) !important;
    box-shadow: var(--shadow-glow);
}

.badge-admin {
    background: rgba(124,58,237,0.2) !important;
    color: var(--clr-primary) !important;
    border: 1px solid rgba(124,58,237,0.3);
}

.badge-live {
    background: rgba(239, 68, 68, 0.2) !important;
    color: var(--clr-danger) !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); opacity: 1; }
    50% { opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}
