/* Color Palette:
   #948979 - Light Brown/Beige (برای اکسنت‌ها و دکمه‌ها)
   #DFD0B8 - Cream/Light Beige (برای متن‌های اصلی و هایلایت‌ها)
   #393E46 - Dark Gray (برای پس‌زمینه کارت‌ها و پنل‌ها)
   #222831 - Very Dark Gray (برای پس‌زمینه اصلی)
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #222831 0%, #393E46 100%);
    color: #DFD0B8;
    min-height: 100vh;
    line-height: 1.6;
    padding: 20px;
    margin: 0;
    box-sizing: border-box;
}

.main-container{
    display : flex;
    flex-direction : row;
    flex-basis : 20;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(57, 62, 70, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 137, 121, 0.3);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.header2 {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(57, 62, 70, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 137, 121, 0.3);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display : flex;
    flex-basis: 30%;
    justify-content : space-around;
    flex-direction : column;
    position : static;
    height : 250px;
}

.logo {
    font-size: 2.5em;
    font-weight: bold;
    color: #948979;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tagline {
    font-size: 1.1em;
    color: #DFD0B8;
    opacity: 0.9;
}

/* Navigation */
.nav-tabs {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* فایرفاکس */
    -ms-overflow-style: none; /* اینترنت اکسپلورر */
    margin-bottom: 24px;
}
.nav-tabs::-webkit-scrollbar {
    display: none; /* کروم و سفاری */
}

.nav-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    background: rgba(148, 137, 121, 0.2);
    border: 2px solid rgba(148, 137, 121, 0.4);
    color: #948979;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    backdrop-filter: blur(10px);
    text-decoration : none;
}

.nav-tab-admin {
    background: rgba(148, 137, 121, 0.2);
    border: 2px solid rgba(148, 137, 121, 0.4);
    color: #948979;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    backdrop-filter: blur(10px);
    text-decoration: none;
    margin-top : 10px;
    align-items : center;
    justify-content : center;
    position : static;
}

    .nav-tab:hover, .nav-tab.active {
        background: #948979;
        color: #222831;
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(148, 137, 121, 0.5);
    }

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.menu-item {
    background: rgba(57, 62, 70, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(148, 137, 121, 0.2);
    border-radius: 20px;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .menu-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #948979, #DFD0B8);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .menu-item:hover::before {
        transform: scaleX(1);
    }

    .menu-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
        background: rgba(57, 62, 70, 0.95);
        border-color: rgba(148, 137, 121, 0.4);
    }

/* Menu Item Image */
.menu-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    transition: transform 0.3s ease;
}

.menu-item:hover .menu-item-image {
    transform: scale(1.05);
}

.menu-item-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.menu-item-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(148, 137, 121, 0.2), rgba(223, 208, 184, 0.1));
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: rgba(148, 137, 121, 0.5);
    transition: all 0.3s ease;
}

.menu-item:hover .menu-item-placeholder {
    background: linear-gradient(135deg, rgba(148, 137, 121, 0.3), rgba(223, 208, 184, 0.2));
    color: rgba(148, 137, 121, 0.7);
}

.item-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #948979;
    margin-bottom: 10px;
}

.item-description {
    color: #DFD0B8;
    margin-bottom: 15px;
    font-size: 0.95em;
    opacity: 0.9;
}

.item-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #DFD0B8;
    text-align: left;
    background: rgba(148, 137, 121, 0.2);
    padding: 8px 12px;
    border-radius: 10px;
    display: inline-block;
    margin-top: auto;
    align-self: flex-start;
}

/* Admin Panel */
.admin-panel {
    display: none;
    background: rgba(57, 62, 70, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 137, 121, 0.3);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.admin-header {
    text-align: center;
    margin-bottom: 30px;
    color: #948979;
    font-size: 1.5em;
    font-weight: bold;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: #948979;
        font-weight: bold;
    }

    .form-group input, .form-group select, .form-group textarea {
        width: 100%;
        padding: 12px 15px;
        background: rgba(34, 40, 49, 0.8);
        border: 1px solid rgba(148, 137, 121, 0.3);
        border-radius: 10px;
        color: #DFD0B8;
        font-size: 16px;
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
    }

        .form-group input::placeholder,
        .form-group textarea::placeholder {
            color: rgba(223, 208, 184, 0.6);
        }

        .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
            outline: none;
            border-color: #948979;
            box-shadow: 0 0 10px rgba(148, 137, 121, 0.4);
            background: rgba(34, 40, 49, 0.9);
        }

.btn {
    background: linear-gradient(45deg, #948979, #DFD0B8);
    color: #222831;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    margin: 5px;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(148, 137, 121, 0.5);
        background: linear-gradient(45deg, #DFD0B8, #948979);
    }

.btn-danger {
    background: linear-gradient(45deg, #ff4757, #ff3838);
    color: white;
}

    .btn-danger:hover {
        box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
    }

/* Admin Toggle */
.admin-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(148, 137, 121, 0.9);
    color: #222831;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    font-size: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

    .admin-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(148, 137, 121, 0.6);
        background: #948979;
    }

/* Loading Animation */
.loading {
    text-align: center;
    color: #948979;
    font-size: 18px;
    margin: 40px 0;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(148, 137, 121, 0.3);
    border-radius: 50%;
    border-top-color: #948979;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.success-message {
    background: rgba(148, 137, 121, 0.2);
    border: 1px solid rgba(148, 137, 121, 0.5);
    color: #DFD0B8;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .logo {
        font-size: 2em;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .nav-tabs {
        gap: 5px;
    }

    .nav-tab {
        padding: 10px 20px;
        font-size: 14px;
    }

    .menu-item {
        padding: 0;
    }

    .menu-item-content {
        padding: 20px;
    }

    .menu-item-image,
    .menu-item-placeholder {
        height: 180px;
    }

    .admin-panel {
        padding: 20px;
        margin: 20px 10px;
    }

    .admin-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .form-group input, .form-group select, .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px;
        margin-bottom: 30px;
    }

    .logo {
        font-size: 1.8em;
    }

    .tagline {
        font-size: 1em;
    }

    .menu-item-content {
        padding: 15px;
    }

    .menu-item-image,
    .menu-item-placeholder {
        height: 160px;
    }

    .item-name {
        font-size: 1.2em;
    }
}
