/* marathonapp/static/marathonapp/css/style.css */

/* ===== VARIABLES ===== */
:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary: #ffffff;
    --accent: #10b981;
    --light: #f8f9fa;
    --dark: #1f2937;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 100vh;
    padding-top: 76px;
    animation: fadeIn 0.8s ease-out;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary);
}

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.navbar-scrolled {
    padding: 10px 0 !important;
    box-shadow: var(--shadow-lg);
}

.logo-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
}

/* ===== REGISTRATION FORM ===== */
.registration-container {
    animation: fadeIn 0.8s ease-out;
}

.registration-card {
    background: var(--secondary);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--primary-light);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideIn 0.6s ease-out;
}

.registration-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.2);
}

.registration-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.registration-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.form-control {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.form-label i {
    margin-right: 8px;
    color: var(--primary-light);
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.3);
}

.btn-primary::after {
    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;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent) 0%, #34d399 100%);
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

/* ===== SUCCESS PAGE ===== */
.success-card {
    animation: float 3s ease-in-out infinite;
    border: 3px solid var(--accent);
}

.success-icon {
    font-size: 4rem;
    color: var(--accent);
    animation: pulse 2s infinite;
}

.bib-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: fadeIn 1s ease-out;
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease-out;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 5px solid var(--accent);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 5px solid var(--primary-light);
}

/* ===== CARD HOVER EFFECTS ===== */
.card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* ===== FORM VALIDATION ===== */
.is-invalid {
    border-color: #ef4444 !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    body {
        padding-top: 66px;
    }
    
    .registration-card {
        margin: 15px;
    }
    
    .bib-number {
        font-size: 2rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar, footer, .btn {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        background: white !important;
    }
    
    .registration-card {
        box-shadow: none !important;
        border: 2px solid #000 !important;
    }
}