/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Font - A4 Speed */
@font-face {
    font-family: 'A4 Speed';
    src: url('../fonts/A4SPEED-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #7c1f1f;
    --primary-light: #9b2828;
    --primary-dark: #5c1717;
    --secondary: #15151e;
    --accent: #a82a2a;
    --bg-dark: #0d0d13;
    --bg-card: #1a1a24;
    --text-light: #ffffff;
    --text-gray: #9ca3af;
    --border: #2a2a35;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --font-heading: 'A4 Speed', 'Arial Black', sans-serif;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a24 100%);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
}

/* Headings con font A4 Speed */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: bold;
    letter-spacing: 1px;
}

/* Icone Font Awesome con colore PaddockHub */
.fas, .fa, .far, .fal, .fab,
i.fas, i.fa, i.far, i.fal, i.fab {
    color: var(--primary) !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(21, 21, 30, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(225, 6, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
}

.logo-img {
    height: 32px;
    width: auto;
    transition: opacity 0.3s ease;
}

.logo a:hover .logo-img {
    opacity: 0.85;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo a:hover .logo-text {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--text-light);
}

.btn-login, .btn-register {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

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

.btn-login:hover {
    background: var(--primary);
    color: white;
}

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

.btn-register:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* User Menu */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--bg-card);
}

.username {
    font-weight: 600;
    color: var(--text-light);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-primary {
    background: var(--info);
    color: white;
}

.badge-secondary {
    background: var(--text-gray);
    color: white;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.user-menu:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown a:hover {
    background: var(--primary);
}

/* Super Admin Bar */
.super-admin-bar {
    background: linear-gradient(135deg, rgba(225, 6, 0, 0.95), rgba(255, 30, 0, 0.85));
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    box-shadow: 0 2px 15px rgba(225, 6, 0, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 70px;
    z-index: 999;
}

.super-admin-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.super-admin-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: white;
    font-size: 0.95rem;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.super-admin-badge i {
    font-size: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.super-admin-nav {
    display: flex;
    gap: 5px;
    flex: 1;
    justify-content: flex-end;
}

.super-admin-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.super-admin-nav .nav-link:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.super-admin-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.super-admin-nav .nav-link i {
    font-size: 1rem;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

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

.alert-success {
    background: var(--success);
    color: white;
}

.alert-danger {
    background: var(--danger);
    color: white;
}

.alert-warning {
    background: var(--warning);
    color: white;
}

.alert-info {
    background: var(--info);
    color: white;
}

.alert-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
}

/* Hero Section */
.hero {
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    min-height: 100vh;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image: linear-gradient(135deg, rgba(13, 13, 19, 0.90) 0%, rgba(26, 26, 36, 0.80) 100%),
                      url('/static/img/background.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    text-align: center;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(225, 6, 0, 0.2);
    border-color: var(--primary);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.feature-card .icon i {
    font-size: 3rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.feature-card p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

/* ============================================
   SISTEMA CARD UNIFICATO
   ============================================ */

/* Card Standard - Utilizzare questa per coerenza globale */
.card-standard {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-standard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.card-standard:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(225, 6, 0, 0.2);
    border-color: var(--primary);
}

.card-standard:hover::before {
    transform: scaleY(1);
}

.card-header-standard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-header-standard h3 {
    color: var(--text-light);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header-standard h3 i {
    color: var(--primary);
}

.card-body-standard {
    color: var(--text-gray);
}

.card-footer-standard {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   SISTEMA BOTTONI STANDARDIZZATO
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn i {
    font-size: 1rem;
    color: inherit;
}

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

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(225, 6, 0, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-light);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--text-gray);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #0d9668;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-info:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

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

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

.btn-outline-secondary {
    background: transparent;
    color: var(--text-gray);
    border: 2px solid var(--border);
}

.btn-outline-secondary:hover {
    background: var(--secondary);
    color: var(--text-light);
    border-color: var(--text-gray);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 31, 31, 0.3);
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   FINE SISTEMA UNIFICATO
   ============================================ */
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(225, 6, 0, 0.2);
    border-color: var(--primary);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.feature-card p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* Dashboard */
.dashboard {
    padding: 2rem;
}

.dashboard h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(225, 6, 0, 0.2);
}

.stat-icon {
    font-size: 3rem;
}

.stat-content h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--text-gray);
}

/* Auth Pages */
.auth-container {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-check input {
    width: auto;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1.1rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-gray);
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Race Calendar */
.race-calendar {
    padding: 2rem;
}

.calendar-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calendar-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.year-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.year-btn {
    padding: 0.5rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s;
}

.year-btn:hover {
    border-color: var(--primary);
    color: var(--text-light);
}

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

.race-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text-light);
}

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

.races-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.race-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    min-height: 320px;
}

.race-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(225, 6, 0, 0.2);
    border-color: var(--primary);
}

.race-round {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    z-index: 10;
}

.race-flag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
}

.race-flag img {
    width: 70px;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.circuit-layout-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 400px;
    opacity: 0.12;
    z-index: 1;
    pointer-events: none;
}

.circuit-layout-overlay img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.race-content {
    position: relative;
    z-index: 5;
    padding-top: 3rem;
}

.race-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.3;
}

.race-location h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.race-name {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.race-country {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.race-date {
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.5rem;
}

.circuit-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.info-badge {
    background: rgba(225, 6, 0, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(225, 6, 0, 0.3);
}

.race-sponsor {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-gray);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.sponsor-label {
    color: var(--text-gray);
    font-weight: 600;
}

.loading-spinner {
    text-align: center;
    padding: 4rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.no-races {
    text-align: center;
    padding: 4rem;
    color: var(--text-gray);
    font-size: 1.25rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    padding: 2rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    position: relative;
    padding: 2rem;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text-gray);
    cursor: pointer;
    background: transparent;
    border: none;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--text-light);
}

.race-detail-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.detail-flag {
    flex-shrink: 0;
}

.race-detail-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.circuit-name {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.circuit-location {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.race-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.info-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.info-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.circuit-details,
.sponsor-section,
.description-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.circuit-details h3,
.sponsor-section h3,
.description-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.sponsor-name {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
}

.description-section p {
    color: var(--text-gray);
    line-height: 1.8;
}

.circuit-layout-modal {
    margin: 2rem 0;
    background: transparent;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
}

.circuit-layout-modal img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    opacity: 0.2;
}

/* Profile Page Styles */
.profile-page {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.profile-hero {
    background: linear-gradient(135deg, var(--bg-card) 0%, #15151e 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.profile-avatar-large {
    position: relative;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 10px 30px rgba(225, 6, 0, 0.3);
}

.avatar-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.profile-hero-info {
    flex: 1;
}

.profile-hero-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.username {
    color: var(--text-gray);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.join-date {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.profile-actions-top {
    display: flex;
    gap: 1rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.stat-box:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-box .stat-icon {
    font-size: 2.5rem;
}

.stat-box .stat-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
}

.stat-box .stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-light);
}

.title-icon {
    font-size: 1.5rem;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 8px;
    transition: all 0.3s;
}

.info-item:hover {
    background: rgba(225, 6, 0, 0.05);
}

.info-icon {
    font-size: 1.5rem;
    min-width: 30px;
}

.info-content {
    flex: 1;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 3px var(--border);
}

.timeline-title {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.account-level {
    display: flex;
    justify-content: center;
}

.level-badge {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    width: 100%;
}

.level-admin {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 2px solid var(--danger);
}

.level-user {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border: 2px solid var(--info);
}

.level-guest {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.1) 0%, rgba(107, 114, 128, 0.05) 100%);
    border: 2px solid var(--text-gray);
}

.level-icon {
    font-size: 3rem;
}

.level-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.level-desc {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.permissions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.perm-granted {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--success);
}

.perm-denied {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger);
}

.perm-icon {
    font-size: 1.25rem;
}

.perm-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

.security-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 8px;
}

.security-icon {
    font-size: 1.5rem;
}

.security-content {
    flex: 1;
}

.security-title {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.security-status {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.security-action {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.security-action:hover {
    color: var(--accent);
}

.profile-footer {
    text-align: center;
    padding: 2rem 0;
}

.btn-back {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s;
}

.btn-back:hover {
    border-color: var(--primary);
    color: var(--text-light);
}

/* Edit Profile Page */
.edit-profile-page {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.edit-profile-header {
    text-align: center;
    margin-bottom: 3rem;
}

.edit-profile-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.edit-profile-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

.form-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    padding: 2rem;
    background: var(--bg-dark);
    border-radius: 12px;
}

.security-section {
    background: rgba(225, 6, 0, 0.03);
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.header-icon {
    font-size: 1.75rem;
}

.section-desc {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.label-icon {
    margin-right: 0.5rem;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.security-notice {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--info);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.notice-icon {
    font-size: 1.5rem;
}

.notice-content {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.notice-content strong {
    color: var(--text-light);
}

.password-strength {
    margin-top: 1rem;
}

.strength-bar {
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-secondary {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-gray);
}

.btn-secondary:hover {
    border-color: var(--text-gray);
    color: var(--text-light);
    background: var(--bg-card);
}

/* ====================== ADMIN USERS PAGE ====================== */
.admin-users-page {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.page-header .subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Statistiche Utenti */
.users-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(225, 6, 0, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Controlli Utenti */
.users-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
}

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

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(225, 6, 0, 0.4);
}

/* Tabella Utenti */
.users-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: rgba(225, 6, 0, 0.1);
}

.users-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
}

.users-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.users-table tbody tr {
    transition: all 0.2s ease;
}

.users-table tbody tr:hover {
    background: rgba(225, 6, 0, 0.05);
}

.users-table tbody tr:last-child td {
    border-bottom: none;
}

.loading,
.error,
.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
}

/* User Info Cell */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-light);
}

.user-fullname {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* Role Select */
.role-select {
    padding: 0.5rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-select:focus {
    outline: none;
    border-color: var(--primary);
}

.role-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status Toggle */
.status-toggle {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-toggle.active {
    background: var(--success);
    color: white;
}

.status-toggle.inactive {
    background: var(--danger);
    color: white;
}

.status-toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Email Status */
.email-status {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.email-status.verified {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.email-status.unverified {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Date Cell */
.date-cell {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Pulsanti Azioni */
.btn-edit {
    padding: 0.5rem 1rem;
    background: var(--warning);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
}

.btn-edit:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.btn-delete {
    padding: 0.5rem 1rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-delete:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Admin Modal */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.admin-modal .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.modal-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.warning-text {
    color: var(--danger);
    font-weight: 600;
}

.modal-content .form-group {
    margin-bottom: 1.25rem;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
}

.modal-content .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.modal-content .form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-content .alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.modal-content .alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.modal-actions .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.modal-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(225, 6, 0, 0.4);
}

.modal-actions .btn-secondary {
    background: var(--bg-dark);
    color: var(--text-light);
    border: 1px solid var(--border);
}

.modal-actions .btn-secondary:hover {
    border-color: var(--text-gray);
}

.modal-actions .btn-danger {
    background: var(--danger);
    color: white;
}

.modal-actions .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4);
}

/* Notifiche */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: var(--success);
    color: white;
}

.notification-error {
    background: var(--danger);
    color: white;
}

/* ====================== FOOTER ====================== */
footer {
    background: rgba(21, 21, 30, 0.95);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-content p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0;
}

/* ====================== EVENTI PAGE ====================== */
.events-page {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.events-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.event-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 1.2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(225, 6, 0, 0.4);
    border-color: var(--primary);
}

.event-card.upcoming {
    border-left: 4px solid #00D26B;
}

.event-card.completed {
    border-left: 4px solid #6B7280;
    opacity: 0.85;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.event-title-section {
    flex: 1;
    min-width: 0;
}

.event-series {
    font-size: 1.1rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.2;
}

.event-description {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.event-league {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0.3rem 0 0 0;
}

.event-badges {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-category {
    background: var(--primary);
    color: white;
}

.badge-platform {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.event-sessions {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.session-item {
    flex: 1;
    min-width: 70px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.5rem 0.4rem;
    text-align: center;
    transition: all 0.3s ease;
}

.session-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.session-practice {
    background: rgba(0, 210, 107, 0.15);
    border-color: #00D26B;
}

.session-qualifying {
    background: rgba(236, 72, 153, 0.15);
    border-color: #EC4899;
}

.session-main {
    background: rgba(225, 6, 0, 0.15);
    border-color: var(--primary);
}

.session-duration {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.2rem;
}

.session-type {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.event-conditions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
    z-index: 2;
}

.condition-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
}

.condition-icon {
    font-size: 1.2rem;
}

.condition-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    font-weight: 500;
    text-transform: capitalize;
}

.event-details {
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    margin-bottom: 0.4rem;
}

.detail-row-car {
    position: relative;
    min-height: 70px;
    transition: all 0.3s ease;
}

.detail-row-car:hover {
    background: rgba(220, 38, 38, 0.1);
    border-left-color: #dc2626;
    border-left-width: 4px;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4), inset 0 0 20px rgba(220, 38, 38, 0.1);
    transform: translateX(2px);
}

.detail-row-car:hover .detail-value {
    color: #dc2626;
}

.detail-row-track {
    cursor: pointer;
    transition: all 0.3s ease;
}

.detail-row-track:hover {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
    border-left-width: 4px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4), inset 0 0 20px rgba(59, 130, 246, 0.1);
    transform: translateX(2px);
}

.detail-row-track:hover .detail-value {
    color: #3b82f6;
}

.car-preview-img {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    max-height: 60px;
    max-width: 100px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    opacity: 0;
    animation: fadeInCar 0.5s ease-in forwards;
}

@keyframes fadeInCar {
    to {
        opacity: 1;
    }
}

.detail-icon {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.detail-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    min-width: 45px;
    flex-shrink: 0;
}

.detail-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-schedule {
    position: relative;
    z-index: 2;
    margin-top: auto;
}

.schedule-header {
    margin-bottom: 0.75rem;
}

.schedule-header h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.schedule-list {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.location-flag {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.location-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.schedule-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.time-icon {
    font-size: 0.9rem;
}

.time-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.schedule-status {
    display: flex;
    align-items: center;
}

.status-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-upcoming {
    background: #00D26B;
    color: white;
}

.status-completed {
    background: #6B7280;
    color: white;
}

.btn-details {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, #b00500 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.btn-details:hover {
    background: linear-gradient(135deg, #b00500 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(225, 6, 0, 0.4);
}

.btn-pdf {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.btn-pdf:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

/* Overlay immagine categoria nelle card evento */
.category-layout-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
}

.category-layout-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Manteniamo per compatibilità vecchi eventi */
.circuit-layout-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
}

.circuit-layout-overlay img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: rotate(-10deg) scale(1.2);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Password, Host e Live link nelle card evento */
.password-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.password-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

.password-text strong {
    color: #f59e0b;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.host-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.host-name {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.live-item {
    padding: 0.5rem 0;
}

.live-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.live-link:hover {
    color: #991b1b;
    transform: translateX(4px);
}

.live-link .time-icon {
    color: #dc2626;
}

.live-text {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Event Modal */
.event-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    padding: 2rem;
    overflow-y: auto;
    display: none;
    align-items: flex-start;
    justify-content: center;
}

.event-modal.active {
    display: flex;
}

.event-modal .modal-content {
    background: var(--bg-card);
    max-width: 900px;
    width: 100%;
    margin: 2rem auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    position: relative;
    padding: 2rem;
}

.event-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    padding: 1.5rem;
    background: var(--bg-dark);
    border-radius: 12px;
}

.form-section h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.session-block {
    background: rgba(225, 6, 0, 0.05);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary);
}

.session-block h4 {
    margin-bottom: 0.75rem;
    color: var(--text-light);
    font-size: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn-cancel {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-gray);
}

.btn-cancel:hover {
    border-color: var(--text-gray);
    color: var(--text-light);
}

/* Event Details Modal */
.event-details h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
    text-align: center;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.detail-section {
    background: var(--bg-dark);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 3px solid var(--primary);
}

.detail-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-section p {
    margin: 0.5rem 0;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.detail-section p strong {
    color: var(--text-light);
    font-weight: 600;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-header h1 {
        font-size: 2rem;
    }
    
    .races-grid {
        grid-template-columns: 1fr;
    }
    
    .year-selector {
        flex-direction: column;
    }
    
    .race-filter {
        flex-direction: column;
    }
    
    .profile-hero {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .users-controls {
        flex-direction: column;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .users-table-container {
        overflow-x: auto;
    }
    
    .users-table {
        min-width: 1000px;
    }
}

/* ====================== EMPTY STATE CENTERED ====================== */
.empty-state-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 3rem 1rem;
}

.empty-state-content {
    text-align: center;
    max-width: 600px;
}

.empty-icon {
    font-size: 6rem;
    color: var(--primary);
    margin-bottom: 2rem;
    opacity: 0.8;
}

.empty-state-content h2 {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 700;
}

.empty-state-content p {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(225, 6, 0, 0.5);
}

/* ========================================
   MODAL AUTO CATEGORIA
   ======================================== */

.modal-cars {
    max-width: 1100px;
    max-height: 85vh;
    overflow-y: auto;
}

.cars-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.cars-modal-header h2 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 0.5rem;
}

.cars-count {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.cars-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    padding: 0 1rem;
}

@media (max-width: 1024px) {
    .cars-modal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cars-modal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.car-modal-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.car-modal-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}

.car-modal-image {
    height: 140px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.car-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.car-no-image {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.car-modal-info {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.car-modal-manufacturer {
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.car-modal-name {
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
    margin-bottom: 0.6rem;
    line-height: 1.3;
    min-height: 2.6rem;
}

.car-modal-specs {
    display: flex;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

.car-modal-specs span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.no-cars,
.error-message {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ========================================
   MODAL DETTAGLIO AUTO INGRANDITO
   ======================================== */

.modal-car-detail {
    max-width: 900px;
    padding: 0;
    overflow: hidden;
}

.car-detail-container {
    display: flex;
    flex-direction: column;
}

.car-detail-image {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.car-detail-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
}

.car-no-image-large {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.2);
}

.car-detail-info {
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
}

.car-detail-manufacturer {
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.car-detail-name {
    font-size: 2rem;
    color: white;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.car-detail-category {
    margin-bottom: 1.5rem;
}

.category-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.car-detail-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.spec-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.spec-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.spec-icon {
    font-size: 1.75rem;
    width: 45px;
    height: 45px;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.spec-content {
    flex: 1;
}

.spec-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.spec-value {
    font-size: 0.95rem;
    color: white;
    font-weight: 700;
    word-break: break-word;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .car-detail-image {
        min-height: 300px;
        padding: 2rem;
    }
    
    .car-detail-name {
        font-size: 1.5rem;
    }
    
    .car-detail-specs-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   STILI ANTEPRIMA TRACCIATO
   ======================================== */

.track-country {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

.track-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ========================================
   RESPONSIVE - PROFILE PAGE
   ======================================== */

@media (max-width: 768px) {
    .profile-page {
        margin: 0.5rem auto;
        padding: 0 0.5rem;
    }

    .profile-hero {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
        gap: 1rem;
    }

    .profile-hero-info h1 {
        font-size: 1.5rem;
    }

    .username {
        font-size: 1rem;
    }

    .join-date {
        font-size: 0.8rem;
    }

    .profile-actions-top {
        flex-direction: column;
        width: 100%;
    }

    .profile-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-box {
        padding: 1rem;
    }

    .stat-box .stat-icon {
        font-size: 2rem;
    }

    .stat-box .stat-value {
        font-size: 1rem;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profile-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .title-icon {
        font-size: 1.25rem;
    }

    .info-item {
        padding: 0.75rem;
    }

    .info-icon {
        font-size: 1.25rem;
        min-width: 25px;
    }

    .info-label {
        font-size: 0.75rem;
    }

    .info-value {
        font-size: 0.9rem;
    }

    .level-badge {
        padding: 1rem;
        gap: 1rem;
    }

    .level-icon {
        font-size: 2rem;
    }

    .level-name {
        font-size: 1rem;
    }

    .level-desc {
        font-size: 0.8rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        margin-bottom: 1rem;
    }

    .profile-footer {
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    .profile-page {
        padding: 0 0.25rem;
    }

    .profile-hero {
        padding: 1rem 0.75rem;
    }

    .avatar-circle {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .avatar-badge {
        font-size: 0.65rem;
        padding: 0.35rem 0.75rem;
    }

    .profile-hero-info h1 {
        font-size: 1.25rem;
    }

    .username {
        font-size: 0.9rem;
    }

    .stat-box .stat-icon {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 0.95rem;
    }
}