/* ===================================
   PROFESSIONAL BRAWL STARS THEME
   Clean, modern design with subtle gaming touches
   =================================== */

/* ==================== TYPOGRAPHY ==================== */
@font-face {
    font-family: 'Nougat';
    src: url('../nougat.ttf') format('truetype');
    font-weight: 400 900;
    font-display: swap;
}

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Brand Colors - Carefully selected from Brawl Stars palette */
    --brand-primary: #3e49bb;     /* Deep blue - professional yet recognizable */
    --brand-secondary: #ff9a00;   /* Orange - accent color for highlights */
    --brand-success: #32c12c;     /* Green - for positive actions */
    --brand-danger: #d40c00;      /* Red - for warnings/danger */
    --brand-warning: #ffcd00;     /* Yellow - for attention */
    
    /* Team Colors */
    --team-blue: #526eff;         /* Lighter blue for Team 1 */
    --team-red: #e34c22;          /* Red-orange for Team 2 */
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
    --text-inverse: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: var(--gray-50);
    --bg-muted: var(--gray-100);
    
    --border-light: var(--gray-200);
    --border-medium: var(--gray-300);
    --border-dark: var(--gray-400);
    
    /* Typography Scale */
    --font-display: 'Nougat', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    
    /* Spacing */
    --space-1: 0.25rem;    /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    
    /* Border Radius */
    --radius-sm: 0.25rem;  /* 4px */
    --radius-md: 0.5rem;   /* 8px */
    --radius-lg: 0.75rem;  /* 12px */
    --radius-xl: 1rem;     /* 16px */
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ==================== BASE STYLES ==================== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle background with readability overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.06;
    z-index: -1;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--space-4) 0;
    color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

.text-brand { color: var(--brand-primary); }
.text-accent { color: var(--brand-secondary); }
.text-muted { color: var(--text-muted); }

/* ==================== LAYOUT COMPONENTS ==================== */

/* Navigation */
.navbar-brand {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 900;
    color: var(--brand-primary) !important;
    text-decoration: none;
}

.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: var(--space-3) 0;
}

.navbar-nav .nav-link {
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
    display: flex;
    align-items: center;
    margin: 0 var(--space-1);
}

.navbar-nav .nav-link:hover {
    color: var(--brand-primary);
    background: var(--gray-50);
    transform: translateY(-1px);
}

.navbar-nav .nav-link:focus {
    color: var(--brand-primary);
    background: var(--gray-100);
    outline: none;
}

.navbar-nav .nav-link.active {
    color: var(--brand-primary);
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
    font-weight: 600;
}

/* Cards */
.card-professional {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.card-professional:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.card-professional .card-header {
    background: linear-gradient(135deg, var(--brand-primary), #4c5fd7);
    color: var(--text-inverse);
    border: none;
    padding: var(--space-4) var(--space-6);
    font-family: var(--font-display);
    font-weight: 600;
}

.card-professional .card-body {
    padding: var(--space-6);
}

/* ==================== BUTTONS ==================== */
.btn-professional {
    font-family: var(--font-display);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    padding: var(--space-3) var(--space-5);
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    cursor: pointer;
}

.btn-professional:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-professional:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-professional.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), #4c5fd7);
    color: var(--text-inverse);
}

.btn-professional.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-professional.btn-accent {
    background: linear-gradient(135deg, var(--brand-secondary), #ffb133);
    color: var(--text-inverse);
}

.btn-professional.btn-success {
    background: var(--brand-success);
    color: var(--text-inverse);
}

.btn-professional.btn-danger {
    background: var(--brand-danger);
    color: var(--text-inverse);
}

/* Special CTA Button - Start Drafting */
.btn-cta {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    border: none;
    background: linear-gradient(135deg, var(--brand-secondary), #ff7b00);
    color: var(--text-inverse);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 14px 0 rgba(255, 154, 0, 0.39);
    position: relative;
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(255, 154, 0, 0.5);
    background: linear-gradient(135deg, #ff7b00, var(--brand-secondary));
}

.btn-cta:hover::before {
    left: 100%;
}

.btn-cta:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(255, 154, 0, 0.45);
}

.btn-cta i {
    font-size: var(--text-xl);
}

/* Extra Large CTA Button for Hero Section */
.btn-cta-xl {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--text-2xl);
    padding: var(--space-6) var(--space-12);
    border-radius: var(--radius-xl);
    border: none;
    background: linear-gradient(135deg, var(--brand-secondary), #ff7b00);
    color: var(--text-inverse);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 6px 20px 0 rgba(255, 154, 0, 0.4);
    position: relative;
    overflow: hidden;
    min-width: 280px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-cta-xl::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--transition-slow);
}

.btn-cta-xl:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px 0 rgba(255, 154, 0, 0.6);
    background: linear-gradient(135deg, #ff7b00, var(--brand-secondary));
}

.btn-cta-xl:hover::before {
    left: 100%;
}

.btn-cta-xl:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px 0 rgba(255, 154, 0, 0.5);
}

