/* Variáveis Globais */
:root {
    --primary-color: #e10600;
    --primary-hover: #c00500;
    --primary-light: #ff6b66;
    --primary-dark: #990400;
    --primary-color-rgb: 225, 6, 0;
    --secondary-color: #15151e;
    --secondary-light: #2a2a3c;
    --secondary-dark: #0b0b10;
    --tertiary-color: #38383f;
    --text-light: #ffffff;
    --text-dark: #222222;
    --text-muted: #777777;
    --bg-light: #f8f8f8;
    --card-bg: #ffffff;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    --border-color: #e0e0e0;
    --border-radius: 10px;
    --transition: all 0.3s ease;
    --background-color: #ffffff;
    --text-color: #222222;
    --card-background: #f8f8f8;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
    --accent-color: #1e90ff;
    --accent-hover: #0b78de;
    --accent-light: #5fb0ff;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --max-width: 1400px;
}

/* Modo escuro */
[data-theme="dark"] {
    --text-dark: #f1f1f1;
    --text-muted: #a0a0a0;
    --bg-light: #121218;
    --card-bg: #1e1e2a;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    --border-color: #404050;
    --tertiary-color: #424250;
    --background-color: #15151e;
    --text-color: #f1f1f1;
    --card-background: #272736;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --secondary-light: #3a3a50;
}

/* Reset e Estilos Básicos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Header e Navegação */
header {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 0;
    box-shadow: 0 4px 20px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    flex-wrap: wrap;
    height: 70px;
}

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

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-light);
    margin: 0;
    letter-spacing: -0.5px;
    position: relative;
}

.logo h1::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: center;
}

nav li {
    height: 100%;
    display: flex;
    align-items: center;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all var(--transition-speed);
    font-weight: 500;
    position: relative;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

nav a.active {
    color: var(--text-light);
    background-color: var(--primary-color);
    font-weight: 600;
}

nav a.active:hover {
    background-color: var(--primary-hover);
}

/* Botão de alternância do tema */
.theme-toggle {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

#theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg);
}

/* Main Content */
main {
    padding: 40px 0;
    min-height: calc(100vh - 140px);
}

/* Página Home */
.hero {
    text-align: center;
    padding: 60px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--text-light);
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/f1_hub.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 1;
}

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

.hero h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
}

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

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover i {
    transform: scale(1.1) rotate(-5deg);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.card p {
    margin-bottom: 25px;
    color: var(--text-muted);
    line-height: 1.6;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(225, 6, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

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

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(-1px);
}

/* Sistema de Busca */
.search-container {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
}

.search-container h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-dark);
}

.search-box button, .search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover, .search-btn:hover {
    background-color: #c00500;
}

.search-results {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.search-result-item {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-result-item img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    border-radius: 50%;
}

.search-result-info h4 {
    margin-bottom: 3px;
}

.search-result-info p {
    font-size: 0.9rem;
    color: #666;
}

/* Centro de Notificações */
.notification-center {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.notification-center h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.notification-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.8rem;
    line-height: 22px;
    text-align: center;
    margin-left: 10px;
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
}

.notification-item.unread {
    background-color: rgba(225, 6, 0, 0.05);
}

.notification-item .notification-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 10px;
    margin-top: 2px;
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    margin-bottom: 5px;
}

.notification-content p {
    font-size: 0.9rem;
    color: #666;
}

.notification-time {
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
}

.empty-notification {
    text-align: center;
    color: #999;
    padding: 20px 0;
    font-style: italic;
}

/* Sistemas de Páginas/Abas */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Listagem de Pilotos */
.drivers-grid, .teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.driver-card, .team-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.driver-card:hover, .team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.driver-header, .team-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: white;
    padding: 20px;
    position: relative;
}

.driver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    text-align: left;
}

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

.driver-header h3, .team-header h3 {
    margin-bottom: 5px;
    color: white;
    font-size: 1.5rem;
}

.driver-header h3 {
    margin-bottom: 0;
    flex: 1;
}

.driver-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.2);
    min-width: 60px;
    text-align: right;
}

.driver-info, .team-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.driver-info img, .team-info img {
    border-radius: 10px;
    margin-bottom: 20px;
    background-color: white;
    padding: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    max-width: 150px;
}

.driver-card:hover .driver-info img,
.team-card:hover .team-info img {
    transform: scale(1.05);
}

