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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f3f0 0%, #e8e2db 100%);
    color: #333;
    line-height: 1.6;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: white;
}

.logo-animation {
    font-size: 4rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b6b;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #ff6b6b;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 2rem;
}

/* Header */
.header {
    text-align: center;
    padding: 3rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.header h1 {
    font-size: 3rem;
    color: #333;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
}

/* Menu Section */
.menu-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* Dish Cards */
.dish-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.dish-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.dish-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.dish-info {
    padding: 1.5rem;
    text-align: center;
}

.dish-info h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.ar-button {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ar-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1;
    cursor: pointer;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #ff6b6b;
}

.modal-body {
    padding: 2rem;
}

.dish-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.modal-dish-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
}

.dish-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.dish-text p {
    margin-bottom: 1rem;
    color: #666;
    line-height: 1.6;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b6b;
}

.qr-code {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 10px;
}

.qr-code span {
    font-size: 0.9rem;
    color: #666;
}

.ar-viewer {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
}

.webar-fallback {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.webar-fallback:hover {
    transform: scale(1.05);
}

/* WebAR Button Responsive */
@media (max-width: 480px) {
    .webar-fallback {
        bottom: 3px;
        right: 3px;
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .webar-fallback {
        bottom: 5px;
        right: 5px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    margin-top: 3rem;
}

.footer a {
    color: #ff6b6b;
    text-decoration: none;
}

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

/* Mobile First Responsive Design */

/* Extra Small Devices (320px and up) */
@media (min-width: 320px) {
    .nav-container {
        padding: 0 0.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-logo {
        font-size: 1rem;
        text-align: center;
    }
    
    .nav-menu {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.8rem;
    }
    
    .header {
        padding: 1rem 0.5rem;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .dish-card {
        margin: 0;
    }
    
    .dish-info h3 {
        font-size: 1rem;
    }
    
    .ar-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .modal-content {
        width: 98%;
        margin: 1% auto;
        max-height: 98vh;
    }
    
    .modal-body {
        padding: 0.5rem;
    }
    
    .dish-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .close {
        right: 5px;
        top: 5px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    
    .qr-code {
        flex-direction: column;
        text-align: center;
        gap: 0.3rem;
        padding: 0.5rem;
    }
}

/* Small Devices (480px and up) */
@media (min-width: 480px) {
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        font-size: 0.9rem;
        gap: 1rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .menu-grid {
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .dish-info h3 {
        font-size: 1.1rem;
    }
    
    .ar-button {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 2.5% auto;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .close {
        right: 10px;
        top: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

/* Medium Devices (768px and up) */
@media (min-width: 768px) {
    .nav-container {
        flex-direction: row;
        padding: 0 1rem;
        gap: 2rem;
    }
    
    .nav-logo {
        font-size: 1.5rem;
        text-align: left;
    }
    
    .nav-menu {
        font-size: 1rem;
        gap: 2rem;
    }
    
    .header {
        padding: 2rem 1rem;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .logo {
        font-size: 3.5rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .dish-details {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .modal-content {
        width: 90%;
        margin: 5% auto;
    }
}

/* Large Devices (1024px and up) */
@media (min-width: 1024px) {
    .header h1 {
        font-size: 3rem;
    }
    
    .logo {
        font-size: 4rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-content {
        width: 80%;
        max-width: 900px;
    }
}

/* Extra Large Devices (1200px and up) */
@media (min-width: 1200px) {
    .nav-container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .main-content {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
        margin: 0 auto;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .dish-image {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Hide loading screen after page loads */
.loaded #loading-screen {
    opacity: 0;
    pointer-events: none;
}