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

:root {
    /* These will be overridden by JavaScript from config.json */
    --primary-color: #ff4500;
    --primary-dark: #cc3700;
    --primary-light: #ff6b33;
    --bg-color: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --text-color: #ffffff;
    --text-muted: #cccccc;
    --border-color: #444444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    margin-bottom: 30px;
    padding: 20px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    flex-shrink: 0;
}

.logo {
    max-width: 200px;
    max-height: 80px;
    height: auto;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    /* High-quality image rendering for crisp, sharp logo */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: bicubic;
}

.header-text {
    flex: 1;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.search-section {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.search-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

#team-select,
#jersey-input {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    min-width: 200px;
    transition: border-color 0.3s;
}

#team-select:focus,
#jersey-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#jersey-input {
    width: 120px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 69, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.photo-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(255, 69, 0, 0.3);
}

.photo-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.photo-info {
    padding: 15px;
}

.photo-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.photo-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.photo-count {
    text-align: center;
    padding: 10px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    margin-top: 20px;
    color: white;
}

.lightbox-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.btn-download {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-download:hover {
    background: var(--primary-dark);
}

/* Admin Panel */
.admin-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 999;
    min-width: 250px;
}

.admin-panel h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.admin-stats {
    margin-bottom: 15px;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.stat-label {
    color: var(--text-muted);
}

.stat span:last-child {
    color: var(--primary-color);
    font-weight: 600;
}

/* New Photos Notification */
.new-photos-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.4);
    z-index: 1001;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.new-photos-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .logo {
        max-width: 180px;
        max-height: 70px;
    }
    
    header h1 {
        font-size: 2rem;
    }

    .search-controls {
        flex-direction: column;
    }

    #team-select,
    #jersey-input {
        width: 100%;
    }

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

    .photo-card img {
        height: 200px;
    }

    .admin-panel {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }
}

