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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1A1A3A 0%, #0088FF 50%, #FF0066 100%);
    min-height: 100vh;
}

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

/* Sidebar Navigation */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1A1A3A 0%, #0088FF 100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    position: relative;
}

.sidebar-logo {
    max-width: 80px;
    max-height: 80px;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.sidebar-header h2 {
    color: white;
    font-size: 1.3rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #00FF88;
    padding-left: 2rem;
}

.sidebar-nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: #FF0066;
    color: white;
}

.sidebar-nav-item.hp-nav-item {
    background: linear-gradient(90deg, rgba(255, 0, 102, 0.2) 0%, transparent 100%);
    border-left-color: #FF0066;
}

.sidebar-nav-item.hp-nav-item:hover {
    background: linear-gradient(90deg, rgba(255, 0, 102, 0.3) 0%, transparent 100%);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hamburger-menu {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.header .container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-auth {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    display: flex;
    gap: 0.8rem;
    align-items: center;
    z-index: 10;
}

.auth-header-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.auth-header-btn:hover {
    background: linear-gradient(135deg, #FF0066 0%, #00FF88 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.auth-header-btn.logout-btn:hover {
    background: linear-gradient(135deg, #FF0066 0%, #FF4444 100%);
}

.auth-header-btn.profile-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #e74c3c 100%);
}

.auth-header-btn.profile-btn:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
}

.auth-header-btn.admin-btn {
    background: linear-gradient(135deg, #1A1A3A 0%, #0088FF 100%);
}

.auth-header-btn.admin-btn:hover {
    background: linear-gradient(135deg, #0088FF 0%, #00FF88 100%);
}

.header .logo {
    max-height: 80px;
    max-width: 200px;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.nav {
    display: none; /* Hidden - replaced by sidebar */
}

.nav .container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.nav-btn:hover,
.nav-btn.active {
    background: linear-gradient(135deg, #FF0066 0%, #00FF88 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.main {
    padding: 2rem 0;
    min-height: 60vh;
}

.section {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

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

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

.section h2 {
    color: #444;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(135deg, #0088FF 0%, #1A1A3A 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.stat-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Fastest by Location Section */
.fastest-by-location {
    margin-bottom: 3rem;
}

.fastest-by-location h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fastest-by-location h3 i {
    color: #0088FF;
}

.fastest-location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.fastest-location-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #0088FF;
    transition: transform 0.3s ease;
}

.fastest-location-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.location-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-name i {
    color: #0088FF;
}

.fastest-time {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FF0066;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fastest-time i {
    font-size: 1.2rem;
}

.fastest-racer-name {
    font-size: 1rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fastest-racer-name i {
    color: #27ae60;
}

/* Weather times (dry/wet) */
.weather-times {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.weather-time {
    flex: 1;
    min-width: 150px;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
}

.weather-time.dry {
    border-left: 3px solid #f39c12;
}

.weather-time.wet {
    border-left: 3px solid #3498db;
}

.weather-time.indoor {
    border-left: 3px solid #9b59b6;
}

.weather-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.weather-time.dry .weather-label {
    color: #f39c12;
}

.weather-time.wet .weather-label {
    color: #3498db;
}

.weather-time.indoor .weather-label {
    color: #9b59b6;
}

.weather-time .fastest-time {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.weather-time .fastest-racer-name {
    font-size: 0.9rem;
}

.no-data {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* 13HP Page Styles */
.hp-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.hp-info-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #FF0066;
}

.hp-info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF0066 0%, #0088FF 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.hp-info-icon i {
    font-size: 1.8rem;
    color: white;
}

.hp-info-card h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.hp-info-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.hp-requirements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hp-requirements li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: #555;
}

.hp-requirements li:last-child {
    border-bottom: none;
}

.hp-progress-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hp-progress-section h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hp-progress-section h3 i {
    color: #0088FF;
}

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

.hp-stats-table th,
.hp-stats-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.hp-stats-table th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.hp-stats-table tbody tr:hover {
    background: rgba(0, 136, 255, 0.05);
}

.race-count {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.count-ok {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.count-pending {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.text-success {
    color: #27ae60;
}

.text-warning {
    color: #f39c12;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-eligible {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}

.status-pending {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.status-enabled {
    background: rgba(39, 174, 96, 0.3);
    color: #1e8449;
    font-weight: bold;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    padding: 2rem;
}

@media (max-width: 768px) {
    .hp-info-cards {
        grid-template-columns: 1fr;
    }

    .hp-stats-table {
        font-size: 0.85rem;
    }

    .hp-stats-table th,
    .hp-stats-table td {
        padding: 0.75rem 0.5rem;
    }
}

.racers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.racer-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border-left: 5px solid #FF0066;
}

.racer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.racer-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.racer-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.racer-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.racer-stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label i {
    color: #0088FF;
    width: 16px;
}

.stat-value {
    font-weight: 600;
    color: #333;
}

.racer-best-laps {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(0, 136, 255, 0.2);
}

.racer-best-laps h4 {
    color: #0088FF;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.best-laps-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.best-lap-location {
    padding: 0.5rem;
    background: rgba(0, 136, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 0.4rem;
}

.best-lap-location:last-child {
    margin-bottom: 0;
}

.lap-location-name {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.lap-conditions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lap-condition {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.lap-condition.dry {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.lap-condition.wet {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.lap-condition.indoor {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
}

/* Search input */
.search-container {
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 400px;
}

.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #0088FF;
    box-shadow: 0 0 10px rgba(0, 136, 255, 0.2);
}

.search-input-wrapper input::placeholder {
    color: #999;
}

.no-results {
    text-align: center;
    color: #666;
    padding: 2rem;
    font-style: italic;
}

.race-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.race-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #00FF88;
}

.race-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.races-list {
    display: grid;
    gap: 1rem;
}

.race-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
}

/* Race Dropdown Styles */
.race-dropdown {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.race-dropdown-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    user-select: none;
}

.race-dropdown-header:hover {
    background: rgba(0, 136, 255, 0.05);
}

.race-dropdown-info h4 {
    color: #0088FF;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.race-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.race-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.race-meta i {
    color: #0088FF;
}

.race-dropdown-toggle {
    font-size: 1.5rem;
    color: #0088FF;
    padding: 0 0.5rem;
    transition: transform 0.3s ease;
}

.race-results-container {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 1.5rem 1.5rem;
}

.race-results-container.collapsed {
    max-height: 0;
    padding: 0 1.5rem;
}

.race-results-loading {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.race-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.race-results-table th,
.race-results-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.race-results-table th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.race-results-table tbody tr:hover {
    background: rgba(0, 136, 255, 0.05);
}

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

.dnf-row {
    opacity: 0.6;
}

.dnf-badge {
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 600;
}

.no-results {
    text-align: center;
    color: #666;
    padding: 2rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .race-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .race-results-table {
        font-size: 0.85rem;
    }

    .race-results-table th,
    .race-results-table td {
        padding: 0.5rem;
    }
}

.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: linear-gradient(135deg, #1A1A3A 0%, #FF0066 100%);
    color: white;
    font-weight: 600;
}

.table tr:hover {
    background: #f8f9ff;
}

.position-1 { background: linear-gradient(135deg, #00FF88 0%, #0088FF 100%) !important; color: #1A1A3A !important; font-weight: bold; }
.position-2 { background: linear-gradient(135deg, #c0c0c0 0%, #e5e5e5 100%) !important; }
.position-3 { background: linear-gradient(135deg, #FF0066 0%, #ffb3d1 100%) !important; color: white !important; }

.footer {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    font-style: italic;
    color: #666;
}

.error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

/* Media Section Styles */
.media-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.media-tab-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #333;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.media-tab-btn:hover,
.media-tab-btn.active {
    background: linear-gradient(135deg, #FF0066 0%, #0088FF 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.media-tab-content {
    display: none;
}

.media-tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.media-upload-info {
    background: rgba(0, 136, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid #0088FF;
}

.config-section {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.config-section label {
    font-weight: bold;
    color: #333;
}

.config-section input {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
}

.config-section input:focus {
    outline: none;
    border-color: #FF0066;
    box-shadow: 0 0 5px rgba(255, 0, 102, 0.3);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.media-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
}

.media-item-info {
    padding: 1rem;
}

.media-item-info h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.media-item-info p {
    color: #666;
    font-size: 0.9rem;
}

.instructions {
    background: rgba(26, 26, 58, 0.1);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    border-left: 4px solid #1A1A3A;
}

.instructions h3 {
    color: #333;
    margin-bottom: 1rem;
}

.instructions ol {
    color: #555;
    line-height: 1.6;
}

.instructions ol li {
    margin-bottom: 0.5rem;
}

.loading-media {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading-media i {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.media-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.media-overlay.active {
    display: flex;
}

.media-overlay-content {
    max-width: 90%;
    max-height: 90%;
}

.media-overlay img,
.media-overlay video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

.media-overlay-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 1001;
}

.photo-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #0088FF 0%, #FF0066 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px 10px 0 0;
}

.photo-placeholder:hover {
    background: linear-gradient(135deg, #FF0066 0%, #00FF88 100%);
    transform: scale(1.02);
}

.photo-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.photo-placeholder h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.photo-placeholder p {
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

.google-photos-info {
    grid-column: 1 / -1;
    background: rgba(0, 255, 136, 0.1);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    border-left: 4px solid #00FF88;
}

.google-photos-info h3 {
    color: #333;
    margin-bottom: 1rem;
}

.google-photos-info ol {
    color: #555;
    line-height: 1.6;
}

.google-photos-info ol li {
    margin-bottom: 0.5rem;
}

.photo-upload-instructions {
    grid-column: 1 / -1;
    background: rgba(255, 0, 102, 0.1);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    border-left: 4px solid #FF0066;
}

.photo-upload-instructions h3 {
    color: #333;
    margin-bottom: 1rem;
}

.photo-upload-instructions p {
    color: #555;
    margin-bottom: 1rem;
    font-weight: 500;
}

.photo-upload-instructions ol {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.photo-upload-instructions ol li {
    margin-bottom: 0.5rem;
}

.photo-upload-instructions code {
    background: rgba(26, 26, 58, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.media-item img {
    transition: all 0.3s ease;
}

.media-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.demo-replacement {
    grid-column: 1 / -1;
    background: rgba(26, 26, 58, 0.1);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    border-left: 4px solid #1A1A3A;
}

.demo-replacement h3 {
    color: #333;
    margin-bottom: 1rem;
}

.demo-replacement p {
    color: #555;
    margin-bottom: 1rem;
}

.demo-replacement code {
    background: rgba(255, 0, 102, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Album Management Styles */
.add-album-section {
    grid-column: 1 / -1;
    background: rgba(0, 255, 136, 0.1);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid #00FF88;
}

.add-album-section h3 {
    color: #333;
    margin-bottom: 1rem;
}

.album-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.album-form input {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
}

.album-form input:focus {
    outline: none;
    border-color: #00FF88;
    box-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

.album-form button {
    white-space: nowrap;
}

.cover-photo-help {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 136, 255, 0.1);
    border-radius: 8px;
    border-left: 3px solid #0088FF;
}

.cover-photo-help small {
    color: #555;
    line-height: 1.4;
}

.cover-photo-help code {
    background: rgba(26, 26, 58, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.album-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #0088FF 0%, #FF0066 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px 10px 0 0;
}

.album-thumbnail:hover {
    background: linear-gradient(135deg, #FF0066 0%, #00FF88 100%);
    transform: scale(1.02);
}

.album-thumbnail i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.album-thumbnail h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.album-thumbnail p {
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

.race-album .media-item-info {
    position: relative;
}

.remove-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #ff3838;
    transform: translateY(-1px);
}

.google-photos-guide {
    grid-column: 1 / -1;
    background: rgba(0, 136, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    border-left: 4px solid #0088FF;
}

.google-photos-guide h3 {
    color: #333;
    margin-bottom: 1rem;
}

.google-photos-guide ol {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.google-photos-guide ol li {
    margin-bottom: 0.8rem;
}

.workflow-example {
    background: rgba(26, 26, 58, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.workflow-example h4 {
    color: #333;
    margin-bottom: 1rem;
}

.workflow-example p {
    color: #555;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.demo-album {
    opacity: 0.7;
    border: 2px dashed #ccc;
}

.demo-album:hover {
    opacity: 1;
    border: 2px dashed #0088FF;
}

@media (max-width: 768px) {
    .header {
        padding: 1rem 0;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header-auth {
        position: relative;
        top: 0;
        right: 0;
        transform: none;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
    }

    .auth-header-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .nav .container {
        flex-direction: column;
        align-items: center;
    }

    .race-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .table-container {
        overflow-x: auto;
    }

    .section {
        padding: 1rem;
    }

    .sidebar {
        width: 260px;
        left: -260px;
    }

    .hamburger-menu {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
        left: 0.5rem;
    }

    .header-center {
        order: 1;
    }

    .header-auth {
        order: 2;
    }

    .header-center .logo {
        max-height: 60px;
        max-width: 150px;
    }

    .header-center h1 {
        font-size: 1.5rem;
    }

    .header-center p {
        font-size: 0.9rem;
    }
}

/* Locations Section Styles */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.location-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 0, 102, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 0, 102, 0.3);
    color: #1A1A3A;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 0, 102, 0.4);
}

.location-header {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #FF0066 0%, #0088FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.location-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.location-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.location-name-overlay h3 {
    color: #FFFFFF;
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.location-body {
    padding: 1.5rem;
}

.location-info {
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #1A1A3A;
    font-weight: 500;
}

.info-row i {
    color: #00FF88;
    margin-right: 0.8rem;
    width: 20px;
    text-align: center;
}

.price-tag {
    display: inline-block;
    background: #FF0066;
    color: #FFFFFF;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    margin-left: 0.5rem;
}

.schedule-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 0, 102, 0.2);
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #1A1A3A;
}

.schedule-label {
    color: #0088FF;
    font-weight: 600;
}

.location-footer {
    padding: 1rem 1.5rem;
    background: rgba(0, 136, 255, 0.1);
    border-top: 2px solid rgba(0, 136, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: #0088FF;
    text-decoration: none;
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
    color: #FF0066;
    transform: scale(1.2);
}

.exclusive-badge {
    background: linear-gradient(135deg, #00FF88 0%, #0088FF 100%);
    color: #1A1A3A;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 0.5rem;
    display: inline-block;
}

@media (max-width: 768px) {
    .locations-grid {
        grid-template-columns: 1fr;
    }
}
/* Album Cards */
.album-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 136, 255, 0.3);
}

.album-cover {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1A1A3A 0%, #0088FF 50%, #FF0066 100%);
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.album-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.album-info {
    padding: 1rem;
}

.album-info h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.album-race {
    color: #0088FF;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.album-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.album-link {
    color: #FF0066;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.album-link:hover {
    text-decoration: underline;
}

/* Video Cards */
.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 0, 102, 0.3);
}

.video-thumbnail {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
    background: #000;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.video-card:hover .video-play-overlay {
    transform: translate(-50%, -50%) scale(1.2);
}

.video-info {
    padding: 1rem;
}

.video-info h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.video-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.video-info small {
    color: #999;
    font-size: 0.8rem;
}

/* Empty and Loading States */
.empty-state,
.empty-state-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    border: 2px dashed rgba(0, 136, 255, 0.3);
}

.empty-state i,
.empty-state-card i {
    font-size: 4rem;
    color: rgba(0, 136, 255, 0.3);
    display: block;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
}

.loading-state i {
    font-size: 3rem;
    color: #0088FF;
    margin-bottom: 1rem;
}

/* Media Modal */
.media-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.media-modal.active {
    display: flex;
}

.media-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.media-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-modal-header h2 {
    color: #333;
    margin: 0;
}

.media-modal-header p {
    color: #0088FF;
    margin: 0.5rem 0 0 0;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.modal-close-btn:hover {
    color: #FF0066;
}

.media-modal-body {
    padding: 2rem;
}

.media-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.media-item-modal {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.media-item-modal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-item-modal:hover img {
    transform: scale(1.05);
}

.media-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 0.5rem;
    font-size: 0.85rem;
}

.media-modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid #eee;
    text-align: center;
}

/* Video Modal */
.video-modal {
    max-width: 90vw;
    max-height: 90vh;
    background: #000;
}

.video-modal .modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    color: white;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Image Modal */
.image-modal {
    background: transparent;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal img {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-modal .modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-album {
    text-align: center;
    padding: 2rem;
    color: #999;
}

/* Album Modal Sections */
.album-modal {
    max-width: 1400px;
}

.album-section {
    margin-bottom: 2rem;
}

.album-section h3 {
    color: #0088FF;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 136, 255, 0.2);
}

.empty-section {
    text-align: center;
    padding: 2rem;
    color: #999;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    font-style: italic;
}

/* Upload Actions */
.upload-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 136, 255, 0.05), rgba(255, 0, 102, 0.05));
    border-radius: 10px;
}

.upload-btn {
    background: linear-gradient(135deg, #0088FF 0%, #FF0066 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 136, 255, 0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 136, 255, 0.4);
}

/* Upload Modal */
.upload-modal {
    max-width: 600px;
}

.upload-modal .form-group {
    margin-bottom: 1.5rem;
}

.upload-modal .form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-modal .form-group input[type="file"],
.upload-modal .form-group input[type="url"],
.upload-modal .form-group input[type="text"],
.upload-modal .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.upload-modal .form-group input:focus,
.upload-modal .form-group textarea:focus {
    outline: none;
    border-color: #0088FF;
    box-shadow: 0 0 5px rgba(0, 136, 255, 0.3);
}

.upload-modal .form-group textarea {
    resize: vertical;
}

.upload-modal .form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #666;
    font-size: 0.85rem;
}

.upload-submit-btn {
    background: linear-gradient(135deg, #0088FF 0%, #FF0066 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 136, 255, 0.3);
}

.upload-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 136, 255, 0.4);
}

.upload-progress {
    margin: 1rem 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #0088FF 0%, #FF0066 100%);
    width: 0%;
    transition: width 0.3s ease;
}

#photo-progress-text {
    color: #0088FF;
    font-weight: 600;
}

/* File Preview */
.file-preview {
    margin: 1rem 0;
}

.file-preview h4 {
    color: #0088FF;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.8rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 136, 255, 0.05);
    border-radius: 8px;
}

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

.preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

.preview-item img:hover {
    border-color: #0088FF;
    transform: scale(1.05);
}

.preview-item small {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Photos by Race */
.photos-by-race-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.race-photos-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(0, 136, 255, 0.2);
}

.race-photos-header {
    padding: 1.5rem;
    border-bottom: 2px solid rgba(0, 136, 255, 0.2);
}

.race-photos-header.collapsible {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    user-select: none;
}

.race-photos-header.collapsible:hover {
    background: rgba(0, 136, 255, 0.1);
}

.race-photos-header-content {
    flex: 1;
}

.race-photos-toggle {
    font-size: 1.5rem;
    color: #0088FF;
    transition: transform 0.3s ease;
    padding: 0 0.5rem;
}

.race-photos-header h3 {
    color: #0088FF;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.album-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.race-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    max-height: 10000px;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}

.race-photos-grid.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.photo-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: #f0f0f0;
    transition: all 0.3s ease;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 136, 255, 0.3);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 0.5rem;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .race-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Responsive */
@media (max-width: 768px) {
    .album-cover {
        height: 150px;
    }

    .video-thumbnail {
        height: 140px;
    }

    .media-grid-modal {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
