/* DT-FIFA Tournament - Modern Blue-White-Purple Theme */

:root {
    --primary-color: #2563eb;        /* Bleu moderne */
    --secondary-color: #8b5cf6;      /* Violet */
    --accent-color: #06b6d4;         /* Cyan bleu */
    --text-light: #ffffff;
    --text-dark: #1e293b;
    --background-light: #f8fafc;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
    --gradient-accent: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --shadow-primary: 0 10px 25px rgba(37, 99, 235, 0.15);
    --shadow-secondary: 0 10px 25px rgba(139, 92, 246, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--background-light);
    scroll-behavior: smooth;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 100px;
    animation: fadeInUp 1s ease-out;
}

.fifa-ball {
    font-size: 8rem;
    color: var(--text-light);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
    animation: rotate 15s linear infinite, pulse 2s ease-in-out infinite alternate;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
}

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

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

/* Navigation */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
    font-weight: 700;
}

.navbar-toggler {
    border-color: var(--primary-color);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2837, 99, 235, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::before {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Player Cards */
.player-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

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

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

.player-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-secondary);
    border-color: var(--secondary-color);
}

.player-avatar {
    position: relative;
    z-index: 2;
}

.player-avatar i {
    transition: var(--transition);
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.2));
}

.player-card:hover .player-avatar i {
    color: var(--secondary-color) !important;
    transform: scale(1.1) rotate(5deg);
}

/* Feature Cards */
.feature-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-primary);
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 30px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::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 0.5s ease;
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-light);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-secondary);
}

.btn-warning {
    background: var(--gradient-accent);
    color: var(--text-light);
    box-shadow: var(--shadow-secondary);
}

.btn-warning:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.3);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
}

.btn-outline-light:hover {
    background: var(--text-light);
    border-color: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Roulette Styles */
.roulette-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    background: var(--gradient-secondary);
    filter: drop-shadow(0 20px 40px rgba(37, 99, 235, 0.2));
}

.roulette-wheel {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    position: relative;
    border: 8px solid transparent;
    background: linear-gradient(white, white) padding-box, var(--gradient-primary) border-box;
    box-shadow: var(--shadow-secondary), inset 0 0 20px rgba(255, 255, 255, 0.1);
    transition: transform 3s cubic-bezier(0.23, 1, 0.32, 1);
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    overflow: hidden;
    transition: var(--transition);
}

.wheel-segment:nth-child(odd) {
    background: var(--gradient-primary);
}

.wheel-segment:nth-child(even) {
    background: var(--gradient-accent);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-dark);
    z-index: 10;
    box-shadow: var(--shadow-primary), inset 0 0 10px rgba(255, 255, 255, 0.2);
    border: 3px solid white;
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--primary-color);
    z-index: 5;
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.4));
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

/* Tables */
.table-custom {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-primary);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.table-custom th {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.table-custom td {
    border: none;
    vertical-align: middle;
    transition: var(--transition);
}

.table-custom tbody tr {
    transition: var(--transition);
}

.table-custom tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: scale(1.01);
}

.position-badge {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-primary);
    border: 2px solid white;
}

.position-1 { background: var(--gradient-accent); }
.position-2 { background: linear-gradient(135deg, #e5e7eb, #9ca3af); }
.position-3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.position-other { background: var(--gradient-primary); }

/* Match Cards */
.match-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
    border-left: 5px solid transparent;
    border-image: var(--gradient-primary) 1;
    position: relative;
    overflow: hidden;
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.match-card:hover::before {
    transform: scaleX(1);
}

.match-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-secondary);
}

.match-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.status-en-attente {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.status-en-cours {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.status-termine {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Admin Panel */
.admin-panel {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(37, 99, 235, 0.1);
    box-shadow: var(--shadow-secondary);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.admin-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.form-control {
    border-radius: 12px;
    border: 2px solid rgba(37, 99, 235, 0.1);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15), var(--shadow-primary);
    background: white;
    transform: translateY(-1px);
}

.form-control:hover {
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        text-align: center;
        padding-top: 80px;
    }
    
    .fifa-ball {
        font-size: 4rem;
    }
    
    .roulette-wheel {
        width: 300px;
        height: 300px;
    }
    
    .wheel-segment {
        font-size: 0.6rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .player-card {
        margin-bottom: 20px;
    }
    
    .feature-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .roulette-wheel {
        width: 250px;
        height: 250px;
    }
    
    .wheel-segment {
        font-size: 0.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {
    0%, 100% { box-shadow: var(--shadow-primary); }
    50% { box-shadow: var(--shadow-secondary); }
}

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

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

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

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

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

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

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

.shadow-primary {
    box-shadow: var(--shadow-primary) !important;
}

.shadow-secondary {
    box-shadow: var(--shadow-secondary) !important;
}

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

.border-secondary {
    border-color: var(--secondary-color) !important;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

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

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}