* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #fefefe;
    --bg-secondary: #f7f7f9;
    --surface: #ffffff;
    --surface-hover: #fafafa;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-soft: #fff1e6;
    --border: #e8ecef;
    --shadow: 0 2px 8px rgba(0,0,0,0.02), 0 8px 24px rgba(0,0,0,0.03);
    --shadow-hover: 0 12px 32px rgba(0,0,0,0.08);
    --radius-sm: 16px;
    --radius-md: 20px;
    --radius-lg: 28px;
}

body.dark {
    --bg-primary: #0a0a0c;
    --bg-secondary: #121215;
    --surface: #18181b;
    --surface-hover: #202023;
    --text-primary: #ededef;
    --text-secondary: #9ca3af;
    --accent-soft: #2a1f18;
    --border: #27272a;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-hover: 0 12px 32px rgba(0,0,0,0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s ease;
    line-height: 1.5;
}

/* Welcome Screen */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.welcome-card {
    text-align: center;
    animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-logo {
    width: 120px;
    height: auto;
    margin-bottom: 24px;
    animation: bounce 0.5s ease;
}

.welcome-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.welcome-btn {
    background: var(--accent);
    border: none;
    padding: 14px 32px;
    border-radius: 60px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.welcome-btn:hover {
    background: var(--accent-dark);
    transform: scale(0.96);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    background: var(--accent);
    opacity: 0.04;
    border-radius: 50%;
    filter: blur(40px);
    animation: float 25s infinite ease-in-out;
}

.floating-shape:nth-child(1) { width: 300px; height: 300px; top: -100px; left: -100px; }
.floating-shape:nth-child(2) { width: 400px; height: 400px; bottom: -150px; right: -150px; animation-delay: 5s; animation-duration: 30s; }
.floating-shape:nth-child(3) { width: 200px; height: 200px; top: 40%; left: 70%; animation-delay: 10s; }
.floating-shape:nth-child(4) { width: 250px; height: 250px; bottom: 20%; left: -80px; animation-delay: 15s; }
.floating-shape:nth-child(5) { width: 180px; height: 180px; top: 60%; right: -50px; animation-delay: 8s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(var(--bg-primary-rgb), 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    height: 44px;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.social-icons {
    display: flex;
    gap: 14px;
}

.social-icon {
    color: var(--text-secondary);
    transition: all 0.2s;
}

.social-icon:hover {
    color: var(--accent);
    transform: scale(1.05);
}

.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 80px 20px;
    position: relative;
    z-index: 2;
}

/* Search Bar */
.search-container {
    position: relative;
    margin-bottom: 24px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

body[dir="rtl"] .search-icon {
    left: auto;
    right: 16px;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 60px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.2s;
}

body[dir="rtl"] .search-input {
    padding: 14px 48px 14px 20px;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Categories Tabs */
.categories-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    justify-content: center;
}

.category-tab {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 10px 22px;
    border-radius: 60px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.category-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Menu Card */
.menu-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    cursor: pointer;
    animation: fadeInUp 0.4s ease backwards;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.card-content {
    padding: 14px 16px 18px;
}

.card-name-ar {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-name-en {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* RTL Support */
body[dir="rtl"] .card-content {
    text-align: right;
}

body[dir="ltr"] .card-content {
    text-align: left;
}

/* Mobile */
@media (max-width: 640px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .container {
        padding: 16px 16px 60px 16px;
    }
    
    .card-image {
        height: 150px;
    }
    
    .category-tab {
        padding: 8px 18px;
        font-size: 13px;
    }
    
    .categories-tabs {
        gap: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 4px;
    }
    
    .welcome-logo {
        width: 100px;
    }
    
    .welcome-title {
        font-size: 22px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}