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

body {
    font-family: 'Noto Sans', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2c3e50;
}

header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.rules-card, .setup-card, .loading-card, .complete-card, .gameover-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.rules-card h2, .setup-card h2, .loading-card h2, .complete-card h2, .gameover-card h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.8rem;
}

.rules-card ul {
    list-style: none;
    margin-bottom: 30px;
}

.rules-card li {
    padding: 10px 0;
    font-size: 1.1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

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

.primary-btn:hover {
    background: #2980b9;
}

.secondary-btn {
    background: #95a5a6;
}

.secondary-btn:hover {
    background: #7f8c8d;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.tab-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s;
}

.tab-btn.active {
    background: white;
    color: #3498db;
}

.tab-btn:hover {
    background: #e9ecef;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

details {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

summary {
    padding: 15px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
}

details[open] summary {
    border-bottom: 1px solid #e0e0e0;
}

details > div {
    padding: 15px;
}

.ingredient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ingredient-item:last-child {
    border-bottom: none;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

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

.order-interface, .kitchen-interface {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.customer-message {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-style: italic;
}

.response-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#replyInput {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.order-bag, .order-bag-kitchen {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.meal-prep {
    margin-bottom: 20px;
}

.shift-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.shift-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

#dayStats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.email-item {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

.email-item:last-child {
    border-bottom: none;
}

.kitchen-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.category-selector {
    margin-bottom: 15px;
}

.category-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.category-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

.ingredient-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.ingredient-btn {
    padding: 8px 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.ingredient-btn:hover {
    background: #2980b9;
}

.current-meal-ingredients {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.current-meal-ingredients h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .rules-card, .setup-card, .loading-card, .complete-card, .gameover-card {
        padding: 20px;
    }
    
    .order-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .response-section {
        flex-direction: column;
    }
}