:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
}

/* Base styles */
body {
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url('https://images.unsplash.com/photo-1552674605-db6ffd4facb5?auto=format&fit=crop&q=80') center/cover no-repeat fixed;
    color: #ffffff;
}

/* Form styles */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 10px;
    padding: 0.75rem;
}

/* Login and Register form specific styles */
.login-form .form-control,
.register-form .form-control {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #333 !important;
}

.login-form .form-control::placeholder,
.register-form .form-control::placeholder {
    color: #666;
}

.login-form .form-label,
.register-form .form-label {
    color: white;
}

/* Password visibility toggle styles */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-radius: 10px 0 0 10px !important;
    height: 42px;
    padding: 0.75rem;
}

.input-group .btn-outline-secondary {
    position: relative;
    height: 42px;
    width: 42px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-left: none;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
}

.input-group .btn-outline-secondary:hover {
    color: var(--primary-color);
}

.input-group .btn-outline-secondary i {
    font-size: 1.2rem;
    line-height: 42px;
    pointer-events: none;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(76, 175, 80, 0.25) !important;
}

/* Button styles */
.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Achievement card styles */
.achievement-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 2.5rem;
    margin: 1rem 0;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Text styles */
.best-time {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.distance-type {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.title {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.welcome-container {
    margin-top: 80px;  /* Ajoute de l'espace au-dessus du titre */
    padding: 20px;
}

.runner-name {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}


.welcome-container {
    margin-top: 60px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-container h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.mode-toggles {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.toggle-btn {
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toggle-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Dark mode styles */
body.dark-mode {
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)),
                url('https://images.unsplash.com/photo-1552674605-db6ffd4facb5?auto=format&fit=crop&q=80') center/cover no-repeat fixed;
}

.dark-mode .achievement-card {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Fullscreen mode styles */
.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
                url('https://images.unsplash.com/photo-1552674605-db6ffd4facb5?auto=format&fit=crop&q=80') center/cover no-repeat fixed;
    overflow: auto !important;
    padding: 0 !important; /* Supprime le padding */
}

/* Cache tous les éléments de contrôle en mode plein écran */
.fullscreen-mode .mode-toggles,
.fullscreen-mode .units-toggle,
.fullscreen-mode .language-selector {
    display: none !important;
}

/* Ajuster le style du nom et du bouton d'édition en mode plein écran */
.fullscreen-mode .runner-name {
    font-size: 3.5rem;
    margin: 1rem 0;
}

.fullscreen-mode #editUsernameBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-mode .runner-info:hover #editUsernameBtn {
    opacity: 1;
}

.fullscreen-mode #editUsernameForm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.fullscreen-mode .container {
    padding: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    height: 100vh !important;
    justify-content: center !important;
}

.fullscreen-mode .welcome-container,
.fullscreen-mode .achievements-container {
    width: 100% !important;
    max-width: 1400px !important;
    padding: 0 2rem !important;
}

.fullscreen-mode .row {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    margin: 0 !important;
}

/* Fullscreen mode styles */
.fullscreen-mode .edit-profile-btn,
.fullscreen-mode .admin-controls,
.fullscreen-mode .edit-controls,
.fullscreen-mode .btn-group,
.fullscreen-mode .d-flex.justify-content-between {
    display: none !important;
}

.fullscreen-mode .profile-header h1 {
    justify-content: center;
}

.fullscreen-mode .achievement-card {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.5);
    margin: 1rem !important;
    padding-bottom: 1.5rem !important;
}

.fullscreen-mode .admin-controls,
.fullscreen-mode .edit-controls,
.fullscreen-mode .btn-group,
.fullscreen-mode .d-flex.justify-content-between {
    display: none !important;
}

.fullscreen-mode .mode-toggles {
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.fullscreen-mode .mode-toggles:hover {
    opacity: 1;
}

.fullscreen-mode .achievement-card {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
    
    .achievement-card {
        backdrop-filter: none;
        background: rgba(255, 255, 255, 0.15);
    }
    
    .mode-toggles {
        position: relative;
        top: 0;
        right: 0;
        justify-content: center;
        flex-wrap: wrap;
        padding: 10px;
    }
}

#editUsernameForm {
    max-width: 300px;
    margin: 0 auto;
}

#editUsernameBtn {
    padding: 2px 8px;
    font-size: 0.8em;
}

/* Title styles */
.container h1 {
    color: white;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Units toggle button styles */
.units-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px;
    position: relative;
    width: 120px;
}

.units-toggle a {
    flex: 1;
    text-align: center;
    padding: 8px 15px;
    color: white;
    text-decoration: none;
    border-radius: 17px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.units-toggle a.active {
    color: #333;
    font-weight: 500;
}

.units-toggle::before {
    content: '';
    position: absolute;
    width: 50%;
    height: calc(100% - 6px);
    background: white;
    border-radius: 15px;
    transition: transform 0.3s ease;
    left: 3px;
    top: 3px;
}

.units-toggle.miles::before {
    transform: translateX(100%);
}

.language-selector .form-select {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
}

.language-selector .form-select option {
    background-color: #333;
    color: white;
}

.language-selector .form-select:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.profile-header {
    padding: 2rem 0;
}

.profile-header h1 {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.edit-profile-btn {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.edit-profile-btn:hover {
    color: var(--primary-color);
}

.edit-profile-btn i {
    font-size: 0.9rem;
}

.edit-profile-form {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);

.edit-profile-form .input-group {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.edit-profile-form .form-control {
    border: none;
    padding: 1rem;
    font-size: 1.2rem;
}

.edit-profile-form .btn {
    padding: 0 1.5rem;
}