/* ========================================
   GWALIA UNITED FC - MODERN DESIGN SYSTEM
   Inspired by FIFA 26 / EA FC 26
   ======================================== */

:root {
    /* Brand Colors */
    --primary-color: #b60001;
    --success-color: #1a1c20;
    --warning-color: #f0b388;
    --danger-color: #ff0101;
    --info-color: #f0b388;
    --deep-red: #b60001;
    --light-red: #ff0101;
    --sunshine-yellow: #f0b388;
    --corporate-green: #1a1c20;
    
    /* Dark Theme Colors */
    --dark-bg: #0a0b0d;
    --dark-card: #1a1c20;
    --dark-card-light: #252830;
    --dark-border: #2d3139;
    --text-primary: #ffffff;
    --text-secondary: #b0b3ba;
    --text-muted: #6b7280;
    
    /* Gradients */
    --gradient-red: linear-gradient(135deg, #b60001 0%, #8a0001 100%);
    --gradient-dark: linear-gradient(135deg, #1a1c20 0%, #0a0b0d 100%);
    --gradient-gold: linear-gradient(135deg, #f0b388 0%, #d9a377 100%);
    --gradient-card: linear-gradient(135deg, rgba(26, 28, 32, 0.95) 0%, rgba(37, 40, 48, 0.95) 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.6);
    --glow-red: 0 0 20px rgba(182, 0, 1, 0.4);
    --glow-gold: 0 0 20px rgba(240, 179, 136, 0.3);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* ========================================
   NAVIGATION BAR - FIFA STYLE
   ======================================== */

.navbar {
    background: var(--gradient-red) !important;
    box-shadow: var(--shadow-lg);
    padding: 1rem 0;
    border-bottom: 2px solid rgba(240, 179, 136, 0.3);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: white !important;
    text-shadow: var(--shadow-sm);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1.2rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0 0.2rem;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

/* ========================================
   MODERN CARDS - EA FC STYLE
   ======================================== */

.card {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(240, 179, 136, 0.3);
}

.card-header {
    background: linear-gradient(135deg, rgba(182, 0, 1, 0.2) 0%, rgba(138, 0, 1, 0.1) 100%);
    border-bottom: 1px solid var(--dark-border);
    padding: 1.2rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    border-radius: 16px 16px 0 0 !important;
}

.card-body {
    padding: 1.5rem;
    color: var(--text-secondary);
}

/* ========================================
   DASHBOARD STATS CARDS - FIFA STYLE
   ======================================== */

.stat-box {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-box:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(240, 179, 136, 0.4);
}

.clickable-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.clickable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(240, 179, 136, 0.1), transparent);
    transition: left 0.5s ease;
}

.clickable-card:hover::before {
    left: 100%;
}

.clickable-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--sunshine-yellow);
}

/* Responsive number sizing in cards */
.display-3 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1;
}

.card-body .display-3 {
    margin-bottom: 0.75rem !important;
}

/* ========================================
   PLAYER CARDS - EA FC STYLE
   ======================================== */

.player-card {
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.player-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(182, 0, 1, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.player-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--glow-red);
    border-color: var(--deep-red);
}

.player-rating {
    background: var(--gradient-red);
    color: white;
    font-weight: 800;
    font-size: 1.5rem;
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    text-shadow: var(--shadow-sm);
    flex-shrink: 0;
    line-height: 1;
    padding: 0.25rem;
}

.player-position {
    background: var(--gradient-gold);
    color: var(--dark-bg);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   STAT BARS - FIFA STYLE
   ======================================== */

.stat-bar-container {
    margin-bottom: 1rem;
}

.stat-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-bar-value {
    color: var(--sunshine-yellow);
    font-weight: 700;
}

.stat-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.stat-bar-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 10px;
    transition: width 0.6s ease;
    box-shadow: 0 0 10px rgba(240, 179, 136, 0.5);
}

.stat-bar-fill.high {
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.stat-bar-fill.low {
    background: linear-gradient(90deg, #ff0101 0%, #b60001 100%);
    box-shadow: 0 0 10px rgba(255, 1, 1, 0.5);
}

/* ========================================
   TABLES - MODERN STYLE
   ======================================== */

.table {
    color: var(--text-secondary);
    background: transparent;
}

.table thead th {
    background: var(--dark-card);
    border-bottom: 2px solid var(--dark-border);
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 1rem;
}

.table tbody tr {
    background: rgba(26, 28, 32, 0.3);
    border-bottom: 1px solid var(--dark-border);
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(182, 0, 1, 0.1);
    transform: translateX(4px);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* ========================================
   BADGES - EA FC STYLE
   ======================================== */

.badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.bg-success {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
    color: white;
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
}

.badge.bg-warning {
    background: var(--gradient-gold) !important;
    color: var(--dark-bg);
    box-shadow: 0 2px 8px rgba(240, 179, 136, 0.3);
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ff0101 0%, #b60001 100%) !important;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 1, 1, 0.3);
}

/* ========================================
   BUTTONS - MODERN STYLE
   ======================================== */

.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: var(--gradient-red);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff0101 0%, #b60001 100%);
    box-shadow: var(--shadow-md), var(--glow-red);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-warning {
    background: var(--gradient-gold);
    color: var(--dark-bg);
    box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d9a377 0%, #c59366 100%);
    box-shadow: var(--shadow-md), var(--glow-gold);
    transform: translateY(-2px);
}

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

.btn-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--sunshine-yellow);
    color: var(--text-primary);
}

.btn-outline-primary {
    border: 2px solid var(--deep-red);
    color: var(--deep-red);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-red);
    border-color: var(--deep-red);
    color: white;
}