.driver-info p, .team-info p {
    margin-bottom: 12px;
    text-align: center;
    color: var(--text-dark);
}

.driver-info p strong, .team-info p strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Calendário de Corridas */
.races-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.race-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border-left: 5px solid transparent;
    overflow: hidden;
    position: relative;
}

.race-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.race-card.past {
    border-left-color: #f0f0f0;
}

.race-card.upcoming {
    border-left-color: var(--primary-color);
}

.race-round {
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 20px;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(225, 6, 0, 0.2);
}

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

.race-info h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.race-info p {
    color: var(--text-muted);
    margin-bottom: 0;
}

.race-date {
    text-align: right;
    min-width: 150px;
    padding-left: 20px;
}

.race-date .date {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.race-date .time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Status de corridas */
.status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.past {
    background-color: #f0f0f0;
    color: #777;
}

.status.upcoming {
    background-color: #ffeeee;
    color: var(--primary-color);
}

.race-card .results-btn {
    margin-top: 15px;
    font-size: 0.9rem;
    background-color: var(--primary-color);
    display: inline-block;
    width: 100%;
    text-align: center;
}

.race-card .results-btn:hover {
    background-color: var(--primary-hover);
}

/* Classificação */
.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    padding: 0 1px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    opacity: 0.7;
    color: var(--text-dark);
    flex: 1;
    text-align: center;
    font-weight: 600;
    position: relative;
}

.tab-btn:hover {
    opacity: 0.9;
    background-color: rgba(0, 0, 0, 0.03);
}

.tab-btn.active {
    opacity: 1;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--card-background);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

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

/* Tabela de classificação moderna */
.standings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg);
    transition: all 0.3s ease;
    table-layout: fixed;
}

.standings-table thead tr {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    width: 100%;
}

.standings-table th {
    padding: 16px 10px;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    position: sticky;
    top: 0;
    z-index: 10;
    border: none;
    white-space: nowrap;
    color: white;
}

.standings-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    animation: fadeInRow 0.6s ease forwards;
    position: relative;
    z-index: 1;
}

@keyframes fadeInRow {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.standings-table tbody tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    opacity: 0.1;
    transition: width 0.3s ease;
    z-index: -1;
}

.standings-table tbody tr:hover::before {
    width: 100%;
}

.standings-table tbody tr:hover {
    background-color: rgba(var(--primary-color-rgb), 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 5;
    border-left: 3px solid var(--primary-color);
}

/* Defasagem na animação para cada linha */
.standings-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.standings-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.standings-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.standings-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.standings-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.standings-table tbody tr:nth-child(6) { animation-delay: 0.3s; }
.standings-table tbody tr:nth-child(7) { animation-delay: 0.35s; }
.standings-table tbody tr:nth-child(8) { animation-delay: 0.4s; }
.standings-table tbody tr:nth-child(9) { animation-delay: 0.45s; }
.standings-table tbody tr:nth-child(10) { animation-delay: 0.5s; }
.standings-table tbody tr:nth-child(11) { animation-delay: 0.55s; }
.standings-table tbody tr:nth-child(12) { animation-delay: 0.6s; }
.standings-table tbody tr:nth-child(13) { animation-delay: 0.65s; }
.standings-table tbody tr:nth-child(14) { animation-delay: 0.7s; }
.standings-table tbody tr:nth-child(15) { animation-delay: 0.75s; }
.standings-table tbody tr:nth-child(16) { animation-delay: 0.8s; }
.standings-table tbody tr:nth-child(17) { animation-delay: 0.85s; }
.standings-table tbody tr:nth-child(18) { animation-delay: 0.9s; }
.standings-table tbody tr:nth-child(19) { animation-delay: 0.95s; }
.standings-table tbody tr:nth-child(20) { animation-delay: 1s; }

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

.standings-table td {
    padding: 14px 10px;
    vertical-align: middle;
    transition: all 0.2s ease;
}

/* Alinhamento de cabeçalhos */
.standings-table th.col-position {
    text-align: center;
    width: 60px;
}

.standings-table th.col-driver {
    text-align: left;
    padding-left: 20px;
}

.standings-table th.col-team {
    text-align: left;
    padding-left: 20px;
}

.standings-table th.col-points {
    text-align: center;
    width: 100px;
}

.standings-table th.col-wins {
    text-align: center;
    width: 100px;
}

/* Alinhamento de células de dados */
.standings-table td.col-position {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 700;
}

.standings-table td.col-driver {
    text-align: left;
    padding-left: 20px;
    font-weight: 600;
}

.standings-table td.col-team {
    text-align: left;
    padding-left: 20px;
    font-weight: 600;
}

.standings-table td.col-points {
    text-align: center;
    font-weight: 700;
    color: var(--primary-color);
}

.standings-table td.col-wins {
    text-align: center;
}

/* Zebrado para melhor leitura */
.standings-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsividade */
@media (max-width: 768px) {
    .standings-table {
        border-radius: 8px;
        margin: 15px 0;
    }
    
    .standings-table th, .standings-table td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .standings-table th {
        font-size: 0.8rem;
    }
    
    .standings-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .standings-table::-webkit-scrollbar {
        height: 4px;
    }
    
    .standings-table::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 10px;
    }
    
    .standings-table::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }
}

