@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@400;600;700;900&display=swap');

:root {
    --f1-red: #E10600;
    --f1-dark: #15151E;
    --f1-gray: #38383F;
    --f1-light-gray: #949498;
    --f1-white: #FFFFFF;
}

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

body {
    font-family: 'Titillium Web', 'Arial Black', sans-serif;
    background-color: var(--f1-white);
    color: #333333;
}

.f1-header {
    background: var(--f1-red);
    padding: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.f1-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--f1-white);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: inline-block;
}

/* Responsive Logo */
@media (max-width: 768px) {
    .f1-logo {
        font-size: 1.8rem;
        gap: 10px;
    }
    
    .logo-img {
        height: 55px;
    }
}

@media (max-width: 480px) {
    .f1-logo {
        font-size: 1.5rem;
        gap: 8px;
        letter-spacing: 2px;
    }
    
    .logo-img {
        height: 45px;
    }
}

.f1-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.f1-nav a {
    color: var(--f1-white);
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.f1-nav a:hover {
    color: var(--f1-light-gray);
}

.f1-nav .navbar-toggler {
    border-color: var(--f1-white);
    padding: 4px 8px;
}

.f1-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.f1-nav .navbar-nav .nav-link {
    color: var(--f1-white);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.f1-nav .navbar-nav .nav-link:hover {
    color: var(--f1-light-gray);
}

@media (max-width: 991.98px) {
    .f1-nav .navbar-nav {
        background-color: var(--f1-red);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
    }
}

.hero-section {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 60px 0 40px;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--f1-red);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #666666;
    letter-spacing: 2px;
}

.races-section {
    padding: 60px 0;
    background-color: var(--f1-white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background-color: var(--f1-red);
    margin: 15px auto 0;
}

.race-card-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.race-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
}

.race-card-link-inner {
    text-decoration: none;
    color: inherit;
    display: block;
}

.race-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.race-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--f1-red);
}

.race-card:hover {
    border-color: var(--f1-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(225, 6, 0, 0.3);
}

.race-card-link-inner:hover {
    cursor: pointer;
}

.race-round {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--f1-red);
    color: var(--f1-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.race-flag {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 35px;
}

.race-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid rgba(225, 6, 0, 0.3);
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.race-sprint {
    position: absolute;
    top: 15px;
    right: 75px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
    border: 2px solid #ffd700;
    animation: pulse 2s infinite;
}

.race-sprint i {
    color: #333;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 5px 15px rgba(255, 215, 0, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
    }
}

/* Responsive Sprint Star */
@media (max-width: 768px) {
    .race-sprint {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        top: 12px;
        right: 65px;
    }
}

@media (max-width: 480px) {
    .race-sprint {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
        top: 10px;
        right: 60px;
    }
}

/* Legend Module - Riutilizzabile */
.legend-module {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.legend-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--f1-dark);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.legend-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.legend-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.legend-sprint {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
    border: 2px solid #ffd700;
}

.legend-sprint i {
    color: #333;
}

.legend-tier-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--f1-white);
}

.legend-tier-badge.tier-1 {
    background: var(--f1-red);
}

.legend-tier-badge.tier-2 {
    background: #ff8c00;
}

.legend-tier-badge.tier-3 {
    background: #22c55e;
}

.legend-label {
    font-size: 0.9rem;
    color: var(--f1-dark);
    font-weight: 500;
    white-space: nowrap;
}