.btn-outline-success {
    border: 2px solid #4ade80;
    color: #4ade80;
    background: transparent;
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-color: #4ade80;
    color: white;
}

.btn-outline-warning {
    border: 2px solid var(--sunshine-yellow);
    color: var(--sunshine-yellow);
    background: transparent;
}

.btn-outline-warning:hover {
    background: var(--gradient-gold);
    border-color: var(--sunshine-yellow);
    color: var(--dark-bg);
}

.btn-outline-danger {
    border: 2px solid var(--light-red);
    color: var(--light-red);
    background: transparent;
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #ff0101 0%, #b60001 100%);
    border-color: var(--light-red);
    color: white;
}

/* ========================================
   FORMS - MODERN STYLE
   ======================================== */

.form-control, .form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--sunshine-yellow);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(240, 179, 136, 0.2);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ========================================
   ALERTS - MODERN STYLE
   ======================================== */

.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2) 0%, rgba(34, 197, 94, 0.2) 100%);
    border-left: 4px solid #4ade80;
    color: #4ade80;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(240, 179, 136, 0.2) 0%, rgba(217, 163, 119, 0.2) 100%);
    border-left: 4px solid var(--sunshine-yellow);
    color: var(--sunshine-yellow);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(255, 1, 1, 0.2) 0%, rgba(182, 0, 1, 0.2) 100%);
    border-left: 4px solid var(--light-red);
    color: var(--light-red);
}

.alert-info {
    background: linear-gradient(135deg, rgba(240, 179, 136, 0.15) 0%, rgba(217, 163, 119, 0.15) 100%);
    border-left: 4px solid var(--sunshine-yellow);
    color: var(--text-primary);
}

/* ========================================
   PITCH STYLE - FIFA FORMATION VIEW
   ======================================== */

.formation-pitch {
    background: linear-gradient(180deg, #1a5f3a 0%, #145230 50%, #1a5f3a 100%);
    background-image: 
        linear-gradient(180deg, #1a5f3a 0%, #145230 50%, #1a5f3a 100%),
        repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(255, 255, 255, 0.1) 35px, rgba(255, 255, 255, 0.1) 36px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.formation-pitch::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   LIST GROUPS - MODERN STYLE
   ======================================== */

.list-group-item {
    background: rgba(26, 28, 32, 0.5);
    border: 1px solid var(--dark-border);
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: rgba(182, 0, 1, 0.1);
    border-color: rgba(240, 179, 136, 0.3);
    color: var(--text-primary);
    transform: translateX(4px);
}

.list-group-item-action {
    cursor: pointer;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-gradient-red {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-red {
    box-shadow: var(--glow-red);
}

.glow-gold {
    box-shadow: var(--glow-gold);
}

.glow-green {
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    background: rgba(182, 0, 1, 0.05);
}

/* ========================================
   COLOR OVERRIDES
   ======================================== */

.bg-primary {
    background: var(--gradient-red) !important;
}

.bg-success {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
}

.bg-warning {
    background: var(--gradient-gold) !important;
}

.bg-danger {
    background: linear-gradient(135deg, #ff0101 0%, #b60001 100%) !important;
}

.text-primary {
    color: var(--deep-red) !important;
}

.text-success {
    color: #4ade80 !important;
}

.text-warning {
    color: var(--sunshine-yellow) !important;
}

.text-danger {
    color: var(--light-red) !important;
}

.text-dark {
    color: var(--text-primary) !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .player-card {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   PROFILE IMAGE STYLES
   ======================================== */

.player-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--sunshine-yellow);
    box-shadow: var(--shadow-lg);
}

.player-avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--dark-border);
}

.player-avatar-large {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--sunshine-yellow);
    box-shadow: var(--shadow-xl), var(--glow-gold);
}

/* Default avatar when no image */
.default-avatar {
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sunshine-yellow);
}

.default-avatar-small {
    font-size: 1.2rem;
}

.default-avatar-large {
    font-size: 4rem;
}