/* Página de Histórico */
.season-selector {
    width: 250px;
}

#season-select {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-dark);
}

.history-content {
    display: none;
}

.history-content.active {
    display: block;
}

/* Detalhes de volta a volta */
.lap-by-lap-container {
    margin-top: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.lap-chart-container {
    margin: 20px 0;
    height: 400px;
}

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

.laps-table th, .laps-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.laps-table th {
    background-color: var(--secondary-color);
    color: white;
}

.laps-table tbody tr {
    background-color: var(--card-bg);
}

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

/* Loading animado para tabelas */
.loading-table {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    width: 100%;
    background-color: var(--card-bg);
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.loading-table::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    top: 0;
    left: 0;
    background: linear-gradient(to right, 
        transparent, 
        var(--primary-color), 
        transparent
    );
    animation: loading-sweep 1.5s infinite ease-in-out;
}

.loading-table::after {
    content: 'Carregando classificação...';
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
    animation: pulse 1.5s infinite;
}

@keyframes loading-sweep {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

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

/* Mensagens de Erro */
.error-message {
    background-color: #fff1f0;
    border: 1px solid #ffa39e;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.error-message i {
    color: #ff4d4f;
    font-size: 2rem;
    margin-bottom: 15px;
}

.error-message p {
    margin-bottom: 15px;
    color: #5c5c5c;
}

.retry-btn {
    background-color: #ff4d4f;
}

.retry-btn:hover {
    background-color: #ff7875;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    color: var(--text-dark);
    border-top: 5px solid var(--primary-color);
}

.modal-content h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modal-content > p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.05);
}

/* Melhorias para os cards de eventos */
.events-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.event-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
    align-items: center;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
}

.event-card.past {
    border-left-color: #ccc;
}

.event-card.upcoming {
    border-left-color: var(--primary-color);
}

.event-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
}

.event-card.past .event-icon {
    background-color: #ddd;
}

.event-card.upcoming .event-icon {
    background-color: var(--primary-light);
}

