/* Base Styles */
.f1pg-prediction-form,
.f1pg-leaderboard,
.f1pg-user-stats,
.f1pg-next-race {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
}

/* Card Styles */
.f1pg-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.f1pg-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Header Styles */
.f1pg-header {
    background: linear-gradient(135deg, #e10600 0%, #c00500 100%);
    padding: 2rem;
    color: white;
}

.f1pg-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: white;
}

.f1pg-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.95;
}

/* Form Styles */
.f1pg-form-group {
    margin-bottom: 1.75rem;
    position: relative;
}

.f1pg-form-label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 8px;
    border-left: 4px solid;
}

.f1pg-form-group:nth-child(2) .f1pg-form-label {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.f1pg-form-group:nth-child(3) .f1pg-form-label {
    border-color: #9ca3af;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.f1pg-form-group:nth-child(4) .f1pg-form-label {
    border-color: #fb923c;
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
}

.f1pg-form-label::before {
    content: '';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.f1pg-form-group:nth-child(2) .f1pg-form-label::before {
    content: '1';
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.f1pg-form-group:nth-child(3) .f1pg-form-label::before {
    content: '2';
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.4);
}

.f1pg-form-group:nth-child(4) .f1pg-form-label::before {
    content: '3';
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.4);
}

.f1pg-prediction-form select {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 3rem;
}

.f1pg-form-group:nth-child(2) select {
    border-color: #fde68a;
}

.f1pg-form-group:nth-child(2) select:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.f1pg-form-group:nth-child(3) select {
    border-color: #e5e7eb;
}

.f1pg-form-group:nth-child(3) select:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.2);
}

.f1pg-form-group:nth-child(4) select {
    border-color: #fed7aa;
}

.f1pg-form-group:nth-child(4) select:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.2);
}

.f1pg-prediction-form select:focus {
    outline: none;
}

.f1pg-prediction-form select:hover {
    border-color: #d1d5db;
}

/* Button Styles */
.f1pg-button {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #e10600 0%, #c00500 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.f1pg-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 6, 0, 0.3);
}

.f1pg-button:active {
    transform: translateY(0);
}

/* Countdown Styles */
.f1pg-countdown-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.f1pg-countdown-header {
    text-align: center;
    color: #e10600;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.f1pg-countdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.f1pg-countdown-box {
    background: linear-gradient(135deg, #2d2d2d 0%, #232323 100%);
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.f1pg-countdown-box:hover {
    transform: translateY(-4px);
}

.f1pg-countdown-box-seconds {
    background: linear-gradient(135deg, #e10600 0%, #c00500 100%);
    box-shadow: 0 4px 16px rgba(225, 6, 0, 0.4);
}

.f1pg-countdown-value {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.f1pg-countdown-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Alert Styles */
.f1pg-alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 4px solid;
    margin-bottom: 1rem;
}

.f1pg-alert-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.f1pg-alert-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.f1pg-alert-info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.f1pg-alert-success {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

/* Info Box */
.f1pg-info-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
    position: relative;
}

.f1pg-info-box::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 4px;
    height: calc(100% - 3rem);
    background: linear-gradient(180deg, #3b82f6 0%, #0ea5e9 100%);
    border-radius: 2px;
}

.f1pg-info-box h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0c4a6e;
    margin: 0 0 1rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.f1pg-info-box ul {
    list-style: none;
    padding: 0;
    margin: 0 0 0 1rem;
}

.f1pg-info-box li {
    font-size: 0.9rem;
    color: #0c4a6e;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    padding-left: 2.5rem;
    position: relative;
    background: white;
    border-radius: 6px;
}

.f1pg-info-box li:last-child {
    margin-bottom: 0;
}

.f1pg-info-box li::before {
    content: '✓';
    position: absolute;
    left: 0.75rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e10600 0%, #c00500 100%);
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
    border-radius: 50%;
}

.f1pg-info-box strong {
    color: #0c4a6e;
    font-weight: 700;
}

/* Login CTA Block */
.f1pg-login-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe4e4 100%);
    border: 2px dashed #fca5a5;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.f1pg-login-cta-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e10600 0%, #c00500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 24px rgba(225, 6, 0, 0.3);
}

.f1pg-login-cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem 0;
}