.btn-cta-xl i {
    font-size: var(--text-3xl);
}

/* Enhanced outline button for secondary actions */
.btn-outline-primary {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    border: 2px solid var(--brand-primary);
    background: transparent;
    color: var(--brand-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-outline-primary:hover {
    background: var(--brand-primary);
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* ==================== GAMING ELEMENTS ==================== */

/* Team Colors */
.team-blue {
    color: var(--team-blue);
    border-color: var(--team-blue);
}

.team-red {
    color: var(--team-red);
    border-color: var(--team-red);
}

.bg-team-blue {
    background-color: rgba(82, 110, 255, 0.1);
    border-left: 4px solid var(--team-blue);
}

.bg-team-red {
    background-color: rgba(227, 76, 34, 0.1);
    border-left: 4px solid var(--team-red);
}

/* Status Indicators */
.status-success {
    color: var(--brand-success);
    background-color: rgba(50, 193, 44, 0.1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
}

.status-danger {
    color: var(--brand-danger);
    background-color: rgba(212, 12, 0, 0.1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
}

.status-warning {
    color: var(--brand-warning);
    background-color: rgba(255, 205, 0, 0.1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
}

/* ==================== SPECIFIC COMPONENTS ==================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--brand-primary), #4c5fd7);
    color: var(--text-inverse);
    padding: var(--space-12) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../background.png');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--text-4xl);
    font-weight: 900;
    margin-bottom: var(--space-4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: var(--text-xl);
    opacity: 0.9;
    margin-bottom: var(--space-8);
}

/* Map Selection Cards */
.map-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    height: 100%;
}

.map-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.map-card-image {
    height: 160px;
    background: linear-gradient(135deg, var(--brand-primary), #4c5fd7);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.map-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../background.png');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.map-card-image i {
    font-size: 3rem;
    color: var(--text-inverse);
    z-index: 1;
    position: relative;
}

.map-card-content {
    padding: var(--space-5) var(--space-5) var(--space-3) var(--space-5);
}

.map-card-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.map-card-mode {
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
}

/* Game Mode Badges */
.game-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--brand-secondary);
    color: var(--text-inverse);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-xl);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-xl);
    margin-bottom: var(--space-6);
}

/* ==================== UTILITY CLASSES ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

.transition-fast { transition: all var(--transition-fast); }
.transition-normal { transition: all var(--transition-normal); }
.transition-slow { transition: all var(--transition-slow); }

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation delays for multiple elements */
.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
    }
    
    .card-professional .card-body {
        padding: var(--space-4);
    }
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.btn-professional:focus,
.map-card:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* ==================== COMPETITIVE ALERT SECTION ==================== */
.competitive-alert-section {
    padding: var(--space-6) 0;
    background: var(--bg-secondary);
}

.competitive-notice-card {
    background: var(--bg-primary);
    border: 2px solid var(--brand-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    position: relative;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.competitive-notice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-secondary), var(--brand-warning), var(--brand-secondary));
}

.notice-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-4);
}

.notice-icons {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.rank-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.notice-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.notice-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.notice-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--text-lg);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.notice-close:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

/* ==================== DATA TRANSPARENCY SECTION ==================== */
.data-transparency-section {
    background: var(--bg-primary);
    padding: var(--space-12) 0;
}

.data-tier-card {
    text-align: center;
    padding: var(--space-8) var(--space-6);
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    height: 100%;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.data-tier-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-success);
}

.data-tier-card.premium::before {
    background: linear-gradient(90deg, var(--brand-warning), var(--brand-secondary));
}

.data-tier-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.tier-icon {
    font-size: 3rem;
    color: var(--brand-success);
    margin-bottom: var(--space-4);
}

.data-tier-card.premium .tier-icon {
    color: var(--brand-warning);
}

.tier-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.tier-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}
.algorithm-section {
    padding: var(--space-12) 0;
    background: var(--bg-muted);
}

.algorithm-card {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    height: 100%;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.algorithm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
}

.algorithm-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.algorithm-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: var(--text-inverse);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    font-weight: 700;
    margin: 0 auto var(--space-4);
    font-family: var(--font-display);
}

.algorithm-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    font-family: var(--font-display);
}

.algorithm-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.algorithm-detail-card {
    background: var(--bg-primary);
    border: 2px solid var(--brand-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    position: relative;
}

.algorithm-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-primary));
}

.algorithm-list {
    list-style: none;
    padding-left: 0;
}

.algorithm-list li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

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

/* ==================== DATA TRANSPARENCY SECTION ==================== */