.event-type {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.event-details {
    padding-right: 10px;
}

.event-details h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.event-details p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-details p i {
    color: var(--primary-color);
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.event-card .results-btn {
    align-self: center;
    justify-self: end;
    font-size: 0.9rem;
    padding: 8px 15px;
    white-space: nowrap;
}

/* Modal aninhado */
.results-modal {
    z-index: 1010;
}

.modal-content h3.mt-4 {
    margin-top: 1.5rem;
    font-size: 1.4rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content h3.mt-4:before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Ajuste responsivo para os eventos */
@media (max-width: 768px) {
    .event-card {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .event-icon {
        margin-bottom: 10px;
    }
    
    .event-card .results-btn {
        justify-self: stretch;
        margin-top: 15px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .close {
        top: 10px;
        right: 10px;
    }
}

/* Media Queries - Responsividade aprimorada */
@media (max-width: 1024px) {
    .container {
        width: 95%;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .quick-access {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .drivers-grid,
    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }
    
    header .container {
        height: auto;
        padding: 0.7rem 1rem;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .race-card {
        padding: 15px;
    }
    
    .race-round {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-right: 15px;
    }
    
    .race-info h3 {
        font-size: 1.1rem;
    }
    
    .race-date .date {
        font-size: 1rem;
    }
    
    .tab-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    /* Menu Mobile */
    header .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.7rem 1rem 0.7rem 4rem;
    }
    
    .menu-toggle {
        display: block;
        position: fixed;
        top: 1.2rem;
        left: 1.2rem;
        z-index: 1002;
        background: var(--primary-color);
        color: white;
        border-radius: 6px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    
    .menu-toggle:hover {
        background: var(--primary-hover);
    }
    
    nav {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background-color: var(--secondary-color);
        padding: 5rem 1.5rem 1.5rem;
        transition: transform 0.3s ease;
        z-index: 1001;
        flex-direction: column;
        align-items: flex-start;
        overflow-y: auto;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    }
    
    nav.active {
        transform: translateX(300px);
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0.7rem;
    }
    
    nav li {
        width: 100%;
    }
    
    nav a {
        display: block;
        padding: 1rem;
        width: 100%;
        text-align: left;
        border-radius: var(--border-radius);
    }
    
    .season-controls {
        width: 100%;
        margin: 1.5rem 0;
        justify-content: center;
    }
    
    #current-season-select {
        width: 100%;
        max-width: 200px;
    }
    
    .theme-toggle {
        margin: 1rem 0;
        width: 100%;
        justify-content: center;
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 300px;
        width: calc(100% - 300px);
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
        backdrop-filter: blur(3px);
    }
    
    .overlay.active {
        display: block;
        opacity: 1;
    }
    
    nav:not(.active) + .overlay.active {
        left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.7rem;
    }
    
    .race-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .race-info {
        margin: 15px 0;
        width: 100%;
    }
    
    .race-date {
        text-align: left;
        padding-left: 0;
        width: 100%;
    }
    
    .standings-table th,
    .standings-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .standings-table th.col-position,
    .standings-table td.col-position {
        width: 40px;
    }
    
    .standings-table th.col-points,
    .standings-table td.col-points {
        width: 60px;
    }
    
    .driver-card,
    .team-card {
        padding: 1rem;
    }
}

@media (max-width: 320px) {
    .logo h1 {
        font-size: 1.4rem;
    }
    
    nav a {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .standings-table th,
    .standings-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .tab-btn {
        padding: 10px;
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (forced-colors: active) {
    .card, .driver-card, .team-card, .standings-table, .race-card {
        border: 1px solid ButtonText;
    }
    
    .btn, .tab-btn, .race-round, .status {
        border: 1px solid ButtonText;
    }
}

/* Seletor de temporada */
.season-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1.5rem;
    position: relative;
}

#current-season-select {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 0.5rem) center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#current-season-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.3);
}

#current-season-select:hover {
    background-color: var(--primary-hover);
}

/* Cards responsivos */
.driver-card,
.team-card {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: transform var(--transition-speed);
}

.driver-card:hover,
.team-card:hover {
    transform: translateY(-4px);
}

/* Grid responsivo */
.drivers-grid,
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* Suporte para modo de alto contraste */
@media (forced-colors: active) {
    .driver-card,
    .team-card,
    .standings-table {
        border: 1px solid CanvasText;
    }
}

/* Menu Mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1002;
    }

    nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background-color: var(--secondary-color);
        padding: 4rem 1rem 1rem;
        transition: transform 0.3s ease;
        z-index: 1001;
        flex-direction: column;
        align-items: flex-start;
        overflow-y: auto;
    }

    nav.active {
        transform: translateX(280px);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav a {
        display: block;
        padding: 1rem;
        width: 100%;
        text-align: left;
        border-radius: 4px;
    }

    nav a:hover {
        background-color: var(--primary-color);
    }

    .season-controls {
        width: 100%;
        margin: 1rem 0;
    }

    #current-season-select {
        width: 100%;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 280px;
        width: calc(100% - 280px);
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .overlay.active {
        display: block;
        opacity: 1;
    }

    header .container {
        padding-left: 4rem;
    }

    .theme-toggle {
        margin: 1rem 0;
    }

    nav:not(.active) + .overlay.active {
        left: 0;
        width: 100%;
    }
}

/* Animações e efeitos */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

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

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

.page.active {
    animation: fadeIn 0.4s ease forwards;
}

.card, .driver-card, .team-card, .race-card {
    animation: slideInUp 0.5s ease forwards;
}

.quick-access .card:nth-child(1) {
    animation-delay: 0.1s;
}

.quick-access .card:nth-child(2) {
    animation-delay: 0.2s;
}

.quick-access .card:nth-child(3) {
    animation-delay: 0.3s;
}

.quick-access .card:nth-child(4) {
    animation-delay: 0.4s;
}

.drivers-grid > *, .teams-grid > *, .races-list > * {
    opacity: 0;
    animation: slideInUp 0.5s ease forwards;
    animation-play-state: paused;
}

.drivers-grid.visible > *, .teams-grid.visible > *, .races-list.visible > * {
    animation-play-state: running;
}

/* Melhorias no footer */
footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 40px 0 25px;
    text-align: center;
    margin-top: 50px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--primary-color));
    background-size: 200% 100%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

footer a {
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.2s ease;
}

footer a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

footer p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
}

/* Estilo para a contagem de eventos */
.event-count {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-top: 5px;
}

/* Calendário de Corridas melhorado */
.races-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.race-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border-left: 5px solid transparent;
    overflow: hidden;
    position: relative;
}

.race-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.race-card.past {
    border-left-color: #f0f0f0;
}

.race-card.upcoming {
    border-left-color: var(--primary-color);
}

/* Estilo para o botão de visualizar eventos */
.view-events-btn {
    margin-top: 10px;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
}

.view-events-btn:hover {
    background-color: var(--primary-hover);
}

/* Estilos para os cards de eventos dentro do modal */
.events-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.event-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
}

.event-card.past {
    border-left-color: #ccc;
}

.event-card.upcoming {
    border-left-color: var(--primary-color);
}

.event-type {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.event-details {
    padding: 10px 0;
}

.event-details h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.event-details p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.event-card .results-btn {
    align-self: flex-end;
    margin-top: 10px;
    font-size: 0.9rem;
    padding: 8px 15px;
}

/* Modal aninhado */
.results-modal {
    z-index: 1010;
}

.modal-content h3.mt-4 {
    margin-top: 1.5rem;
}

/* Tabelas de resultados */
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg);
    transition: all 0.3s ease;
    table-layout: fixed;
}

