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

body {
    font-family: 'Rajdhani', sans-serif;
    background: #0a0a0a linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    background-attachment: fixed;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

html {
    background-color: #0a0a0a;
}

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

/* Header Styles */
.header {
    margin-bottom: 30px;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.settings-section {
    display: flex;
    align-items: center;
}

.btn-settings {
    background: linear-gradient(135deg, #333, #555);
    border: 1px solid #666;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cccccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn-settings:hover {
    background: linear-gradient(135deg, #555, #777);
    border-color: #ff1e1e;
    color: #ff1e1e;
    transform: rotate(90deg);
}

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

.logo i {
    font-size: 2.5rem;
    color: #ff1e1e;
    animation: pulse 2s infinite;
}

.logo h1 {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 2rem;
    background: linear-gradient(45deg, #ff1e1e, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.season-info {
    text-align: right;
}

.season-info .season {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff1e1e;
    letter-spacing: 1px;
}

.season-info .round {
    display: block;
    font-size: 0.9rem;
    color: #cccccc;
    letter-spacing: 1px;
}

/* Authentication Section */
.auth-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #333;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ff1e1e;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.user-status {
    font-size: 0.7rem;
    color: #ff1e1e;
    letter-spacing: 1px;
}

.btn-google {
    background: linear-gradient(45deg, #4285f4, #357ae8);
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-google:hover {
    background: linear-gradient(45deg, #357ae8, #2968d7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

.btn-logout {
    background: linear-gradient(45deg, #666, #888);
    color: white;
    border: 1px solid #999;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.btn-logout:hover {
    background: linear-gradient(45deg, #888, #aaa);
}

/* Auth Notice */
.auth-notice {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #444;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.notice-content {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #cccccc;
}

.notice-content i {
    font-size: 1.5rem;
    color: #ffa500;
}

.notice-content p {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Next Race Section */
.next-race-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    border: 1px solid #333;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.next-race-header {
    background: linear-gradient(90deg, #ff1e1e, #cc0000);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.next-race-header h3 {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin: 0;
}

.next-race-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    padding: 25px;
    align-items: center;
}

.race-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.race-location {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.race-date {
    font-size: 1.2rem;
    color: #ff1e1e;
    font-weight: 600;
    letter-spacing: 1px;
}

.race-description {
    font-size: 1rem;
    color: #cccccc;
    line-height: 1.5;
    margin-top: 10px;
}

.circuit-image {
    max-width: 200px;
    max-height: 150px;
    border-radius: 10px;
    border: 2px solid #ff1e1e;
    object-fit: cover;
}

.no-race-scheduled {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-race-scheduled i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #333;
}

.no-race-scheduled h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #888;
}

.no-race-scheduled p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.header-line {
    height: 3px;
    background: linear-gradient(90deg, #ff1e1e 0%, #ffffff 50%, #ff1e1e 100%);
    border-radius: 2px;
    animation: shimmer 3s infinite;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff1e1e, transparent);
    animation: scan 3s infinite;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff1e1e;
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(45deg, #ff1e1e, #ff4444);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 30, 30, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #ff4444, #ff6666);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 30, 30, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #333, #555);
    color: white;
    border: 1px solid #666;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #555, #777);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(45deg, #ff8c00, #ffb347);
    color: white;
    border: 1px solid #ff8c00;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(45deg, #ffb347, #ffd700);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
}

/* Leaderboard */
.leaderboard-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    border: 1px solid #333;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.leaderboard-header {
    background: linear-gradient(90deg, #ff1e1e, #cc0000);
    padding: 20px;
    text-align: center;
}

.leaderboard-header h2 {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.leaderboard {
    padding: 0;
}

.driver-entry {
    display: grid;
    grid-template-columns: 80px 1fr 120px 80px;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.driver-entry:hover {
    background: linear-gradient(90deg, rgba(255, 30, 30, 0.1), transparent);
    transform: translateX(5px);
}

.driver-entry:last-child {
    border-bottom: none;
}

.position {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    position: relative;
}

.position.gold {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.position.silver {
    color: #c0c0c0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.position.bronze {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.driver-info {
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.driver-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #ff1e1e;
    object-fit: cover;
    background: linear-gradient(135deg, #333, #555);
}

.driver-details {
    flex: 1;
}

.driver-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.points {
    text-align: center;
}

.points-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff1e1e;
    display: block;
}

.points-label {
    font-size: 0.7rem;
    color: #888;
    letter-spacing: 1px;
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 3px;
}

.btn-edit {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
}

.btn-delete {
    background: linear-gradient(45deg, #f44336, #da190b);
    color: white;
    border: none;
}

.btn-edit:hover, .btn-delete:hover {
    transform: scale(1.05);
}

/* Disabled button states */
.btn:disabled, .btn-edit:disabled, .btn-delete:disabled, .btn-settings:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    pointer-events: none;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ff1e1e;
}

.loading p {
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #333;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #999;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 30px;
}

.empty-state .btn {
    display: inline-block;
    margin: 0 auto;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    margin: 5% auto;
    padding: 0;
    border: 1px solid #333;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.settings-left,
.settings-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #333;
    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    resize: vertical;
    min-height: 100px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #ff1e1e;
    box-shadow: 0 0 10px rgba(255, 30, 30, 0.3);
}

.circuit-image-container {
    margin-bottom: 15px;
    text-align: center;
    padding: 20px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #2a2a2a;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circuit-image-container img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 5px;
    border: 2px solid #ff1e1e;
    object-fit: cover;
}

.circuit-image-container p {
    color: #888;
    font-style: italic;
    margin: 0;
}

.modal-header {
    background: linear-gradient(90deg, #ff1e1e, #cc0000);
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ffcccc;
}

.modal form {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #cccccc;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #333;
    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="file"] {
    padding: 8px;
    background: #2a2a2a;
    border: 2px dashed #666;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: #ff1e1e;
    background: #333;
}

.form-help {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

.current-picture-container {
    margin-bottom: 15px;
    text-align: center;
    padding: 20px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #2a2a2a;
}

.current-picture-container img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 50%;
    border: 3px solid #ff1e1e;
    object-fit: cover;
}

.current-picture-container p {
    color: #888;
    font-style: italic;
    margin: 0;
}

.picture-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}

/* Picture Preview Styles */
.picture-preview-container {
    margin-bottom: 15px;
    text-align: center;
    padding: 15px;
    border: 2px dashed #ff1e1e;
    border-radius: 8px;
    background: rgba(255, 30, 30, 0.1);
    animation: fadeIn 0.3s ease-in;
}

.picture-preview-container img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    border: 2px solid #ff1e1e;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.preview-label {
    color: #ff1e1e;
    font-weight: 600;
    font-size: 0.9em;
    margin: 8px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.form-group input:focus {
    outline: none;
    border-color: #ff1e1e;
    box-shadow: 0 0 10px rgba(255, 30, 30, 0.3);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-right {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .stats-bar {
        grid-template-columns: 1fr;
    }
    
    .driver-entry {
        grid-template-columns: 60px 1fr 100px;
        gap: 10px;
    }
    
    .actions {
        grid-column: 1 / -1;
        margin-top: 15px;
    }
    
    .position {
        font-size: 1.5rem;
    }
    
    .driver-name {
        font-size: 1.1rem;
    }
    
    .points-value {
        font-size: 1.4rem;
    }
    
    .user-info {
        padding: 8px 12px;
    }
    
    .user-name {
        font-size: 0.8rem;
    }
    
    .user-status {
        font-size: 0.6rem;
    }
    
    .next-race-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .race-location {
        font-size: 1.4rem;
    }
    
    .race-date {
        font-size: 1rem;
    }
    
    .circuit-image {
        max-width: 150px;
        max-height: 100px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-large {
        max-width: 95%;
    }
}