/* Responsive Legend */
@media (max-width: 768px) {
    .legend-module {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .legend-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .legend-items {
        gap: 12px;
    }
    
    .legend-item {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .legend-sprint,
    .legend-tier-badge {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }
    
    .legend-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .legend-items {
        flex-direction: column;
        align-items: center;
    }
    
    .legend-item {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}

/* Legend Section */
.legend-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Tournament Results Page */
.tournament-results-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--f1-white) 0%, #f8f9fa 100%);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-filter {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: var(--f1-dark);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-filter:hover {
    background: #e9ecef;
    border-color: var(--f1-red);
    transform: translateY(-1px);
}

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

.tournament-selector {
    text-align: right;
}

.tournament-selector .form-label {
    font-weight: 600;
    color: var(--f1-dark);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.stat-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--f1-red);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(225, 6, 0, 0.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--f1-red);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--f1-light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tournament-table {
    background: var(--f1-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
}

.tournament-table thead {
    background: linear-gradient(135deg, var(--f1-red) 0%, #ff4757 100%);
    color: var(--f1-white);
}

.tournament-table th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    padding: 15px;
    border: none;
}

.tournament-table td {
    padding: 15px;
    vertical-align: middle;
    border-color: #f0f0f0;
}

.tournament-table tbody tr {
    transition: all 0.3s ease;
}

.tournament-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.round-badge {
    background: var(--f1-red);
    color: var(--f1-white);
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
}

.race-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.flag-mini {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border: 1px solid rgba(225, 6, 0, 0.3);
    border-radius: 3px;
}

.location-cell,
.date-cell,
.qualifying-cell {
    font-size: 0.9rem;
    color: var(--f1-dark);
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-completed {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-badge.status-ongoing {
    background: rgba(255, 165, 0, 0.2);
    color: #ff8c00;
}

.status-badge.status-scheduled {
    background: rgba(225, 6, 0, 0.2);
    color: var(--f1-red);
}

.status-badge.status-planned {
    background: rgba(59, 130, 246, 0.18);
    color: #2563eb;
}

.status-badge.status-cancelled {
    background: rgba(239, 68, 68, 0.18);
    color: #dc2626;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 15px;
}

/* Responsive Tournament Results */
@media (max-width: 768px) {
    .tournament-results-section {
        padding: 40px 0;
    }
    
    .filter-buttons {
        justify-content: center;
        margin-bottom: 20px;
    }
    
    .tournament-selector {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-filter {
        width: 200px;
        text-align: center;
    }
    
    .tournament-table th,
    .tournament-table td {
        padding: 10px 5px;
        font-size: 0.8rem;
    }
    
    .race-name-cell {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
}

/* Tournament Page - View Calendar Button */
.section-header {
    margin-bottom: 30px;
}

.btn-view-calendar {
    background: var(--f1-white);
    border: 2px solid var(--f1-red);
    color: var(--f1-red);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(225, 6, 0, 0.2);
}

.btn-view-calendar:hover {
    background: var(--f1-red);
    color: var(--f1-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 6, 0, 0.3);
    text-decoration: none;
}

.btn-view-calendar i {
    font-size: 1.1rem;
}

/* Responsive Tournament Page */
@media (max-width: 768px) {
    .btn-view-calendar {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .btn-view-calendar i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .btn-view-calendar {
        padding: 8px 16px;
        font-size: 0.75rem;
        flex-direction: column;
        gap: 4px;
        width: 100%;
        max-width: 200px;
    }
}

/* Race Detail - Actions Wrapper */
.race-detail-actions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 20px;
    margin-top: 10px;
}

/* Race Detail - Sprint Race Button */
.race-detail-actions {
    text-align: center;
}

.btn-sprint-race {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-sprint-race:hover {
    background: linear-gradient(135deg, #ff5722 0%, #f4511e 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    text-decoration: none;
}

.btn-sprint-race i {
    font-size: 1.1rem;
    animation: lightning-pulse 2s infinite;
}

/* Race Detail - Parent Race Button */
.btn-parent-race {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-parent-race:hover {
    background: linear-gradient(135deg, #357abd 0%, #2968a8 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    text-decoration: none;
}

.btn-parent-race i {
    font-size: 1.1rem;
    animation: trophy-glow 2s infinite;
}

@keyframes lightning-pulse {
    0%, 100% { 
        transform: scale(1); 
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.1); 
        filter: brightness(1.2);
    }
}

@keyframes trophy-glow {
    0%, 100% { 
        transform: scale(1); 
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.05); 
        filter: brightness(1.1);
    }
}

/* Responsive Race Detail */
@media (max-width: 768px) {
    .race-detail-actions-wrapper {
        padding: 12px 15px;
        gap: 6px;
        margin-top: 8px;
    }
    
    .btn-sprint-race,
    .btn-parent-race {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .btn-sprint-race i,
    .btn-parent-race i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .race-detail-actions-wrapper {
        padding: 10px 15px;
        gap: 5px;
        margin-top: 5px;
    }
    
    .btn-sprint-race,
    .btn-parent-race {
        padding: 8px 16px;
        font-size: 0.75rem;
        width: 100%;
        max-width: 200px;
    }
}

/* Sprint Race Label */
.sprint-race-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    animation: label-glow 2s infinite;
}

.sprint-race-label i {
    font-size: 0.8rem;
    animation: lightning-pulse 2s infinite;
}

@keyframes label-glow {
    0%, 100% { 
        box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.5);
        transform: scale(1.02);
    }
}

.race-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-top: 45px;
}

.race-circuit {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 15px;
}

.race-location {
    font-size: 1rem;
    color: #666666;
    margin-bottom: 10px;
}

.race-date {
    font-size: 1.1rem;
    color: var(--f1-red);
    font-weight: bold;
    margin-top: 15px;
}

.race-status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 10px;
    text-transform: uppercase;
}

.status-scheduled {
    background-color: rgba(225, 6, 0, 0.2);
    color: var(--f1-red);
}

.status-planned {
    background-color: rgba(59, 130, 246, 0.18);
    color: #2563eb;
}

.status-cancelled {
    background-color: rgba(239, 68, 68, 0.18);
    color: #dc2626;
}

.status-ongoing {
    background-color: rgba(255, 165, 0, 0.2);
    color: #ff8c00;
}

.status-completed {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* Race Submit Section */
.race-submit-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.race-countdown {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 24px;
}

.race-countdown i {
    color: var(--f1-red);
    font-size: 1.1rem;
}

.race-countdown strong {
    color: var(--f1-red);
    font-size: 1.1rem;
}

.btn-submit-formation {
    display: inline-block;
    background: linear-gradient(135deg, var(--f1-red) 0%, #c10500 100%);
    color: var(--f1-white);
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(225, 6, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

.btn-submit-formation:hover {
    background: linear-gradient(135deg, #c10500 0%, var(--f1-red) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(225, 6, 0, 0.4);
    color: var(--f1-white);
}

.btn-submit-formation i {
    margin-right: 8px;
}

.btn-submit-formation.btn-disabled {
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
    color: #666666;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.btn-submit-formation.btn-disabled:hover {
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
    transform: none;
    box-shadow: none;
}

.f1-footer {
    background: var(--f1-dark);
    border-top: 4px solid var(--f1-red);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--f1-white);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--f1-light-gray);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--f1-red);
}

.footer-sponsor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sponsor-label {
    color: var(--f1-light-gray);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.sponsor-logo {
    height: 40px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

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

.footer-copyright {
    color: var(--f1-light-gray);
    font-size: 0.9rem;
    margin-top: 20px;
}

.loading-spinner {
    text-align: center;
    padding: 60px 0;
}

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

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

.teams-section {
    padding: 60px 0 40px;
    background-color: var(--f1-white);
}

.drivers-section {
    padding: 40px 0 60px;
    background-color: var(--f1-white);
}

.team-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--f1-red);
}

.team-card:hover {
    border-color: var(--f1-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(225, 6, 0, 0.3);
}

.team-image-container {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.teams-page .teams-page-team-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px 0 4px;
}

.teams-page .teams-page-team-logo {
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.team-car-photo {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.team-flag-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    height: 30px;
}

.team-flag-img {
    width: 40px;
    height: 25px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

.team-flag-emoji {
    font-size: 1.5rem;
    line-height: 1;
}

.team-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.team-engine {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 10px;
}

.team-engine strong {
    color: var(--f1-red);
}

.team-country {
    font-size: 1rem;
    color: #666666;
    margin-top: 10px;
}

.team-flag {
    font-size: 3rem;
    margin-bottom: 15px;
}

.driver-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.driver-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--f1-red);
}

.driver-card:hover {
    border-color: var(--f1-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(225, 6, 0, 0.3);
}

.driver-number {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--f1-red);
    color: var(--f1-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.driver-image-container {
    width: 80px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    position: relative;
}

.driver-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.driver-flag-img {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 30px;
    height: 20px;
    object-fit: cover;
    border: 2px solid var(--f1-white);
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.driver-flag-emoji {
    font-size: 1.2rem;
    margin-right: 5px;
}

.driver-abbr {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--f1-red);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.driver-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.driver-team {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 10px;
}

.driver-nationality {
    font-size: 1rem;
    color: #666666;
    margin-bottom: 5px;
}

.driver-age {
    font-size: 0.9rem;
    color: #666666;
}

.btn-login {
    background-color: var(--f1-dark);
    color: var(--f1-white);
    border: 2px solid var(--f1-dark);
    padding: 8px 25px;
    border-radius: 25px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-login:hover {
    background-color: var(--f1-white);
    color: var(--f1-red);
    border-color: var(--f1-white);
}

.btn-logout {
    background-color: var(--f1-red);
    color: var(--f1-white);
    border: 2px solid var(--f1-red);
    padding: 8px 25px;
    border-radius: 25px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
}

.btn-logout:hover {
    background-color: var(--f1-white);
    color: var(--f1-red);
    border-color: var(--f1-white);
}

.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.auth-card {
    background: var(--f1-white);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

.auth-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--f1-red);
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.auth-subtitle {
    text-align: center;
    color: #666666;
    margin-bottom: 40px;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.required-field {
    color: var(--f1-red);
    font-weight: bold;
    margin-left: 3px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: 'Titillium Web', sans-serif;
}

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

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

.form-control.is-invalid + .invalid-feedback {
    display: block;
}

.btn-primary {
    width: 100%;
    background-color: var(--f1-red);
    color: var(--f1-white);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.auth-switch {
    text-align: center;
    margin-top: 30px;
    color: #666666;
}

.auth-switch a {
    color: var(--f1-red);
    text-decoration: none;
    font-weight: bold;
}

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

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.dashboard-section {
    padding: 60px 0;
    background-color: var(--f1-white);
    min-height: 60vh;
}

.tournament-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tournament-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--f1-red) 0%, #ff6b00 100%);
}

.tournament-card:hover {
    border-color: var(--f1-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(225, 6, 0, 0.3);
}

.tournament-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.tournament-name {
    font-size: 2rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tournament-info {
    margin-bottom: 25px;
}

.tournament-season,
.tournament-date,
.tournament-owner {
    font-size: 1rem;
    color: #666666;
    margin-bottom: 10px;
}

.tournament-season i,
.tournament-date i,
.tournament-owner i {
    color: var(--f1-red);
    margin-right: 5px;
}

.tournament-actions {
    margin-top: auto;
}

.btn-tournament-view {
    display: inline-block;
    background-color: var(--f1-red);
    color: var(--f1-white);
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.btn-tournament-view:hover {
    background-color: #c10500;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(225, 6, 0, 0.3);
    color: var(--f1-white);
}

.no-tournaments-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 40px auto;
}

.tournament-manage-card {
    max-width: none;
}

.no-tournaments-icon {
    font-size: 6rem;
    margin-bottom: 30px;
    opacity: 0.5;
}

.no-tournaments-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.no-tournaments-text {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-join-tournament {
    display: inline-block;
    background-color: var(--f1-red);
    color: var(--f1-white);
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.1rem;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.btn-join-tournament:hover {
    background-color: #c10500;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(225, 6, 0, 0.4);
    color: var(--f1-white);
}

.tournament-detail-section {
    padding: 60px 0;
    background-color: var(--f1-white);
    min-height: 60vh;
}

.tournament-detail-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tournament-detail-header {
    text-align: center;
    margin-bottom: 30px;
}

.tournament-detail-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.tournament-detail-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.btn-make-selection {
    display: inline-block;
    background-color: var(--f1-red);
    color: var(--f1-white);
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.1rem;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.btn-make-selection:hover {
    background-color: #c10500;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(225, 6, 0, 0.4);
    color: var(--f1-white);
}

.btn-make-selection i {
    margin-right: 8px;
}

.tournament-sections {
    margin-top: 40px;
}

.info-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-card-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-card-text {
    color: #666666;
    font-size: 1rem;
    line-height: 1.6;
}

/* Ranking Cards */
.ranking-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    overflow-x: hidden;
}

.ranking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--f1-red);
}

.ranking-card-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.ranking-card-title i {
    margin-right: 8px;
    color: var(--f1-red);
}

.ranking-list {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #f8f8f8;
    border-radius: 10px;
    transition: all 0.3s;
}

.ranking-item:hover {
    background: #fff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ranking-item.ranking-podium {
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
    border: 2px solid #FFD700;
    font-weight: bold;
}

.ranking-item.ranking-current-user {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.12) 0%, #ffffff 100%);
    border: 2px solid var(--f1-red);
}

.ranking-item.ranking-current-user .ranking-player {
    font-weight: bold;
}

.ranking-item.ranking-current-user .ranking-position {
    color: var(--f1-red);
}

.ranking-position {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--f1-red);
    min-width: 50px;
    text-align: center;
}

.ranking-player {
    flex: 1;
    font-size: 1rem;
    color: #333;
    padding: 0 15px;
}

.ranking-points {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--f1-red);
    min-width: 70px;
    text-align: right;
}

.selection-section {
    padding: 40px 0;
}

.current-race-info {
    background: linear-gradient(135deg, var(--f1-red) 0%, #c10500 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    color: var(--f1-white);
    box-shadow: 0 5px 20px rgba(225, 6, 0, 0.3);
}

.race-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    gap: 15px;
}

.race-info-flag {
    width: 50px;
    height: 35px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.race-info-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: var(--f1-white);
    flex-grow: 1;
}

.race-info-round {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.race-info-details {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.race-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #333333;
}

.race-info-item i {
    font-size: 20px;
    opacity: 0.9;
    color: #333333;
}

.race-info-item span {
    color: #333333;
}

.race-info-circuit,
.race-info-date,
.race-info-country {
    color: #333333;
}

.selection-summary {
    margin-bottom: 40px;
}

.summary-box {
    background: linear-gradient(135deg, var(--f1-red) 0%, #c10500 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    color: var(--f1-white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(225, 6, 0, 0.3);
}

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

.summary-text {
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.summary-count {
    font-size: 2rem;
    font-weight: 900;
}

.selection-content {
    margin-top: 40px;
}

.selection-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.selection-card-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid var(--f1-red);
    padding-bottom: 15px;
}

.selection-card-title i {
    color: var(--f1-red);
    margin-right: 10px;
}

.selection-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.selection-item {
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.driver-flag {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 30px;
    height: 20px;
    object-fit: cover;
    border: 2px solid var(--f1-white);
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.selection-page .driver-flag {
    top: 10px;
    right: 10px;
    bottom: auto;
    left: auto;
}

.driver-race-number {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--f1-red);
    color: var(--f1-white);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--f1-white);
}

.selection-page .driver-race-number {
    left: 10px;
    right: auto;
}

.tournament-home-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    padding: 12px 16px;
    border-radius: 999px;
    background: var(--f1-red);
    color: var(--f1-white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    font-weight: 700;
    font-size: 0.95rem;
}

.tournament-home-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.30);
    color: var(--f1-white);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.share-buttons .share-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 500px) {
    .share-buttons {
        width: 100%;
    }

    .share-buttons .share-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

.share-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
}

body.has-tournament-home-fab .share-fab {
    bottom: 86px;
}

.share-fab__button {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--f1-red);
    color: var(--f1-white);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.30);
}

.share-fab__button:hover {
    transform: translateY(-2px);
}

.share-fab__panel {
    position: absolute;
    right: 0;
    bottom: calc(54px + 10px);
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    min-width: 220px;
    background: var(--f1-white);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.share-fab.share-fab--open .share-fab__panel {
    display: flex;
}

.share-fab__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--f1-white);
    color: var(--f1-dark-gray);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.share-fab__item:hover {
    background: rgba(0, 0, 0, 0.04);
}

#constructors-summary-table th:nth-child(n+3),
#constructors-summary-table td:nth-child(n+3) {
    text-align: center;
}

.tournament-slots-page .tournament-slots-card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tournament-slots-page .tournament-slots-player {
    cursor: pointer;
}

.tournament-slots-page .tournament-slots-player.active {
    background: var(--f1-red);
    border-color: var(--f1-red);
    color: var(--f1-white);
}

.tournament-slots-page .tournament-slots-player.active .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

@media (min-width: 992px) {
    .tournament-slots-page .tournament-slots-detail-card {
        position: sticky;
        top: 90px;
    }
}

.tournament-slots-page #player-slots-table th,
.tournament-slots-page #player-slots-table td {
    text-align: center;
}

.tournament-slots-page #player-team-slots-table th,
.tournament-slots-page #player-team-slots-table td {
    text-align: center;
}

.tournament-slots-page #player-team-slots-table th:first-child,
.tournament-slots-page #player-team-slots-table td:first-child {
    text-align: left;
}


.selection-item.selected .driver-race-number {
    background: var(--f1-white);
    color: var(--f1-red);
    border-color: var(--f1-red);
}

.driver-tier {
    position: absolute;
    top: 50px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--f1-white);
    color: var(--f1-white);
}

.driver-tier.tier-1 {
    background: #FFD700;
    color: #333;
}

.driver-tier.tier-2 {
    background: #C0C0C0;
    color: #333;
}

.driver-tier.tier-3 {
    background: #CD7F32;
    color: var(--f1-white);
}

.selection-item.selected .driver-tier.tier-1 {
    border-color: #FFD700;
}

.selection-item.selected .driver-tier.tier-2 {
    border-color: #C0C0C0;
}

.selection-item.selected .driver-tier.tier-3 {
    border-color: #CD7F32;
}

.driver-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid #e0e0e0;
    transition: all 0.3s;
}

.selection-item.selected .driver-image {
    border-color: var(--f1-white);
}

.selection-item:hover .driver-image {
    transform: scale(1.05);
    border-color: var(--f1-red);
}

.team-flag {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 20px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.team-logo {
    width: 80%;
    margin-bottom: 10px;
    margin-top: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.team-image {
    width: 100%;
    max-width: 150px;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.selection-item:hover .team-logo {
    transform: scale(1.1);
}

.selection-item:hover .team-image {
    transform: scale(1.05);
}

.selection-item:hover {
    border-color: var(--f1-red);
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.selection-item.selected {
    background: var(--f1-red);
    border-color: var(--f1-red);
    color: var(--f1-white);
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(225, 6, 0, 0.4);
    border-width: 3px;
}

.selection-item.selected:hover {
    background: #c10500;
    border-color: #c10500;
    transform: scale(1.02) translateY(-3px);
    box-shadow: 0 10px 25px rgba(225, 6, 0, 0.5);
}

.selection-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.selection-item.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e0e0e0;
}

.selection-item-abbr {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.selection-item-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.selection-item-team {
    font-size: 0.8rem;
    margin-top: 5px;
    opacity: 0.8;
}

.selection-item-stats {
    margin-top: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-badge {
    background-color: #e0e0e0;
    color: #333333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.stat-badge.remaining {
    background-color: #4CAF50;
    color: var(--f1-white);
}

.selection-item.selected .stat-badge {
    background-color: rgba(255, 255, 255, 0.3);
    color: var(--f1-white);
}

.selection-item.selected .stat-badge.remaining {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--f1-white);
}

.selection-sidebar {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    border-bottom: 3px solid var(--f1-red);
    padding-bottom: 15px;
}

.selected-section {
    margin-bottom: 25px;
}

.selected-subtitle {
    font-size: 1rem;
    font-weight: bold;
    color: #666666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selected-list {
    min-height: 100px;
}

.empty-selection {
    color: #999999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.selected-item {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.selected-item-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    flex-shrink: 0;
}

.selected-item-image-team {
    object-fit: contain;
    border-radius: 4px;
    border: 2px solid #e0e0e0;
    background: #fff;
    padding: 2px;
}

.selected-item-name {
    font-weight: 600;
    color: #333333;
    flex-grow: 1;
}

.selected-item-remove {
    color: var(--f1-red);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    flex-shrink: 0;
}

.selected-item-remove:hover {
    color: #c10500;
    transform: scale(1.2);
}

.btn-submit-selection {
    width: 100%;
    background-color: var(--f1-red);
    color: var(--f1-white);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-submit-selection:hover:not(:disabled) {
    background-color: #c10500;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(225, 6, 0, 0.3);
}

.btn-submit-selection:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* Tier Examples */
.tier-examples {
    margin-top: 20px;
    padding: 20px;
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tier-examples h4 {
    color: var(--f1-dark-gray);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.tier-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.tier-example-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tier-example-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tier-example-text {
    font-size: 1rem;
    color: var(--f1-dark-gray);
}

.tier-example-text strong {
    color: var(--f1-red);
    font-weight: 600;
}

/* Deadline Info */
.deadline-info {
    margin-top: 20px;
    padding: 20px;
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.deadline-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.deadline-item:last-child {
    margin-bottom: 0;
}

.deadline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.deadline-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--f1-red);
    color: var(--f1-white);
    border-radius: 50%;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.deadline-text {
    font-size: 1rem;
    color: var(--f1-dark-gray);
    line-height: 1.4;
}

.deadline-text strong {
    color: var(--f1-dark-gray);
    font-weight: 600;
}

/* Parachute Info */
.parachute-info {
    margin-top: 20px;
    padding: 20px;
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.parachute-title-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
    margin-right: 10px;
    vertical-align: middle;
}

.parachute-example {
    margin-bottom: 20px;
}

.parachute-example h4 {
    color: var(--f1-dark-gray);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.parachute-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.example-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.example-item:last-child {
    margin-bottom: 0;
}

.example-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.example-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--f1-red);
    color: var(--f1-white);
    border-radius: 50%;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.example-text {
    font-size: 1rem;
    color: var(--f1-dark-gray);
    line-height: 1.4;
}

.example-text strong {
    color: var(--f1-dark-gray);
    font-weight: 600;
}

.parachute-limitation {
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.limitation-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.limitation-item:last-child {
    margin-bottom: 0;
}

.limitation-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.limitation-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #ffc107;
    color: var(--f1-dark-gray);
    border-radius: 50%;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.limitation-text {
    font-size: 1rem;
    color: var(--f1-dark-gray);
    line-height: 1.4;
}

.limitation-text strong {
    color: #856404;
    font-weight: 600;
}

/* Tier Legend */
.tier-legend {
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.tier-legend-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.tier-legend-items {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.tier-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tier-badge {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--f1-white);
}

.tier-badge.tier-1 {
    background: #FFD700;
    color: #333;
}

.tier-badge.tier-2 {
    background: #C0C0C0;
    color: #333;
}

.tier-badge.tier-3 {
    background: #CD7F32;
    color: var(--f1-white);
}

.tier-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
}

.tier-dot.tier-1 {
    background: #FFD700;
}

.tier-dot.tier-2 {
    background: #C0C0C0;
}

.tier-dot.tier-3 {
    background: #CD7F32;
}

.tier-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Race Detail Page */
.race-detail-section {
    padding: 40px 0;
}

.race-detail-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.race-detail-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

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

.race-detail-flag img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border: 3px solid rgba(225, 6, 0, 0.3);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.race-detail-info {
    flex: 1;
    min-width: 250px;
}

.race-detail-name {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.race-detail-circuit {
    font-size: 1.2rem;
    color: var(--f1-red);
    margin-bottom: 10px;
    font-weight: 600;
}

.race-detail-circuit i,
.race-detail-location i {
    margin-right: 8px;
}

.race-detail-location {
    font-size: 1.1rem;
    color: #666;
}

.race-detail-status {
    flex-shrink: 0;
}

.race-detail-body {
    margin-bottom: 30px;
}

.race-info-item {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.race-info-item:hover {
    background: #fff;
    border-color: var(--f1-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(225, 6, 0, 0.1);
}

.race-info-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.race-info-label i {
    margin-right: 6px;
    color: var(--f1-red);
}

.race-info-value {
    font-size: 1.3rem;
    color: #333;
    font-weight: bold;
}

.race-detail-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.btn-secondary {
    display: inline-block;
    background-color: #666;
    color: var(--f1-white);
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #444;
    color: var(--f1-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary i {
    margin-right: 8px;
}

/* Race Results Cards */
.result-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 15px 15px 15px 15px;
    padding-top: 75px;
    margin-bottom: 25px;
    position: relative;
    transition: all 0.3s;
    overflow: hidden;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--f1-red);
}

.result-card.podium-gold {
    border-color: #FFD700;
    background: linear-gradient(135deg, #ffffff 0%, #fffef0 100%);
}

.result-card.podium-silver {
    border-color: #C0C0C0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
}

.result-card.podium-bronze {
    border-color: #CD7F32;
    background: linear-gradient(135deg, #ffffff 0%, #fff8f0 100%);
}

.result-position {
    position: absolute;
    top: 20px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
    margin-bottom: 15px;
}

.position-number {
    background: var(--f1-red);
    color: var(--f1-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(225, 6, 0, 0.3);
}

.podium-gold .position-number {
    background: #FFD700;
    color: #333;
}

.podium-silver .position-number {
    background: #C0C0C0;
    color: #333;
}

.podium-bronze .position-number {
    background: #CD7F32;
    color: var(--f1-white);
}

.position-change {
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
}

.position-change.position-up {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.position-change.position-down {
    background: rgba(225, 6, 0, 0.2);
    color: var(--f1-red);
}

.result-driver-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-top: 30px;
}

.driver-image-container {
    position: relative;
    flex-shrink: 0;
}

.driver-image {
    width: 100px;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.driver-flag {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 35px;
    height: 25px;
    object-fit: cover;
    border: 2px solid var(--f1-white);
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.driver-details {
    flex: 1;
}

.driver-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.driver-abbr {
    font-size: 1rem;
    color: var(--f1-red);
    font-weight: 600;
    margin-bottom: 8px;
}

.driver-team {
    font-size: 0.9rem;
    color: #666;
}

.driver-team i {
    margin-right: 5px;
}

.result-car-container {
    margin-bottom: 20px;
    text-align: center;
    background: #f8f8f8;
    border-radius: 10px;
    padding: 15px;
}

.car-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.2rem;
    color: #333;
    font-weight: bold;
}

.tier-badge-top {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

/* Points Section */
.points-section {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    border: 2px solid #fbbf24;
}

.points-title {
    font-size: 1rem;
    font-weight: bold;
    color: #92400e;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.points-title i {
    color: #f59e0b;
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.point-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 6px;
    text-align: center;
}

.point-label {
    font-size: 0.75rem;
    color: #78350f;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.point-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #92400e;
}

.points-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    border: 2px solid #f59e0b;
}

.total-label {
    font-size: 0.95rem;
    font-weight: bold;
    color: #92400e;
    text-transform: uppercase;
}

.total-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #b45309;
}

.fastest-lap-badge {
    display: none; /* Nascosto per evitare sovrapposizioni */
    position: absolute;
    top: 15px;
    right: 15px;
    background: #9333ea;
    color: var(--f1-white);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 8px rgba(147, 51, 234, 0.3);
}

.fastest-lap-badge i {
    font-size: 1rem;
}

/* Pole Position Highlight */
.points-section.has-pole-position {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.pole-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: var(--f1-white);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(147, 51, 234, 0.4);
    animation: pulse-pole 2s ease-in-out infinite;
}

.pole-indicator i {
    font-size: 0.9rem;
}

@keyframes pulse-pole {
    0%, 100% {
        box-shadow: 0 3px 8px rgba(147, 51, 234, 0.4);
    }
    50% {
        box-shadow: 0 3px 15px rgba(147, 51, 234, 0.7);
    }
}

/* Status Badge (DNF, DNS, DSQ) */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.status-badge.status-dnf {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: var(--f1-white);
}

.status-badge.status-dns {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--f1-white);
}

.status-badge.status-dsq {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: var(--f1-white);
}

.point-item.highlight-pole {
    background: linear-gradient(135deg, #e9d5ff 0%, #ddd6fe 100%);
    border: 2px solid #9333ea;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.point-item.highlight-pole .point-label {
    color: #6b21a8;
    font-weight: bold;
}

.point-item.highlight-pole .point-value {
    color: #7c3aed;
    font-size: 1.3rem;
}

.point-item.highlight-fastest-lap {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border: 2px solid #6366f1;
}

.point-item.highlight-fastest-lap .point-label {
    color: #4338ca;
}

.point-item.highlight-fastest-lap .point-value {
    color: #4f46e5;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .result-driver-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .driver-details {
        text-align: center;
    }
    
    .result-stats {
        flex-direction: column;
    }
}

/* Race Selections - Compact Cards */
.selections-section {
    padding: 40px 0;
}

.selection-card-compact {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.selection-card-compact:hover {
    border-color: var(--f1-red);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(225, 6, 0, 0.2);
}

.selection-card-compact.pending {
    background: #f9f9f9;
    border-color: #ddd;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.player-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.selection-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-submitted {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-pending {
    background: rgba(255, 165, 0, 0.2);
    color: #ff8c00;
}

.selection-submitted-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.selection-submitted-date i {
    color: var(--f1-red);
}

.selection-empty {
    text-align: center;
    padding: 30px 20px;
    color: #999;
}

.selection-empty i {
    font-size: 3rem;
    color: #ff8c00;
    margin-bottom: 10px;
}

.selection-empty p {
    margin: 0;
    font-size: 1rem;
}

.selection-content-compact {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title-compact {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title-compact i {
    color: var(--f1-red);
}

.drivers-list-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.driver-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: #f8f8f8;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
}

.driver-compact:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

.driver-text-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.driver-abbreviation {
    font-size: 1rem;
    font-weight: bold;
    color: var(--f1-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.driver-fullname {
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.driver-visual-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.driver-img-compact {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--f1-red);
}

.driver-name-compact {
    font-size: 0.85rem;
    font-weight: bold;
    color: #333;
}

.teams-list-compact {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.team-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 180px;
    height: 180px;
    width: 180px;
    min-width: 180px;
}

.team-compact:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

.team-img-compact {
    width: 100%;
    max-width: 120px;
    height: auto;
    object-fit: contain;
}

.team-name-compact {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Submitted Selections Title */
.submitted-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--f1-red);
}

/* Pending Selections Table */
.pending-selections-section {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin-top: 40px;
    margin-bottom: 30px;
}

.pending-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ff8c00;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.pending-table {
    width: 100%;
    background: var(--f1-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pending-table thead {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    color: var(--f1-white);
}

.pending-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pending-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.pending-table tbody tr:hover {
    background: #f8f8f8;
}

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

.pending-table td {
    padding: 15px;
    font-size: 1rem;
    color: #333;
}

.player-name-cell {
    font-weight: 600;
    color: #333;
}

.badge-pending {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    background: rgba(255, 165, 0, 0.2);
    color: #ff8c00;
}

/* Rules Page */
.rules-section {
    padding: 60px 0;
    background: #f9f9f9;
}

.rules-content {
    max-width: 1200px;
    margin: 0 auto;
}

.rules-intro {
    background: var(--f1-white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
    text-align: center;
}

.rules-intro h2 {
    color: var(--f1-red);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.rules-intro p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
}

.faq-accordion {
    text-align: left;
}

.faq-accordion .accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.faq-accordion .accordion-button {
    font-weight: 700;
    color: var(--f1-dark);
    letter-spacing: 0.5px;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: rgba(225, 6, 0, 0.08);
    color: var(--f1-dark);
    box-shadow: none;
}

.faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(225, 6, 0, 0.2);
    border-color: rgba(225, 6, 0, 0.3);
}

.faq-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.faq-title-icon {
    color: var(--f1-red);
    font-size: 1.2rem;
    line-height: 1;
}

.faq-title-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.faq-list {
    list-style: none;
    padding-left: 0;
    margin: 15px 0 20px;
    display: grid;
    gap: 10px;
}

.faq-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: #f7f7f7;
    border: 1px solid #eeeeee;
    border-radius: 10px;
}

.faq-list-icon {
    width: 26px;
    flex: 0 0 26px;
    line-height: 1.4;
    font-size: 1.1rem;
}

.faq-table {
    border: 1px solid #eeeeee;
    border-radius: 10px;
    overflow: hidden;
    background: var(--f1-white);
}

.faq-table .table {
    margin-bottom: 0;
}

.faq-table thead th {
    background: rgba(225, 6, 0, 0.08);
    color: var(--f1-dark);
    font-weight: 700;
    border-bottom: 1px solid #eeeeee;
}

.faq-table tbody td {
    border-bottom: 1px solid #f0f0f0;
}

.summary-point {
    display: inline-block;
    min-width: 28px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 999px;
    /*font-weight: 800;*/
    font-size: 0.9rem;
    line-height: 1.4;
}

.summary-point-positive {
    background: rgba(225, 6, 0, 0.1);
    border: 1px solid rgba(225, 6, 0, 0.25);
    color: var(--f1-red);
}

#drivers-summary-table th:nth-child(4),
#drivers-summary-table td:nth-child(4),
#drivers-summary-table th:nth-child(5),
#drivers-summary-table td:nth-child(5),
#drivers-summary-table th:nth-child(7),
#drivers-summary-table td:nth-child(7),
#drivers-summary-table th:nth-child(8),
#drivers-summary-table td:nth-child(8),
#drivers-summary-table th:nth-child(9),
#drivers-summary-table td:nth-child(9),
#drivers-summary-table th:nth-child(10),
#drivers-summary-table td:nth-child(10) {
    text-align: center;
    vertical-align: middle;
}

.rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.ranking-card {
    background: var(--f1-white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid var(--f1-red);
}

.ranking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.ranking-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
}

.ranking-title {
    color: var(--f1-red);
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ranking-description {
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.ranking-description p {
    margin-bottom: 10px;
}

.points-distribution {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.point-badge {
    background: linear-gradient(135deg, var(--f1-red) 0%, #c00 100%);
    color: var(--f1-white);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.ranking-prizes {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.prize-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95rem;
    display: inline-block;
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.4);
}

.rules-footer {
    background: var(--f1-white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.rules-footer p {
    font-size: 1.2rem;
    color: var(--f1-red);
    font-weight: bold;
    margin: 0;
}

.rules-footer i {
    margin-right: 10px;
    font-size: 1.3rem;
}

@media (max-width: 768px) {
    .rankings-grid {
        grid-template-columns: 1fr;
    }
    
    .rules-intro {
        padding: 25px;
    }
    
    .ranking-card {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .drivers-list-compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .teams-list-compact {
        grid-template-columns: 1fr;
    }
    
    .pending-table th,
    .pending-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Message Handler - Sistema di messaggistica personalizzato */
.message-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    width: 100%;
}

.message-box {
    background: var(--f1-white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-box.show {
    transform: translateX(0);
    opacity: 1;
}

.message-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
    position: relative;
}

.message-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.message-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
}

.message-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.message-close:hover {
    color: #333;
}

/* Success Message */
.message-success {
    border-left: 5px solid #22c55e;
}

.message-success .message-icon {
    color: #22c55e;
}

/* Error Message */
.message-error {
    border-left: 5px solid var(--f1-red);
}

.message-error .message-icon {
    color: var(--f1-red);
}

/* Warning Message */
.message-warning {
    border-left: 5px solid #f59e0b;
}

.message-warning .message-icon {
    color: #f59e0b;
}

/* Info Message */
.message-info {
    border-left: 5px solid #3b82f6;
}

.message-info .message-icon {
    color: #3b82f6;
}

@media (max-width: 768px) {
    .message-container {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .message-box {
        transform: translateY(-100px);
    }
    
    .message-box.show {
        transform: translateY(0);
    }
    
    .message-content {
        padding: 14px 16px;
    }
    
    .message-text {
        font-size: 0.9rem;
    }
}

/* ============================================
   Tournament Race Results - Tabular View
   ============================================ */

.tournament-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

@media (max-width: 1200px) {
    .tournament-results-grid {
        grid-template-columns: 1fr;
    }
}

.player-result-card {
    background: var(--f1-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.player-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.player-result-header {
    background: linear-gradient(135deg, var(--f1-red) 0%, #b91c1c 100%);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

 .points-summary {
     display: flex;
     align-items: center;
     gap: 8px;
     flex-wrap: wrap;
     justify-content: flex-end;
 }

 .points-pill {
     background: rgba(255, 255, 255, 0.2);
     backdrop-filter: blur(10px);
     padding: 6px 10px;
     border-radius: 999px;
     color: var(--f1-white);
     font-weight: 700;
     font-size: 0.85rem;
     line-height: 1;
     white-space: nowrap;
 }

.player-result-header .player-name {
    color: var(--f1-white);
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}

.total-points-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 15px;
    color: var(--f1-white);
    font-weight: bold;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.no-selection-message {
    padding: 40px;
    text-align: center;
    color: var(--f1-light-gray);
}

.no-selection-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.result-tables {
    padding: 12px;
    display: grid;
    gap: 15px;
}

.result-table-section {
    background: var(--f1-light-bg);
    border-radius: 6px;
    padding: 12px;
}

.result-table-title {
    color: var(--f1-dark-gray);
    font-size: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-table-title i {
    color: var(--f1-red);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--f1-white);
    border-radius: 8px;
    overflow: hidden;
}

.result-table thead {
    background: var(--f1-dark-gray);
    color: var(--f1-red);
}

.result-table th {
    padding: 8px 6px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.result-table th:first-child {
    text-align: left;
    padding-left: 12px;
    width: 40%;
}

.result-table th:nth-child(2),
.result-table th:nth-child(3),
.result-table th:nth-child(4),
.result-table th:nth-child(5) {
    width: 15%;
}

.result-table tbody tr {
    border-bottom: 1.5px solid #e0e0e040;
    transition: background-color 0.2s ease;
}

.result-table tbody tr:hover {
    background-color: rgba(230, 0, 0, 0.05);
}

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

 .result-table tfoot td {
     padding: 9px 6px;
     font-size: 0.85rem;
     font-weight: bold;
     border-top: 2px solid #e0e0e0;
     background: rgba(230, 0, 0, 0.04);
 }

 .result-table-total-label {
     text-align: left;
     padding-left: 12px;
     color: var(--f1-dark-gray);
 }

.result-table td {
    padding: 8px 6px;
    font-size: 0.85rem;
}

.result-table td:first-child {
    padding-left: 12px;
    width: 40%;
}

.result-table td:nth-child(2),
.result-table td:nth-child(3),
.result-table td:nth-child(4),
.result-table td:nth-child(5) {
    width: 15%;
}

.driver-cell,
.team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

 .result-table .tier-badge {
     width: 26px;
     height: 26px;
     font-size: 0.75rem;
     border-width: 1px;
     flex: 0 0 26px;
 }

 .result-table .driver-cell {
     gap: 8px;
 }

 .result-table .driver-cell .tier-badge {
     margin-left: auto;
 }

.driver-abbr {
    font-weight: bold;
    color: var(--f1-dark-gray);
    min-width: 40px;
    font-size: 0.9rem;
}

.team-name {
    font-weight: 600;
    color: var(--f1-dark-gray);
    font-size: 0.9rem;
}

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

.points-highlight {
    font-weight: bold;
    color: var(--f1-dark-gray);
}

.points-highlight.pole {
    color: #9333ea;
    background: rgba(147, 51, 234, 0.1);
}

.points-highlight.fast {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.points-highlight.gain {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.total-points {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--f1-red);
    background: rgba(230, 0, 0, 0.05);
}

 .race-stats-section {
     padding: 60px 0;
     background-color: var(--f1-white);
 }

 .race-stats-section .stats-section-subtitle {
     color: #666666;
 }

 .stats-section {
     margin-bottom: 28px;
 }

 .stats-section-title {
     color: var(--f1-white);
     font-size: 1.2rem;
     font-weight: 800;
     margin: 0 0 14px 0;
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .stats-section-subtitle {
     margin: -6px 0 14px 0;
     color: rgba(255, 255, 255, 0.85);
     font-size: 0.9rem;
 }

 .stats-grid {
     display: grid;
     grid-template-columns: repeat(3, minmax(0, 1fr));
     gap: 14px;
 }

 .stats-card {
     background: var(--f1-white);
     border-radius: 12px;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
     padding: 12px;
 }

 .stats-card-header {
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .stats-driver-img {
     width: 70px;
     height: 70px;
     border-radius: 50%;
     object-fit: cover;
     border: 2px solid rgba(0, 0, 0, 0.06);
 }

 .stats-car-img {
     width: 100px;
     _height: 44px;
     object-fit: contain;
     margin-left: auto;
 }

 .stats-card-title {
     min-width: 0;
 }

 .stats-name {
     font-weight: 500;
     color: #222;
     font-size: 1.50rem;
     line-height: 1.1;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }

 .stats-meta {
     margin-top: 2px;
     font-size: 0.8rem;
     color: #555;
 }

 .stats-bar {
     height: 10px;
     background: #f1f1f1;
     border-radius: 999px;
     overflow: hidden;
     margin-top: 10px;
 }

 .stats-bar-fill {
     height: 100%;
     background: linear-gradient(90deg, var(--f1-red), #ff4d4d);
     border-radius: 999px;
 }

 .stats-footer {
     display: flex;
     justify-content: flex-end;
     margin-top: 8px;
 }

 .stats-percentage {
     font-weight: 500;
     color: var(--f1-red);
 }

 .stats-empty {
     background: rgba(255, 255, 255, 0.08);
     border: 1px dashed rgba(255, 255, 255, 0.35);
     padding: 16px;
     border-radius: 12px;
     color: var(--f1-white);
 }

 @media (max-width: 992px) {
     .stats-grid {
         grid-template-columns: repeat(2, minmax(0, 1fr));
     }
 }

 @media (max-width: 576px) {
     .stats-grid {
         grid-template-columns: 1fr;
     }
 }

/* Sort Controls */
#sort-controls {
    margin-top: 20px;
    margin-bottom: 25px;
}

.race-result-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px 20px;
    background: var(--f1-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.race-result-controls__legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
}

.race-result-controls__buttons {
    display: flex;
    justify-content: flex-start;
}

.race-result-controls__buttons .view-toggle-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.race-result-controls__buttons .view-toggle-buttons .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.race-result-controls__order {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.race-result-controls__order label {
    font-weight: 600;
    color: var(--f1-dark-gray);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.race-result-controls__order label i {
    color: var(--f1-red);
    font-size: 1.1rem;
}

@media (max-width: 1220px) {
    .race-result-controls__order {
        align-items: stretch;
    }

    .race-result-controls__order .sort-select {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 500px) {
    .race-result-controls__buttons .view-toggle-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .race-result-controls__buttons .view-toggle-buttons .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .race-result-controls__legend .legend-items {
        width: 100%;
    }

    .race-result-controls__legend .legend-item {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

.controls-and-legend-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: var(--f1-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legend-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-title {
    font-weight: 600;
    color: var(--f1-dark-gray);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}

.legend-title i {
    color: var(--f1-red);
    font-size: 1rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-item {
    font-size: 0.85rem;
    color: var(--f1-dark-gray);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
}

.legend-item strong {
    color: var(--f1-red);
    font-weight: bold;
}

 .parachute-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-left: 6px;
    display: inline-block;
}

.sort-controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-shrink: 0;
}

.view-toggle-buttons {
    display: flex;
    gap: 8px;
}

.view-toggle-buttons .btn {
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.view-toggle-buttons .btn.active {
    background-color: var(--f1-red);
    border-color: var(--f1-red);
    color: var(--f1-white);
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (min-width: 769px) and (max-width: 1220px) {
    .controls-and-legend-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .legend-wrapper {
        width: 100%;
    }

    .legend-items {
        justify-content: flex-start;
    }

    .sort-controls-wrapper {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
    }

    .view-toggle-buttons {
        flex-wrap: wrap;
    }

    .controls-right {
        flex: 1 1 320px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .controls-right label,
    .controls-right .sort-select {
        flex: 1 0 100%;
        justify-content: flex-start;
    }

    .controls-right .sort-select {
        min-width: 0;
        width: 100%;
    }
}

.sort-controls-wrapper label {
    font-weight: 600;
    color: var(--f1-dark-gray);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.sort-controls-wrapper label i {
    color: var(--f1-red);
    font-size: 1.1rem;
}

.sort-select {
    padding: 8px 16px;
    border: 2px solid var(--f1-light-bg);
    border-radius: 6px;
    background: var(--f1-white);
    font-size: 0.9rem;
    min-width: 200px;
}

/* Summary Results Table */
.summary-results-table {
    background: var(--f1-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.summary-results-table th {
    background-color: var(--f1-red);
    color: var(--f1-white);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    padding: 12px 16px;
}

.summary-results-table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95rem;
}

.summary-results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.summary-results-table .points-highlight {
    font-weight: bold;
    color: var(--f1-red);
}

.sort-select:hover {
    border-color: var(--f1-red);
}

.sort-select:focus {
    border-color: var(--f1-red);
    box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.1);
}

/* Season Stats Page */
.stats-section {
padding: 40px 0 60px;
background-color: var(--f1-white);
}

.stats-controls {
background: var(--f1-white);
border: 2px solid #e0e0e0;
border-radius: 15px;
padding: 25px;
margin-bottom: 30px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: var(--f1-dark-gray);
    margin-bottom: 8px;
    display: block;
}

.form-select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-select:focus {
    outline: none;
    border-color: var(--f1-red);
    box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.1);
}

.form-text {
    color: #666;
    font-size: 0.875rem;
    margin-top: 5px;
}

.chart-container {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 600px; /* Aumentato da 400px a 600px */
    position: relative;
}

.stats-summary {
    margin-bottom: 30px;
}

.summary-card {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card h4 {
    color: var(--f1-dark-gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--f1-red);
}

.data-table-section {
    background: var(--f1-white);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--f1-red);
    color: var(--f1-white);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.table td {
    vertical-align: middle;
    border-bottom: 1px solid #e0e0e0;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

.text-success {
    color: #28a745 !important;
    font-weight: bold;
}

.text-danger {
    color: #dc3545 !important;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .controls-and-legend-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .sort-controls-wrapper {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .view-toggle-buttons {
        justify-content: center;
        order: -1;
    }
    
    .controls-right {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .controls-right label {
        text-align: center;
    }
    
    .player-result-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .result-table {
        font-size: 0.85rem;
    }
    
    .result-table th,
    .result-table td {
        padding: 8px 5px;
    }
    
    .result-table th:first-child,
    .result-table td:first-child {
        padding-left: 10px;
    }
    
    .driver-abbr {
        min-width: 35px;
        font-size: 0.85rem;
    }
    
    .controls-and-legend-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 6px;
    }
    
    .sort-controls-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .sort-select {
        width: 100%;
    }
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
}

.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    color: var(--f1-white);
    text-align: right;
    padding: 30px;
    max-width: 800px;
    margin-left: auto;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slide-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.slide-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.slide-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-large {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 150px;
    white-space: nowrap;
}

.btn-primary.btn-large {
    background: var(--f1-red);
    color: var(--f1-white);
    border-color: var(--f1-red);
}

.btn-primary.btn-large:hover {
    background: #cc0000;
    border-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(225, 6, 0, 0.3);
}

.btn-outline.btn-large {
    background: transparent;
    color: var(--f1-white);
    border-color: var(--f1-white);
}

.btn-outline.btn-large:hover {
    background: var(--f1-white);
    color: var(--f1-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 30px;
}

.slider-dots {
    display: flex;
    gap: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--f1-white);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--f1-white);
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.slider-nav {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--f1-white);
    background: rgba(0, 0, 0, 0.3);
    color: var(--f1-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Animations */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 1s ease forwards;
}

.animate-delay-1 {
    animation-delay: 0.3s;
}

.animate-delay-2 {
    animation-delay: 0.6s;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-slider {
        height: 60vh;
        min-height: 400px;
        max-height: 600px;
    }
    
    .slide-content {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        padding: 20px;
    }
    
    .slide-title {
        font-size: 2.5rem;
    }
    
    .slide-subtitle {
        font-size: 1.2rem;
    }
    
    .slide-actions {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .btn-large {
        min-width: 180px;
        justify-content: center;
    }
    
    .slider-controls {
        bottom: 20px;
        gap: 20px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 50vh;
        min-height: 350px;
        max-height: 500px;
    }
    
    .slide-content {
        padding: 15px;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-subtitle {
        font-size: 1rem;
    }
    
    .btn-large {
        min-width: 160px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Contact Page Styles */
.contact-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--f1-white) 0%, #f8f9fa 100%);
    min-height: 60vh;
}

.contact-form-container {
    background: var(--f1-white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--f1-red) 0%, #ff6b6b 100%);
}

.contact-logo {
    text-align: center;
    margin-bottom: 30px;
}

.contact-logo-img {
    max-height: 80px;
    width: auto;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.contact-logo-img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.contact-logo-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.contact-logo-footer-img {
    max-height: 40px;
    width: auto;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.contact-logo-footer-img:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--f1-dark);
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.contact-subtitle {
    font-size: 1.1rem;
    color: var(--f1-light-gray);
    text-align: center;
    margin-bottom: 40px;
}

.contact-form .form-label {
    font-weight: 600;
    color: var(--f1-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.contact-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.contact-form .form-control:focus {
    border-color: var(--f1-red);
    box-shadow: 0 0 0 0.2rem rgba(225, 6, 0, 0.25);
    background: var(--f1-white);
}

.contact-form .form-control:hover {
    border-color: #dee2e6;
    background: var(--f1-white);
}

.btn-contact {
    background: linear-gradient(135deg, var(--f1-red) 0%, #ff4757 100%);
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--f1-white);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(225, 6, 0, 0.3);
    min-width: 200px;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(225, 6, 0, 0.4);
    background: linear-gradient(135deg, #ff4757 0%, var(--f1-red) 100%);
}

.btn-contact:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-alert {
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-alert i {
    font-size: 1.2rem;
}

.form-alert.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.form-alert.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Contact Form Animation */
.contact-form-container {
    animation: slideInUp 0.8s ease;
}

.contact-form .form-control {
    animation: fadeInLeft 0.6s ease;
}

.contact-form .form-control:nth-child(1) { animation-delay: 0.1s; }
.contact-form .form-control:nth-child(2) { animation-delay: 0.2s; }
.contact-form .form-control:nth-child(3) { animation-delay: 0.3s; }
.contact-form .form-control:nth-child(4) { animation-delay: 0.4s; }
.contact-form textarea { animation-delay: 0.5s; }

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

/* Responsive Contact Form */
@media (max-width: 768px) {
    .contact-section {
        padding: 60px 0;
    }
    
    .contact-form-container {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .contact-title {
        font-size: 2rem;
    }
    
    .contact-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .btn-contact {
        padding: 12px 30px;
        font-size: 1rem;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .contact-form-container {
        padding: 25px 15px;
    }
    
    .contact-title {
        font-size: 1.8rem;
    }
    
    .contact-logo-img {
        max-height: 60px;
    }
    
    .contact-logo-footer-img {
        max-height: 30px;
    }
    
    .btn-contact {
        padding: 10px 25px;
        font-size: 0.9rem;
        min-width: 160px;
    }
}
