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

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: white;
    min-height: 100vh;
    color: #333;
    display: flex;
    flex-direction: column;
}


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

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 2rem;
    color: #f6782c;
    font-weight: bold;
    margin: 0;
}

.logo-link {
    text-decoration: none;
    color: #f6782c;
    transition: opacity 0.3s;
}

.logo-link:hover {
    opacity: 0.8;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stats-link {
    padding: 8px 16px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
    background: white;
    cursor: pointer;
    font-family: inherit;
}

.stats-link:hover {
    color: #f6782c;
    border-color: #f6782c;
    background: rgba(246, 120, 44, 0.05);
}

.admin-link {
    display: none;
    padding: 8px 16px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
}

.admin-link:hover {
    color: #f6782c;
    border-color: #f6782c;
    background: rgba(246, 120, 44, 0.05);
}

.language-switcher {
    display: flex;
    gap: 10px;
}

.language-switcher select {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.language-switcher select:hover {
    border-color: #f6782c;
    color: #f6782c;
}

.language-switcher select:focus {
    outline: none;
    border-color: #f6782c;
    box-shadow: 0 0 0 3px rgba(246, 120, 44, 0.1);
}

main {
    padding: 40px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

/* Override for admin pages - more specific selector */
main:has(.admin-container) {
    justify-content: flex-start;
    align-items: stretch;
    padding: 20px;
}

/* Override for game page with countdown banner */
main:has(.countdown-banner) {
    padding-top: 50px;
}

.flash-messages {
    max-width: 800px;
    margin: 0 auto 20px;
}

.flash {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    text-align: center;
    color: #666;
    margin-top: auto;
}

/* Admin styles */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.admin-header h2 {
    color: #333;
}

.btn {
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: #f6782c;
    color: white;
}

.btn-primary:hover {
    background: #e5671b;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-edit {
    background: #28a745;
    color: white;
}

.btn-edit:hover {
    background: #218838;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.stats-bar {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.stat {
    display: flex;
    gap: 10px;
}

.stat-label {
    font-weight: bold;
    color: #666;
}

.stat-value {
    color: #f6782c;
    font-weight: bold;
}

.filter-bar {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-bar label {
    font-weight: bold;
}

.filter-bar select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.products-table th {
    background: #f6782c;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.products-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.products-table tr:hover {
    background: #f8f9fa;
}

.nutri-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
    color: white;
}

.nutri-a { background: #28a745; color: white; }
.nutri-b { background: #5cb85c; color: white; }
.nutri-c { background: #ffc107; color: #333; }
.nutri-d { background: #fd7e14; color: white; }
.nutri-e { background: #dc3545; color: white; }

.green-score {
    font-weight: bold;
    color: #28a745;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-used {
    background: #d4edda;
    color: #155724;
}

.status-not-used {
    background: #fff3cd;
    color: #856404;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.warning-message {
    background: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .hamburger-menu {
        display: flex;
    }

    .header-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        gap: 15px;
    }

    .header-nav.active {
        transform: translateX(0);
    }

    .stats-link,
    .admin-link {
        font-size: 14px;
        padding: 12px 16px;
        width: 100%;
        text-align: center;
    }

    .language-switcher {
        width: 100%;
    }

    .language-switcher select {
        font-size: 14px;
        padding: 12px 16px;
        padding-right: 40px;
        width: 100%;
    }

    main {
        padding: 20px 10px;
    }

    .container {
        padding: 0 15px;
    }

    .game-container {
        margin: 0;
    }

    /* Override for game page with countdown banner */
    main:has(.countdown-banner) {
        padding-top: 40px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 15px 0;
    }

    header h1 {
        font-size: 1.3rem;
    }

    .header-nav {
        top: 60px;
        padding: 15px;
    }

    .stats-link,
    .admin-link {
        font-size: 13px;
        padding: 10px 12px;
    }

    .language-switcher select {
        font-size: 13px;
        padding: 10px 12px;
        padding-right: 40px;
    }

    main {
        padding: 15px 8px;
    }

    .container {
        padding: 0 10px;
    }

    footer {
        padding: 15px 0;
        font-size: 0.9rem;
    }

    /* Override for game page with countdown banner */
    main:has(.countdown-banner) {
        padding-top: 35px;
    }
}