.f1pg-login-cta-text {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
    max-width: 320px;
    line-height: 1.6;
}

.f1pg-login-cta-button {
    display: inline-block;
    padding: 0.875rem 2.5rem;
    background: linear-gradient(135deg, #e10600 0%, #c00500 100%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(225, 6, 0, 0.3);
}

.f1pg-login-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 6, 0, 0.4);
    color: white;
    text-decoration: none;
}

.f1pg-login-cta-button:active {
    transform: translateY(0);
}

/* Leaderboard Styles */
.f1pg-leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.f1pg-leaderboard-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.f1pg-leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
}

.f1pg-leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #d1d5db;
}

.f1pg-leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    border: 2px solid #fb923c;
}

.f1pg-position {
    font-size: 1.75rem;
    font-weight: 700;
    min-width: 3rem;
    text-align: center;
    color: #374151;
}

.f1pg-leaderboard-item.rank-1 .f1pg-position,
.f1pg-leaderboard-item.rank-2 .f1pg-position,
.f1pg-leaderboard-item.rank-3 .f1pg-position {
    font-size: 2rem;
}

.f1pg-user-info {
    flex: 1;
    margin: 0 1.5rem;
}

.f1pg-user-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.f1pg-user-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

.f1pg-points {
    text-align: right;
}

.f1pg-points-value {
    font-size: 2rem;
    font-weight: 700;
    color: #e10600;
    line-height: 1;
}

.f1pg-points-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Predictions Votes */
.f1pg-predictions-votes {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.f1pg-votes-summary {
    margin-bottom: 1.5rem;
    text-align: right;
}

.f1pg-votes-total {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.f1pg-votes-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.f1pg-vote-row {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.f1pg-vote-row:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.f1pg-vote-rank-1 {
    background: linear-gradient(135deg, #fef9ec 0%, #fef3c7 100%);
    border-color: #fbbf24;
}

.f1pg-vote-rank-2 {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-color: #d1d5db;
}

.f1pg-vote-rank-3 {
    background: linear-gradient(135deg, #fff7f0 0%, #fed7aa 100%);
    border-color: #fb923c;
}

.f1pg-vote-rank {
    width: 2.75rem;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.f1pg-medal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
}

.f1pg-medal-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.f1pg-medal-silver {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.4);
}

.f1pg-medal-bronze {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.4);
}

.f1pg-rank-num {
    font-size: 1rem;
    font-weight: 600;
    color: #9ca3af;
    width: 32px;
    text-align: center;
}

.f1pg-vote-driver {
    flex: 1;
    margin: 0 1rem;
    min-width: 0;
}

.f1pg-vote-driver-info {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.f1pg-driver-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: #e10600;
    background: #fef2f2;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.f1pg-driver-name {
    font-size: 0.975rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.f1pg-driver-team {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.f1pg-vote-bar-wrap {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.f1pg-vote-bar {
    height: 100%;
    background: linear-gradient(90deg, #e10600 0%, #c00500 100%);
    border-radius: 3px;
    transition: width 0.6s ease;
    min-width: 0;
}

.f1pg-vote-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: 3.5rem;
}

.f1pg-vote-num {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.f1pg-vote-pct {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .f1pg-next-race .flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .f1pg-header {
        padding: 1.5rem;
    }

    .f1pg-header h2 {
        font-size: 1.5rem;
    }

    .f1pg-header-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .f1pg-countdown-container {
        padding: 1.5rem 1rem;
    }

    .f1pg-countdown {
        gap: 0.75rem;
    }

    .f1pg-countdown-box {
        min-width: 70px;
        padding: 1rem 0.75rem;
    }

    .f1pg-countdown-value {
        font-size: 2rem;
    }

    .f1pg-countdown-label {
        font-size: 0.65rem;
    }

    .f1pg-leaderboard-item {
        padding: 1rem;
    }

    .f1pg-position {
        font-size: 1.5rem;
        min-width: 2.5rem;
    }

    .f1pg-user-info {
        margin: 0 1rem;
    }

    .f1pg-user-name {
        font-size: 1rem;
    }

    .f1pg-points-value {
        font-size: 1.5rem;
    }
}
