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

:root {
    --primary-color: #FF6B35;
    --secondary-color: #004E89;
    --success-color: #06A77D;
    --danger-color: #E63946;
    --warning-color: #F77F00;
    --background: #F5F5F5;
    --card-bg: #FFFFFF;
    --text-dark: #2B2D42;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #f0f0f0 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1em;
}

/* Control Panel */
.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

/* Input Section */
.input-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

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

.input-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input {
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    transition: all 0.3s ease;
    width: 150px;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    background-color: #fafafa;
}

.input-group input:hover {
    border-color: var(--primary-color);
}

#cookieInput {
    width: 280px;
    letter-spacing: 1px;
}

/* Info Banner */
.info-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    animation: slideIn 0.4s ease-out;
}

.info-icon {
    font-size: 1.2em;
}

.info-text {
    flex: 1;
}

.toggle-section {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 12px;
}

.toggle-checkbox {
    display: none;
}

.toggle-switch {
    width: 60px;
    height: 30px;
    background-color: #ccc;
    border-radius: 15px;
    position: relative;
    transition: background-color 0.3s ease;
    border: 2px solid #999;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-checkbox:checked + .toggle-switch {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.toggle-checkbox:checked + .toggle-switch::after {
    transform: translateX(30px);
}

.toggle-text {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.05em;
}

.status-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.status-stopped {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f0f0f0;
    color: #666;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.status-running {
    background-color: #d4edda !important;
    color: #155724 !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.last-update {
    color: var(--text-light);
    font-size: 0.9em;
}

/* Vendor Info */
.vendor-info {
    margin-bottom: 30px;
}

.vendor-card {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0066b3 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
}

.vendor-card h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 700;
}

.vendor-card p {
    font-size: 1em;
    margin-bottom: 15px;
    opacity: 0.95;
}

.vendor-meta {
    display: flex;
    gap: 30px;
    font-size: 0.95em;
    margin-top: 15px;
}

.vendor-meta span {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
}

/* Menu Section */
.menu-section {
    margin-bottom: 30px;
}

.menu-section h2 {
    font-size: 1.8em;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 700;
}

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

.menu-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.menu-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--background);
}

.menu-item-content {
    padding: 20px;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
    gap: 10px;
}

.menu-item-name {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.menu-item-category {
    font-size: 0.85em;
    color: var(--text-light);
    background-color: var(--background);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
}

.menu-item-description {
    font-size: 0.9em;
    color: var(--text-light);
    margin: 10px 0;
    min-height: 40px;
}

.menu-item-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.detail-box {
    text-align: center;
}

.detail-label {
    font-size: 0.8em;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-dark);
}

.available {
    color: var(--success-color);
}

.low-stock {
    color: var(--warning-color);
}

.out-of-stock {
    color: var(--danger-color);
}

.menu-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: var(--text-light);
}

.price {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-color);
}

.veg-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--success-color);
    border-radius: 3px;
    text-align: center;
    line-height: 16px;
    color: var(--success-color);
    font-weight: bold;
    font-size: 0.7em;
}

.nonveg-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--danger-color);
    border-radius: 3px;
    text-align: center;
    line-height: 16px;
    color: var(--danger-color);
    font-weight: bold;
    font-size: 0.7em;
}

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

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

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

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 1.1em;
}

/* Error Section */
.error-section {
    background-color: #f8d7da;
    border: 2px solid var(--danger-color);
    color: #721c24;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

#errorMessage {
    margin: 0;
}

@keyframes highlight {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(255, 195, 0, 0.3); }
}

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

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .control-panel {
        flex-direction: column;
        gap: 15px;
    }

    .input-section {
        width: 100%;
        justify-content: center;
    }

    .input-group {
        width: 100%;
    }

    .input-group input {
        width: 100%;
    }

    .status-info {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

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

    .vendor-meta {
        flex-direction: column;
        gap: 10px;
    }

    .info-banner {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header {
        padding: 20px 0;
    }

    header h1 {
        font-size: 1.5em;
    }

    .control-panel {
        padding: 20px;
    }

    .vendor-card {
        padding: 20px;
    }

    .vendor-card h2 {
        font-size: 1.4em;
    }

    .menu-item-details {
        grid-template-columns: 1fr;
    }
}