.results-table thead tr {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    width: 100%;
}

.results-table th {
    padding: 16px 10px;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    position: sticky;
    top: 0;
    z-index: 10;
    border: none;
    white-space: nowrap;
    color: white;
}

.results-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    animation: fadeInRow 0.6s ease forwards;
    position: relative;
    z-index: 1;
}

.results-table tbody tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    opacity: 0.1;
    transition: width 0.3s ease;
    z-index: -1;
}

.results-table tbody tr:hover::before {
    width: 100%;
}

.results-table tbody tr:hover {
    background-color: rgba(var(--primary-color-rgb), 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 5;
    border-left: 3px solid var(--primary-color);
}

/* Defasagem na animação para cada linha */
.results-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.results-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.results-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.results-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.results-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.results-table tbody tr:nth-child(6) { animation-delay: 0.3s; }
.results-table tbody tr:nth-child(7) { animation-delay: 0.35s; }
.results-table tbody tr:nth-child(8) { animation-delay: 0.4s; }
.results-table tbody tr:nth-child(9) { animation-delay: 0.45s; }
.results-table tbody tr:nth-child(10) { animation-delay: 0.5s; }
.results-table tbody tr:nth-child(11) { animation-delay: 0.55s; }
.results-table tbody tr:nth-child(12) { animation-delay: 0.6s; }
.results-table tbody tr:nth-child(13) { animation-delay: 0.65s; }
.results-table tbody tr:nth-child(14) { animation-delay: 0.7s; }
.results-table tbody tr:nth-child(15) { animation-delay: 0.75s; }
.results-table tbody tr:nth-child(16) { animation-delay: 0.8s; }
.results-table tbody tr:nth-child(17) { animation-delay: 0.85s; }
.results-table tbody tr:nth-child(18) { animation-delay: 0.9s; }
.results-table tbody tr:nth-child(19) { animation-delay: 0.95s; }
.results-table tbody tr:nth-child(20) { animation-delay: 1s; }

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

.results-table td {
    padding: 14px 10px;
    vertical-align: middle;
    transition: all 0.2s ease;
}

/* Zebrado para melhor leitura */
.results-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Destaques para posições na tabela de resultados - visual melhorado */
.results-table tbody tr:nth-child(1) td:first-child {
    color: #ffd700; /* ouro */
    font-weight: 800;
    font-size: 1.1rem;
    position: relative;
}

.results-table tbody tr:nth-child(1) td:first-child::before {
    content: '🏆';
    font-size: 1em;
    margin-right: 5px;
}

.results-table tbody tr:nth-child(2) td:first-child {
    color: #c0c0c0; /* prata */
    font-weight: 700;
    font-size: 1.05rem;
    position: relative;
}

.results-table tbody tr:nth-child(2) td:first-child::before {
    content: '🥈';
    font-size: 0.9em;
    margin-right: 5px;
}

.results-table tbody tr:nth-child(3) td:first-child {
    color: #cd7f32; /* bronze */
    font-weight: 700;
    font-size: 1rem;
    position: relative;
}

.results-table tbody tr:nth-child(3) td:first-child::before {
    content: '🥉';
    font-size: 0.9em;
    margin-right: 5px;
}

/* Alinhamento de cabeçalhos na tabela de resultados */
.results-table th.col-position {
    text-align: center;
    width: 60px;
}

.results-table th.col-driver {
    text-align: left;
    padding-left: 20px;
}

.results-table th.col-team {
    text-align: left;
    padding-left: 20px;
}

.results-table th.col-time,
.results-table th.col-points,
.results-table th.col-laps,
.results-table th.col-status {
    text-align: center;
    width: 100px;
}

/* Alinhamento de células de dados na tabela de resultados */
.results-table td.col-position {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 700;
}

.results-table td.col-driver {
    text-align: left;
    padding-left: 20px;
    font-weight: 600;
}

.results-table td.col-team {
    text-align: left;
    padding-left: 20px;
    font-weight: 600;
}

.results-table td.col-time,
.results-table td.col-points,
.results-table td.col-laps,
.results-table td.col-status {
    text-align: center;
    font-weight: 600;
}

.results-table td.col-points {
    color: var(--primary-color);
    font-weight: 700;
}

.results-table td.col-status.retired {
    color: #e74c3c;
}

/* Responsividade para a tabela de resultados */
@media (max-width: 768px) {
    .results-table {
        border-radius: 8px;
        margin: 15px 0;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .results-table th, 
    .results-table td {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    
    .results-table::-webkit-scrollbar {
        height: 4px;
    }
    
    .results-table::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 10px;
    }
    
    .results-table::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }
    
    /* Ocultar colunas específicas da tabela de resultados em dispositivos móveis */
    .results-table .col-team,
    .results-table .col-points {
        display: none !important;
    }
    
    /* Redefinir o estilo para as tabelas de resultados em mobile */
    .results-table tbody tr {
        display: table-row;
        width: 100%;
        padding: 0;
        margin-bottom: 0;
        background-color: transparent;
        border-radius: 0;
        box-shadow: none;
        animation: none;
        border-left: none !important;
        opacity: 1;
    }
    
    .results-table td {
        display: table-cell;
        width: auto;
        text-align: left;
        padding: 8px 5px;
        border-bottom: 1px solid var(--border-color-light);
        position: relative;
    }
    
    /* Restaurar estilos específicos para as células da tabela */
    .results-table .col-position {
        width: 40px;
        min-width: 40px;
        height: auto;
        border-radius: 0;
        background-color: transparent;
        font-weight: inherit;
        font-size: inherit;
        color: inherit;
        justify-content: center;
        text-align: center;
    }
    
    /* Destaque para os três primeiros colocados */
    .results-table tr:nth-child(1) .col-position {
        font-weight: bold;
        color: #ffd700;
    }
    
    .results-table tr:nth-child(2) .col-position {
        font-weight: bold;
        color: #c0c0c0;
    }
    
    .results-table tr:nth-child(3) .col-position {
        font-weight: bold;
        color: #cd7f32;
    }
    
    /* Nome do piloto */
    .results-table .col-driver {
        font-size: 0.9rem;
        line-height: 1.2;
        text-align: left;
        min-width: 120px;
    }
    
    /* Tempo/Status */
    .results-table .col-status {
        text-align: right;
        font-weight: 500;
        font-size: 0.9rem;
        color: var(--text-dark);
        min-width: 100px;
    }
    
    /* Tempo/Status para pilotos que abandonaram */
    .results-table .col-status[data-status*="Retired"],
    .results-table .col-status[data-status*="DNF"],
    .results-table .col-status[data-status*="DSQ"] {
        color: #e74c3c;
        font-style: italic;
    }
    
    /* Remover os data-labels em visualização de tabela */
    .results-table td::before {
        display: none;
    }
    
    /* Ajuste fino para alinhamento com o cabeçalho */
    .results-table thead tr {
        display: table-row;
    }
    
    .results-table th {
        display: table-cell;
        text-align: left;
        padding: 8px 5px;
    }
    
    /* Garantir que as colunas ocultas não ocupem espaço */
    .results-table th.hide-on-mobile,
    .results-table td.hide-on-mobile {
        display: none !important;
    }
    
    /* Adicionar rolagem horizontal caso necessário */
    .results-table {
        width: 100%;
        white-space: nowrap;
        overflow-x: auto;
        display: block;
    }
}

/* Tela de Loading Inicial */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000 0%, #15151e 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s;
    opacity: 1;
    visibility: visible;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    position: relative;
    z-index: 1000;
    padding: 2rem;
}

