/* ========================================== */
/* assets/css/frontend.css */
/* ========================================== */

.f1-stars-standings,
.f1-stars-bet-form,
.f1-stars-all-bets,
.f1-stars-calendar {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.f1-stars-standings h2,
.f1-stars-bet-form h2,
.f1-stars-all-bets h2,
.f1-stars-calendar h2 {
    color: #e10600;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #e10600;
}

/* Tabla de clasificación */
.f1-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.f1-table thead {
    background: #15151e;
    color: #fff;
}

.f1-table th,
.f1-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.f1-table th.position,
.f1-table td.position {
    width: 60px;
    text-align: center;
    font-weight: bold;
}

.f1-table th.points,
.f1-table td.points {
    width: 100px;
    text-align: center;
}

.f1-table th.bets,
.f1-table td.bets {
    width: 100px;
    text-align: center;
}

.f1-table tbody tr:hover {
    background: #f8f9fa;
}

.f1-table tbody tr:nth-child(1) td.position {
    background: #ffd700;
    color: #000;
}

.f1-table tbody tr:nth-child(2) td.position {
    background: #c0c0c0;
    color: #000;
}

.f1-table tbody tr:nth-child(3) td.position {
    background: #cd7f32;
    color: #fff;
}

/* Formulario de apuestas */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #e10600;
}

.drivers-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    .drivers-selection {
        grid-template-columns: 1fr;
    }
}

.f1-button {
    background: #e10600;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.f1-button:hover {
    background: #c10500;
}

.f1-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#bet-result {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

#bet-result.success {
    background: #d5f5e3;
    border: 1px solid #27ae60;
    color: #1e7e34;
    display: block;
}

#bet-result.error {
    background: #fadbd8;
    border: 1px solid #e74c3c;
    color: #c0392b;
    display: block;
}

/* Todas las apuestas */
.f1-session-bets {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.f1-session-bets h3 {
    color: #e10600;
    margin-top: 0;
}

.session-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Calendario */
.f1-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.f1-race-card {
    background: linear-gradient(135deg, #15151e 0%, #38383f 100%);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.f1-race-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.race-round {
    background: #e10600;
    color: #fff;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.f1-race-card h3 {
    margin: 10px 0;
    font-size: 20px;
    color: #fff;
}

.f1-race-card .circuit {
    color: #ccc;
    font-size: 14px;
    margin: 8px 0;
}

.f1-race-card .dates {
    color: #e10600;
    font-weight: 600;
    font-size: 14px;
    margin-top: 12px;
}

/* Loading spinner */
.f1-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e10600;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .f1-stars-standings,
    .f1-stars-bet-form,
    .f1-stars-all-bets,
    .f1-stars-calendar {
        padding: 15px;
    }
    
    .f1-table {
        font-size: 14px;
    }
    
    .f1-table th,
    .f1-table td {
        padding: 8px 4px;
    }
}