:root {
    --text-color-main: #ffffff;
    --text-color-secondary: #aaaaaa;
    --text-color-accent: #ff5d5d;
    
    --bg-color-main: #161515;
    --bg-color-secondary: #1a1a1a;
    --bg-color-card: #311919;
    --bg-color-header: rgba(22, 21, 21, 0.95);
    
    --accent-color: #751515;
    --accent-color-hover: #8d0d0d;
    --accent-glow: 0 0 10px rgba(255, 93, 93, 0.3);
    
    --border-radius: 12px;
    --spacing-unit: 1rem;
    
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition-speed: 0.3s;
}

/* Light Mode Overrides (if system requests explicitly, but default is dark) */
@media (prefers-color-scheme: light) {
    /* Kept dark by design as per request "default to dark", 
       but if we wanted real light mode, we'd uncomment this. 
       For now, let's strictly follow the "vigilent" theme vibe.
    */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color-main);
    color: var(--text-color-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    color: var(--text-color-main);
}

.text-accent {
    color: var(--text-color-accent);
}

/* Layout */
.app-container {
    max-width: 800px; /* Mobile-first, but bounded on desktop */
    margin: 0 auto;
    padding-bottom: 80px; /* Space for footer/branding */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-color-header);
    backdrop-filter: blur(10px);
    padding: var(--spacing-unit);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform var(--transition-speed);
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.controls {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-color-main);
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--transition-speed);
}

.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.header-logo {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Hero Section */
.venue-hero {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: var(--bg-color-secondary);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.venue-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), var(--bg-color-main));
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.8s ease-out;
}

.hero-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--bg-color-main);
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    background-color: var(--bg-color-main);
}

/* Search Bar */
.search-container {
    padding: var(--spacing-unit);
    background-color: var(--bg-color-main);
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background-color: var(--bg-color-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-color-main);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-speed);
}

.search-input:focus {
    border-color: var(--text-color-accent);
    box-shadow: 0 0 0 2px rgba(255, 93, 93, 0.2);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color-secondary);
}

/* Level Selection (Splash) */
.level-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color-main);
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 1;
    transition: opacity var(--transition-speed);
}

.level-selector.hidden {
    opacity: 0;
    pointer-events: none;
}

.level-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
    margin-top: 2rem;
}

.level-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--bg-color-card));
    border: 1px solid rgba(255, 93, 93, 0.3);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.level-btn:active {
    transform: scale(0.98);
}

/* Menu List */
.menu-content {
    padding: 0 var(--spacing-unit);
}

.category-section {
    margin-bottom: 2rem;
}

.category-title {
    position: sticky;
    top: 70px; /* Adjust based on header height */
    background-color: var(--bg-color-main);
    padding: 0.5rem 0;
    z-index: 90;
    border-bottom: 1px solid var(--text-color-accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--text-color-accent);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    gap: 1rem;
}

@media (min-width: 600px) {
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

.item-card {
    background-color: var(--bg-color-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    flex-direction: row;
    height: 120px;
}

.item-card.has-image .item-info {
    width: 65%;
}

.item-card.unavailable {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.item-card.no-image .item-info {
    width: 100%;
}

.item-image {
    width: 35%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-color-secondary);
}

.item-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.item-header {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.item-header h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-desc-preview {
    font-size: 0.8rem;
    color: var(--text-color-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 0.5rem;
    gap: 0.5rem;
    flex-shrink: 0;
}

.price-tag {
    font-weight: 700;
    color: var(--text-color-accent);
    font-size: 1.1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.promo-tag {
    background-color: var(--text-color-accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.gramaj-tag {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-color-secondary);
    margin-left: 0.4rem;
}

.gramaj-detail {
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    margin-bottom: 0.5rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Slides up from bottom on mobile */
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-color-secondary);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform var(--transition-speed) cubic-bezier(0.1, 0.7, 0.1, 1);
    position: relative;
    padding-bottom: 2rem;
}

@media (min-width: 600px) {
    .modal-overlay {
        align-items: center;
    }
    .modal-content {
        border-radius: 20px;
        transform: translateY(20px);
        opacity: 0;
        height: auto;
    }
    .modal-overlay.active .modal-content {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-image {
    width: 100%;
    height: 250px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-color-secondary);
}

.modal-body {
    padding: 1.5rem;
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
}

.detail-row {
    margin-bottom: 1rem;
}

.detail-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-color-secondary);
    margin-bottom: 0.25rem;
}

.allergens-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.allergen-chip {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Loading */
.loader-container {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: var(--bg-color-main);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}
.loader-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--text-color-accent);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

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

.lang-switch {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-color-main);
    cursor: pointer;
    padding: 0.5rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    margin-right: 0.5rem;
}

/* Footer */
.app-footer {
    margin-top: 2rem;
    background-color: var(--bg-color-secondary);
    padding: 2rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-promo {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-promo p {
    font-size: 1.1rem;
    color: var(--text-color-main);
    margin-bottom: 1rem;
    font-weight: 600;
}

.app-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-color-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.app-store-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-color-secondary);
}

.footer-logo {
    height: 50px;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-info a {
    color: var(--text-color-accent);
    text-decoration: none;
    font-weight: 600;
}

.footer-info a:hover {
    text-decoration: underline;
}

.text-xs { font-size: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