.loading-logo {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: #fff;
    position: relative;
    text-shadow: 0 0 20px var(--primary-color);
    animation: loadingPulse 2s infinite;
}

.loading-message {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 2.5rem;
    opacity: 0;
    font-weight: 500;
    animation: loadingFadeIn 1s forwards 0.7s;
}

/* Bandeira Quadriculada */
.checkered-flag {
    width: 200px;
    height: 100px;
    margin: 0 auto 2rem;
    position: relative;
    overflow: hidden;
    perspective: 300px;
    animation: waveLoadingFlag 3s infinite ease-in-out;
}

.flag-pattern {
    width: 100%;
    height: 100%;
    background-image: repeating-conic-gradient(#000 0% 25%, #fff 0% 50%);
    background-size: 25px 25px;
    animation: loadingFlagWave 1s linear infinite;
    transform-origin: center;
}

/* Fogos de Artifício Mais Intensos */
.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
    overflow: visible;
}

.firework {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9990;
    will-change: transform, opacity, left, top;
    filter: blur(0.5px);
    transform-style: preserve-3d;
}

.firework.flash {
    background-color: rgba(255, 255, 255, 0.95) !important;
    z-index: 9995;
    filter: blur(3px);
    animation: flashPulse 0.7s ease-out forwards;
    mix-blend-mode: screen;
}

