:root {
    --primary: #4a89dc;
    --secondary: #3b7dd8;
    --accent: #5d9cec;
    --light: #f5f7fa;
    --dark: #2c3e50;
}

/* 左侧分类导航美化 - 增强版 */
.category-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 90px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow-y: auto;
    padding-top: 20px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-item {
    padding: 15px 5px;
    margin: 8px 10px;
    text-align: center;
    font-size: 14px;
    color: #555;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    word-break: break-word;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(74, 137, 220, 0.3);
    transform: translateY(-3px);
}

.nav-item.active::before {
    transform: scaleY(1);
    background: white;
}

.nav-item.active:hover {
    color: white;
    transform: translateY(-3px) scale(1.02);
}

/* 滚动条美化 */
.category-nav::-webkit-scrollbar {
    width: 4px;
}

.category-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.category-nav::-webkit-scrollbar-thumb {
    background: rgba(74, 137, 220, 0.3);
    border-radius: 4px;
}

.category-nav::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--light);
    color: var(--dark);
    font-family: 'ZCOOL QingKe HuangYou', sans-serif;
    padding-bottom: 90px;
    overflow-x: hidden;
}

.container {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.content-area {
    flex: 1;
    margin-left: 90px;
    padding: 20px;
    max-width: calc(100% - 90px);
}

/* 头部样式 */
header {
    text-align: center;
    padding: 15px 0;
    margin-bottom: 20px;
    position: relative;
    animation: fadeInDown 0.8s;
}

h1 {
    font-size: 28px;
    color: var(--accent);
    font-family: 'Ma Shan Zheng', cursive;
    font-weight: normal;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    color: #6a8fd8;
    margin-bottom: 10px;
}

.heart {
    color: var(--accent);
    animation: heartbeat 1.5s infinite;
    display: inline-block;
}

/* 菜单分类样式 */
.menu-category {
    margin-bottom: 25px;
    scroll-margin-top: 100px;
}

.category-title {
    font-size: 20px;
    color: var(--primary);
    padding: 10px 20px;
    margin-bottom: 20px;
    background: linear-gradient(to right, rgba(74, 137, 220, 0.1), rgba(74, 137, 220, 0.2));
    border-radius: 20px;
    display: inline-block;
    font-family: 'Ma Shan Zheng', cursive;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* 菜单项样式 */
.menu-item {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(74, 137, 220, 0.1);
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(74, 137, 220, 0.15);
    border-color: rgba(74, 137, 220, 0.3);
}

.menu-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 137, 220, 0.05) 0%, rgba(74, 137, 220, 0) 100%);
    z-index: 0;
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    z-index: 1;
}

.menu-item:hover .item-image {
    transform: scale(1.05);
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
}

.item-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 17px;
    color: var(--dark);
}

.item-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    line-height: 1.4;
}

.item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    color: var(--accent);
    font-size: 17px;
    font-weight: bold;
}

.item-controls {
    display: flex;
    align-items: center;
}

.quantity {
    margin: 0 10px;
    min-width: 20px;
    text-align: center;
    font-weight: bold;
    color: var(--accent);
}

/* 按钮样式 */
button.control-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(74, 137, 220, 0.2);
    z-index: 2;
}

button.control-btn:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

button.control-btn:active {
    transform: scale(0.95);
}

/* 购物车样式 */
.cart {
    position: fixed;
    bottom: 0;
    left: 90px;
    right: 0;
    background: white;
    padding: 15px 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transform: translateY(0);
    transition: transform 0.3s;
}

.cart.hidden {
    transform: translateY(100%);
}

.cart-info {
    display: flex;
    flex-direction: column;
}

.cart-count {
    font-size: 14px;
    color: #666;
}

.cart-total {
    font-weight: bold;
    font-size: 18px;
    color: var(--accent);
}

.checkout-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(74, 137, 220, 0.2);
    position: relative;
    overflow: hidden;
}

.checkout-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.2);
    transform: rotate(30deg);
    transition: all 0.3s;
}

.checkout-btn:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(74, 137, 220, 0.3);
}

.checkout-btn:hover::after {
    left: 100%;
}

.checkout-btn:active {
    transform: translateY(0);
}

.empty-cart {
    text-align: center;
    padding: 50px 0;
    color: #aaa;
    font-size: 16px;
    animation: fadeIn 0.8s;
}

/* 加载动画 */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 137, 220, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
    flex-direction: column;
}

.loading.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

/* 漂浮元素 */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-heart {
    position: absolute;
    opacity: 0;
    color: rgba(74, 137, 220, 0.2);
    animation: float 6s ease-in infinite;
    font-size: 20px;
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: var(--accent);
    opacity: 0;
    z-index: 1001;
    animation: confetti 3s ease-out;
}

/* 爱心提示 */
.love-note {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(74, 137, 220, 0.2);
    font-size: 14px;
    color: var(--accent);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 101;
}

.love-note.show {
    opacity: 1;
    bottom: 120px;
}

/* 留言弹窗 */
.message-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.message-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.message-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--accent);
    text-align: center;
}

.message-textarea {
    width: 100%;
    height: 100px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
    resize: none;
    font-family: inherit;
}

.message-buttons {
    display: flex;
    justify-content: space-between;
}

.message-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.message-cancel {
    background: #f5f5f5;
    color: #666;
}

.message-submit {
    background: var(--primary);
    color: white;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .category-nav {
        width: 80px;
    }
    .content-area {
        margin-left: 80px;
        max-width: calc(100% - 80px);
    }
    .cart {
        left: 80px;
    }
    .nav-item {
        font-size: 13px;   /* 稍微减小字体大小 */
        padding: 10px 3px; /* 调整内边距 */
    }
}