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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-back {
    background: #f0f0f0;
    color: #333;
    margin-bottom: 20px;
}

.btn-back:hover {
    background: #e0e0e0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card h3 {
    padding: 15px 15px 10px;
    color: #333;
    font-size: 1.2em;
}

.card p {
    padding: 0 15px;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.card-footer {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.price {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
}

.customizable {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
}

.menu-item {
    position: relative;
}

.restaurant-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.restaurant-header h2 {
    color: white;
    margin-bottom: 5px;
}

.restaurant-header p {
    color: rgba(255,255,255,0.9);
}

.cart-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1.2em;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.cart-float:hover {
    transform: scale(1.05);
}

#cart-count {
    background: white;
    color: #667eea;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 10px;
}

.cart-item h4 {
    color: #333;
    margin-bottom: 5px;
}

.cart-choices {
    list-style: none;
    padding-left: 0;
    margin-top: 5px;
}

.cart-choices li {
    color: #666;
    font-size: 0.9em;
    padding: 2px 0;
}

.cart-item-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-remove {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-remove:hover {
    background: #cc0000;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 1.1em;
}

.total-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: right;
}

.total-section h3 {
    color: #333;
    font-size: 1.5em;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 16px;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

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

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2em;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.choices-section {
    margin: 20px 0;
}

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

.choice-group h4 {
    color: #333;
    margin-bottom: 5px;
}

.required {
    color: #ff4444;
}

.choice-info {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.choice-option {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.choice-option:hover {
    background: #f0f0f0;
}

.choice-option input {
    margin-right: 10px;
    width: auto;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message h2 {
    color: #28a745;
    margin-bottom: 30px;
}

.order-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.order-info p {
    margin: 10px 0;
    color: #333;
}

.order-info strong {
    color: #667eea;
}

.order-info a {
    display: inline-block;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .cart-float {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
}