/* Gradiente radial para partículas mais realistas */
.firework::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.1) 60%, transparent 70%);
    border-radius: 50%;
    opacity: 0.7;
    mix-blend-mode: screen;
    pointer-events: none;
}

/* Efeito de brilho adicional */
.firework::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 40%);
    border-radius: 50%;
    opacity: 0.4;
    pointer-events: none;
    filter: blur(2px);
    mix-blend-mode: screen;
}

@keyframes flashPulse {
    0% { transform: scale(1); opacity: 1; }
    40% { transform: scale(4); opacity: 0.8; }
    100% { transform: scale(8); opacity: 0; }
}

@keyframes fireworkTrail {
    0% { opacity: 0.9; width: 100%; height: 100%; }
    100% { opacity: 0; width: 70%; height: 70%; }
}

/* Botão para pular introdução */
.skip-intro {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: all 0.3s ease;
    opacity: 0;
    animation: loadingFadeIn 0.5s forwards 2s;
}

.skip-intro:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Animações para Loading */
@keyframes loadingPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

@keyframes waveLoadingFlag {
    0%, 100% { transform: rotateX(10deg); }
    50% { transform: rotateX(-5deg); }
}

@keyframes loadingFlagWave {
    0% { background-position: 0 0; }
    100% { background-position: 25px 25px; }
}

