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

body {
    font-family: 'Segoe UI', 'Tahoma', 'Geneva', 'Verdana', sans-serif, 'Vazirmatn', 'IRANSans';
    min-height: 100vh;
    overflow-x: hidden;
    background: #000000;
    direction: rtl;
    text-align: right;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%, #000000 100%);
    z-index: -2;
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23f5f5dc" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    z-index: -1;
}

.glass-header {
    background: rgba(245, 245, 220, 0.1);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(245, 245, 220, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin: 0;
}

.header-nav {
    display: flex;
    align-items: center;
    flex: 1;
    margin-right: 2rem;
}

.category-slider {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.slider-track {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0;
    direction: rtl;
}

.slider-track::-webkit-scrollbar {
    height: 4px;
}

.slider-btn {
    background: rgba(245, 245, 220, 0.15);
    border: 1px solid rgba(245, 245, 220, 0.3);
    color: #f5f5dc;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: rgba(245, 245, 220, 0.25);
    transform: translateY(-2px);
}

.logo-container {
    display: flex;
    align-items: center;
}

.category-tabs {
    background: rgba(245, 245, 220, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(245, 245, 220, 0.15);
    border-radius: 15px;
    padding: 1rem;
    margin: 2rem 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    direction: ltr;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 245, 220, 0.3) transparent;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.category-tabs::-webkit-scrollbar {
    height: 4px;
    background: rgba(245, 245, 220, 0.1);
}

.category-tabs::-webkit-scrollbar-track {
    background: rgba(245, 245, 220, 0.1);
}

.category-tabs::-webkit-scrollbar-thumb {
    background: rgba(245, 245, 220, 0.4);
    border-radius: 2px;
}

.tab-btn {
    background: rgba(245, 245, 220, 0.12);
    border: 1px solid rgba(245, 245, 220, 0.25);
    color: #f5f5dc;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 70px;
    height: 70px;
    position: relative;
    overflow: hidden;
}

.tab-btn .category-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.tab-btn .category-text {
    font-size: 0.7rem;
    line-height: 1.1;
}

.tab-btn:hover {
    background: rgba(245, 245, 220, 0.25);
    transform: translateY(-2px);
    color: #ffffff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.tab-btn.active {
    background: rgba(245, 245, 220, 0.3);
    transform: translateY(-2px);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    border-color: rgba(245, 245, 220, 0.5);
}

.tab-btn.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(245, 245, 220, 0.1), rgba(245, 245, 220, 0.05));
    border-radius: 22px;
    z-index: -1;
}

.admin-nav-btn {
    background: rgba(245, 245, 220, 0.15);
    border: 1px solid rgba(245, 245, 220, 0.3);
    color: #f5f5dc;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
}

.admin-nav-btn:hover {
    background: rgba(245, 245, 220, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.header-content h1 {
    color: #f5f5dc;
    font-size: 2rem;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.admin-btn {
    background: rgba(245, 245, 220, 0.15);
    border: 1px solid rgba(245, 245, 220, 0.3);
    color: #f5f5dc;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.admin-btn:hover {
    background: rgba(245, 245, 220, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

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

.glass-tabs {
    background: rgba(245, 245, 220, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(245, 245, 220, 0.15);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 2rem;
    display: none; /* Hidden by default, shown with category-slider */
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    direction: ltr;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 245, 220, 0.3) transparent;
    padding: 0.5rem 0;
}

/* Desktop: Show all tabs normally */
@media (min-width: 769px) {
    .glass-tabs {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
    }
}

/* Mobile: Show slider on mobile */
@media (max-width: 768px) {
    .glass-tabs {
        display: none; /* Hidden, slider shown instead */
    }
    
    .category-slider {
        display: flex;
    }
}

.tab-btn {
    background: rgba(245, 245, 220, 0.12);
    border: 1px solid rgba(245, 245, 220, 0.25);
    color: #f5f5dc;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 60px;
    height: 65px;
    scroll-snap-align: start;
}

.tab-btn[data-category="all"] {
    justify-content: center;
}

.tab-btn:hover,
.tab-btn.active {
    background: rgba(245, 245, 220, 0.2);
    transform: translateY(-1px);
    color: #ffffff;
}

.tab-btn:hover,
.tab-btn.active {
    background: rgba(245, 245, 220, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

.category-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.category-text {
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
}

.tab-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
}

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

.menu-item {
    background: rgba(245, 245, 220, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(245, 245, 220, 0.2);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    color: #f5f5dc;
    position: relative;
    overflow: hidden;
}

.menu-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
    background: rgba(245, 245, 220, 0.18);
    border-color: rgba(245, 245, 220, 0.3);
}

.menu-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.menu-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #f5f5dc;
}

.price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #22c55e;
    margin-bottom: 0.5rem;
}

.description {
    font-size: 0.9rem;
    color: rgba(245, 245, 220, 0.8);
    line-height: 1.4;
}

.no-items {
    text-align: center;
    padding: 3rem;
    color: #f5f5dc;
    font-size: 1.1rem;
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: #f5f5dc;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(245, 245, 220, 0.2);
    border-top: 3px solid #f5f5dc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.menu-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    color: #ffffff;
}

.menu-item .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f5f5dc;
    margin-bottom: 0.5rem;
}

.menu-item .description {
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(245, 245, 220, 0.8);
}

.admin-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-section.hidden {
    display: none;
}

.glass-panel {
    background: rgba(245, 245, 220, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(245, 245, 220, 0.2);
    border-radius: 15px;
    padding: 2rem;
    color: #f5f5dc;
}

.glass-panel h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #ffffff;
}

.glass-form {
    background: rgba(245, 245, 220, 0.06);
    border: 1px solid rgba(245, 245, 220, 0.15);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.glass-form h3 {
    margin-bottom: 1rem;
    color: #f5f5dc;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(224, 224, 224, 0.9);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    background: rgba(30, 30, 45, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(100, 100, 120, 0.8);
    background: rgba(40, 40, 60, 0.7);
}

.submit-btn {
    background: rgba(34, 197, 94, 0.3);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #f0f0f0;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 100%;
}

.submit-btn:hover {
    background: rgba(34, 197, 94, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.admin-categories {
    margin-bottom: 2rem;
}

.admin-categories h3 {
    margin-bottom: 1rem;
    color: #f0f0f0;
}

.admin-categories-list {
    max-height: 300px;
    overflow-y: auto;
}

.admin-category-card {
    background: rgba(25, 25, 40, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
}

.admin-category-info {
    flex: 1;
}

.category-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.category-icon-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.category-icon-emoji {
    font-size: 1.5rem;
    line-height: 1;
}

.admin-category-info h4 {
    color: #f0f0f0;
    margin: 0;
}

.admin-category-info p {
    color: rgba(224, 224, 224, 0.7);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.admin-items h3 {
    margin-bottom: 1rem;
    color: #f0f0f0;
}

.admin-items-list {
    max-height: 400px;
    overflow-y: auto;
}

.admin-item-card {
    background: rgba(25, 25, 40, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
}

.admin-item-info {
    flex: 1;
}

.admin-item-info h4 {
    color: #f0f0f0;
    margin-bottom: 0.25rem;
}

.admin-item-info p {
    color: rgba(224, 224, 224, 0.7);
    font-size: 0.8rem;
}

.delete-btn {
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.6);
}

.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    width: 100%;
    max-width: 520px;
}

@media (max-width: 768px) {
    .glass-header {
        padding: 0.5rem 0;
    }
    
    .header-content {
        padding: 0 1rem;
        min-height: 70px;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo-container {
        width: 100%;
        justify-content: center;
    }
    
    .header-nav {
        width: 100%;
        margin-right: 0;
    }
    
    .logo {
        width: 35px;
        height: 35px;
    }
    
    .nav-tab-btn {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
        min-width: 45px;
        height: 50px;
        gap: 0.1rem;
    }
    
    .nav-tab-btn .category-icon {
        font-size: 1rem;
    }
    
    .nav-tab-btn .category-text {
        font-size: 0.6rem;
    }
    
    .menu-section,
    .admin-section {
        padding: 1rem;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-nav-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}
