@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lobster', cursive;
    background: #1a1a2e;
    color: #fff;
    transition: all 0.3s ease;
    min-height: 100vh;
}

body.day-mode {
    background: #ffffff;
    color: #000000;
}

body.night-mode {
    background: #000000;
    color: #ffffff;
}

/* هدر */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.coffee-logo {
    font-size: 3rem;
    animation: coffeePour 3s infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

@keyframes coffeePour {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

.logo-text {
    font-size: 2.5rem;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
    background: linear-gradient(45deg, #ffd700, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.theme-btn, .admin-btn, .cart-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Lobster', cursive;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.theme-btn:hover, .admin-btn:hover, .cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* دسته‌بندی‌ها */
.categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
    padding: 0 20px;
}

.category {
    padding: 12px 25px;
    border: 2px solid #f8f8f8;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-size: 1.1rem;
}

.category:hover, .category.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* باکس جستجو */
.search-panel {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 0 20px;
}

.search-panel input {
    padding: 15px 20px;
    border: 2px solid #f8f8f8;
    border-radius: 25px 0 0 25px;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: inherit;
    font-family: 'Lobster', cursive;
    font-size: 1.1rem;
    width: 300px;
    transition: all 0.3s ease;
}

.search-panel input:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.2);
}

.search-panel button {
    padding: 15px 30px;
    border: 2px solid #f8f8f8;
    border-left: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-family: 'Lobster', cursive;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-panel button:hover {
    transform: translateX(3px);
}

/* منوی آیتم‌ها */
.menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 30px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.item {
    width: 280px;
    padding: 25px;
    border: 3px solid #f8f8f8;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.item:hover {
    transform: translateY(-10px) scale(1.02);
    border: 3px solid transparent;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1), rgba(69, 183, 209, 0.1), rgba(150, 206, 180, 0.1), rgba(255, 234, 167, 0.1));
    background-clip: padding-box;
    box-shadow: 
        0 0 20px rgba(255, 0, 0, 0.5),
        0 0 40px rgba(0, 255, 0, 0.3),
        0 0 60px rgba(0, 0, 255, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.3);
}

.item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.item:hover img {
    transform: scale(1.05);
}

.item h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: inherit;
}

.item p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: inherit;
    opacity: 0.9;
}

.item button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-family: 'Lobster', cursive;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.item button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* پنل ادمین */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.admin-content {
    background: rgba(26, 26, 46, 0.95);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #f8f8f8;
    backdrop-filter: blur(10px);
}

.day-mode .admin-content {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
}

.night-mode .admin-content {
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
}

.close-btn {
    float: left;
    background: #ff6b6b;
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Lobster', cursive;
    margin-bottom: 20px;
}

.admin-content h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 2rem;
    background: linear-gradient(45deg, #ffd700, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#loginSection {
    text-align: center;
}

#loginSection input {
    padding: 12px 15px;
    border: 2px solid #f8f8f8;
    border-radius: 10px;
    margin: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-family: 'Lobster', cursive;
    font-size: 1rem;
}

#loginSection button, #adminPanel button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-family: 'Lobster', cursive;
    font-size: 1rem;
    margin: 5px;
    transition: all 0.3s ease;
}

#loginSection button:hover, #adminPanel button:hover {
    transform: translateY(-2px);
}

#adminPanel input, #adminPanel select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid #f8f8f8;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-family: 'Lobster', cursive;
    font-size: 1rem;
}

.admin-item {
    border: 2px solid #f8f8f8;
    margin: 15px 0;
    padding: 15px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
}

.admin-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}

.admin-item-info {
    flex-grow: 1;
    margin: 0 15px;
}

.admin-item-actions {
    display: flex;
    gap: 10px;
}

#preview img {
    width: 100px;
    margin-top: 10px;
    border-radius: 10px;
}

/* سبد خرید */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-left: 3px solid #f8f8f8;
}

.day-mode .cart-modal {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
}

.night-mode .cart-modal {
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
}

.cart-content {
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cart-content h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

#cartBackBtn {
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Lobster', cursive;
    font-size: 1.1rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

#cartBackBtn:hover {
    transform: translateY(-2px);
}

#cartItems {
    flex-grow: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 15px;
    border-bottom: 1px solid rgba(248, 248, 248, 0.3);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    transform: translateX(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.cart-item button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Lobster', cursive;
    transition: all 0.3s ease;
}

.cart-item button:hover {
    transform: scale(1.1);
    background: #ff5252;
}

.total-price {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
}

.no-items {
    text-align: center;
    font-size: 1.5rem;
    padding: 50px;
    color: inherit;
    opacity: 0.7;
}

/* رسپانسیو */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .categories {
        gap: 10px;
    }
    
    .category {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .item {
        width: 100%;
        max-width: 300px;
    }
    
    .cart-modal {
        width: 100%;
    }
    
    .search-panel input {
        width: 200px;
    }
    
    .admin-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .admin-item-actions {
        justify-content: center;
    }
}