/**
 * Sports Event Registration System - Premium Stylesheet
 * Modern, vibrant design with smooth animations
 */

/* ============================================
   ROOT VARIABLES & RESET
   ============================================ */
:root {
    /* Color Palette */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    
    /* Neutrals */
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-headings: 'Poppins', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

body {
    font-family: var(--font-primary);
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: var(--gradient-hero);
    padding: 4rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-title {
    font-family: var(--font-headings);
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

.hero-title i {
    font-size: 3.5rem;
    animation: bounce 2s infinite;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.step.active .step-number {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.step.active .step-label {
    color: var(--primary-color);
}

.step-line {
    width: 100px;
    height: 3px;
    background: var(--border-color);
    margin: 0 1rem;
    position: relative;
    top: -25px;
}

/* ============================================
   FORM CARDS
   ============================================ */
.form-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideInUp 0.6s ease-out;
}

.form-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem 2rem;
}

.card-title {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title i {
    font-size: 1.75rem;
}

.card-subtitle {
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
    opacity: 0.95;
}

.card-body {
    padding: 2rem;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.required {
    color: var(--danger-color);
    margin-left: 0.25rem;
}

.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-control:hover,
.form-select:hover {
    border-color: var(--primary-light);
}

.invalid-feedback {
    display: none;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid,
.form-control.is-invalid {
    border-color: var(--danger-color);
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.was-validated .form-control:valid {
    border-color: var(--success-color);
}

/* ============================================
   GAME INFO BOX
   ============================================ */
.game-info {
    animation: fadeIn 0.5s ease-out;
}

.info-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.info-item i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.game-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

/* ============================================
   PLAYER CARDS
   ============================================ */
.players-container {
    display: grid;
    gap: 1.5rem;
}

.player-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.3s ease;
    animation: fadeInScale 0.4s ease-out;
}

.player-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.player-header {
    margin-bottom: 1rem;
}

.player-title {
    font-family: var(--font-headings);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-title i {
    font-size: 1.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.submit-btn {
    background: var(--gradient-primary);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn i {
    font-size: 1.5rem;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.spinner-container {
    text-align: center;
}

.spinner-border {
    width: 4rem;
    height: 4rem;
}

.loading-text {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    min-width: 350px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: none;
}

.toast-header {
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    padding: 1rem;
    font-weight: 600;
}

.toast-body {
    padding: 1rem;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title i {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .progress-indicator {
        padding: 1rem;
    }
    
    .step-line {
        width: 50px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .card-header {
        padding: 1.25rem 1.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .submit-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .info-box {
        flex-direction: column;
        gap: 1rem;
    }
    
    .toast {
        min-width: 300px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .progress-indicator {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-line {
        width: 3px;
        height: 50px;
        margin: 0.5rem 0;
        top: 0;
    }
    
    .player-card {
        padding: 1rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
