/* Root Variables - Modern Warm Color Scheme */
:root {
    --primary-color: #F4A460;
    --secondary-color: #8B4513;
    --accent-color: #D2691E;
    --warm-orange: #FF8C42;
    --soft-cream: #FFF8E7;
    --text-dark: #2C2416;
    --text-light: #6B5D52;
    --bg-main: #FFFBF0;
    --bg-white: #FFFFFF;
    --bg-card: #FFFEF9;
    --border-color: #E8DCC8;
    --maple-red: #C44536;
    --autumn-gold: #D4A574;
    --shadow: 0 2px 12px rgba(212, 165, 116, 0.12);
    --shadow-hover: 0 4px 20px rgba(212, 165, 116, 0.20);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #F4A460 0%, #D2691E 50%, #C44536 100%);
    padding: 40px 20px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.couple-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin-bottom: 24px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: block;
}

@media (min-width: 768px) {
    .couple-image {
        max-width: 600px;
    }
}

.title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.welcome {
    font-size: 15px;
    opacity: 0.95;
    letter-spacing: 1px;
}
    opacity: 0.95;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
}

/* Search Section */
.search-section {
    padding: 20px;
    background: var(--bg-white);
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: 28px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
    background: var(--bg-card);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(244, 164, 96, 0.1);
}

/* Sections */
.recommendation-section,
.dishes-section {
    padding: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* Dish Grid */
.dish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

@media (min-width: 768px) {
    .dish-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

/* Dish Card */
.dish-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.dish-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--autumn-gold);
}

.dish-image-wrapper {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--soft-cream) 0%, #FFE4C4 100%);
}

.dish-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    background: linear-gradient(135deg, var(--soft-cream) 0%, #FFEFD5 100%);
}

@media (min-width: 768px) {
    .dish-image-wrapper {
        height: 180px;
    }
    
    .dish-image-placeholder {
        font-size: 72px;
    }
}

.dish-info {
    padding: 12px;
}

.dish-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.dish-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dish-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 11px;
}

.meta-tag {
    padding: 4px 10px;
    background: var(--soft-cream);
    border-radius: 12px;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.dish-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dish-price {
    font-size: 16px;
    color: var(--maple-red);
    font-weight: 700;
}

.btn-add-cart {
    padding: 7px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(244, 164, 96, 0.3);
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 164, 96, 0.4);
}

/* Floating Cart Button */
.cart-float {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--warm-orange), var(--maple-red));
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(196, 69, 54, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
    z-index: 100;
}

.cart-float:hover {
    transform: scale(1.1) rotate(5deg);
}

.cart-icon {
    font-size: 24px;
}

.cart-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #FF4444;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: sticky;
    top: 15px;
    right: 20px;
    float: right;
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    z-index: 10;
    background: var(--bg-white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-title {
    font-size: 22px;
    font-weight: 600;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

/* Dish Detail */
.dish-detail {
    padding: 20px;
}

.detail-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.detail-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--secondary-color);
    font-weight: 600;
}

.ingredient-list,
.step-list {
    list-style: none;
}

.ingredient-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.step-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
}

.step-list li::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 12px;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* Cart */
.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.order-note-section {
    padding: 20px;
    background: var(--soft-cream);
    margin: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.note-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.order-note-input {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s;
    background: var(--bg-white);
}

.order-note-input:focus {
    border-color: var(--primary-color);
}

.order-note-input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

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

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 15px;
    color: var(--maple-red);
    margin-bottom: 8px;
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-quantity {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-quantity:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.item-quantity {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.btn-remove {
    margin-left: auto;
    color: var(--text-light);
    cursor: pointer;
    font-size: 20px;
}

.btn-remove:hover {
    color: #FF4444;
}

.cart-footer {
    padding: 20px;
    border-top: 2px solid var(--border-color);
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 17px;
    font-weight: 600;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--warm-orange), var(--maple-red));
    color: white;
    border: none;
    border-radius: 28px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(196, 69, 54, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 69, 54, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-cart-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 767px) {
    .container {
        padding-bottom: 100px;
    }
    
    .modal-content {
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}