/* Media queries para tela de loading em dispositivos móveis */
@media (max-width: 768px) {
    /* Estilos para elementos de loading */
    .loading-logo {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .loading-message {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
        padding: 0 15px;
    }
    
    .checkered-flag {
        width: 150px;
        height: 60px;
    }
    
    .loading-content {
        padding: 1rem;
    }
    
    .skip-intro {
        display: none; /* Ocultar botão de pular introdução em dispositivos móveis */
    }
    
    /* Otimização de fogos de artifício para mobile */
    .fireworks-container {
        opacity: 0.8;
    }
    
    .firework {
        opacity: 0.7;
        filter: blur(0.8px);
    }
    
    .firework::before,
    .firework::after {
        display: none;
    }
    
    .firework.flash {
        animation: flashPulseMobile 0.6s ease-out forwards;
        transform-origin: center;
    }
    
    @keyframes flashPulseMobile {
        0% { transform: scale(1); opacity: 0.8; }
        40% { transform: scale(2.5); opacity: 0.6; }
        100% { transform: scale(4); opacity: 0; }
    }
    
    /* Ajustes para tabelas em dispositivos móveis */
    /* Garantir que elementos ocultos não ocupem espaço */
    .hide-on-mobile {
        display: none !important;
    }
    
    /* Estilos para tabelas de classificação */
    .standings-table {
        border-radius: 8px;
        margin: 15px 0;
        width: 100%;
        white-space: nowrap;
        overflow-x: auto;
        display: block;
        max-width: 100%;
        table-layout: fixed;
    }
    
    .standings-table th, 
    .standings-table td {
        padding: 8px 5px;
        font-size: 0.9rem;
    }
    
    .standings-table::-webkit-scrollbar {
        height: 4px;
    }
    
    .standings-table::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 10px;
    }
    
    .standings-table::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }
    
    .standings-table thead, 
    .standings-table tbody {
        width: 100%;
    }
    
    .standings-table tr {
        width: 100%;
        display: table;
        table-layout: fixed;
    }
    
    .standings-table tbody tr:hover::before {
        width: 100%;
    }
    
    .standings-table tbody tr::before {
        left: 0;
        width: 100%;
    }
    
    /* Ajuste na distribuição das colunas visíveis para ocupar 100% do espaço */
    .standings-table .col-position {
        width: 15%;
        min-width: 40px;
        text-align: center;
    }
    
    .standings-table .col-driver,
    .standings-table .col-team {
        width: 60%;
        min-width: 120px;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .standings-table .col-points {
        width: 25%;
        min-width: 70px;
        text-align: right;
        font-weight: 700;
        color: var(--primary-color);
    }
    
    /* Garantir que os backgrounds das linhas pares e ímpares ocupem toda a largura */
    .standings-table tbody tr:nth-child(even) {
        background-color: rgba(0, 0, 0, 0.02);
        width: 100%;
    }
    
    .standings-table tbody tr:hover {
        background-color: rgba(var(--primary-color-rgb), 0.05);
        width: 100%;
    }
    
    /* Estilos para tabelas de resultados */
    .results-table {
        border-radius: 8px;
        margin: 15px 0;
        width: 100%;
        white-space: nowrap;
        overflow-x: auto;
        display: block;
        max-width: 100%;
        table-layout: fixed;
    }
    
    .results-table th, 
    .results-table td {
        padding: 8px 5px;
        font-size: 0.9rem;
    }
    
    .results-table::-webkit-scrollbar {
        height: 4px;
    }
    
    .results-table::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 10px;
    }
    
    .results-table::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }
    
    .results-table thead, 
    .results-table tbody {
        width: 100%;
    }
    
    .results-table tr {
        width: 100%;
        display: table;
        table-layout: fixed;
    }
    
    .results-table tbody tr:hover::before {
        width: 100%;
    }
    
    .results-table tbody tr::before {
        left: 0;
        width: 100%;
    }
    
    /* Ocultar colunas específicas da tabela de resultados em dispositivos móveis */
    .results-table .col-team,
    .results-table .col-points {
        display: none !important;
    }
    
    /* Ajustes específicos para colunas de resultados */
    .results-table .col-position {
        width: 15%;
        min-width: 40px;
    }
    
    .results-table .col-driver {
        width: 60%;
        min-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .results-table .col-status {
        width: 25%;
        min-width: 100px;
        text-align: right;
    }
    
    /* Garantir que os backgrounds das linhas pares e ímpares ocupem toda a largura */
    .results-table tbody tr:nth-child(even) {
        background-color: rgba(0, 0, 0, 0.02);
        width: 100%;
    }
    
    .results-table tbody tr:hover {
        background-color: rgba(var(--primary-color-rgb), 0.05);
        width: 100%;
    }
    
    /* Tempo/Status para pilotos que abandonaram */
    .results-table .col-status[data-status*="Retired"],
    .results-table .col-status[data-status*="DNF"],
    .results-table .col-status[data-status*="DSQ"] {
        color: #e74c3c;
        font-style: italic;
    }
} 