/* Custom Styles for 绝摆哥炒饭 */

* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-fade-in {
    animation: fade-in 1s ease-out;
}

.animate-slide-in-left {
    animation: slide-in-left 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out;
}

/* Hero Section */
.hero-section {
    position: relative;
}

.hero-bg {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FFC857 100%);
}

.hero-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 40px 60px;
}

/* Navigation */
.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF6B35;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Menu Category Buttons */
.menu-category-btn {
    background: white;
    color: #2C3E50;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.menu-category-btn:hover {
    border-color: #FF6B35;
    color: #FF6B35;
    transform: translateY(-2px);
}

.menu-category-btn.active {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border-color: #FF6B35;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* Menu Card */
.menu-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.menu-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #FFE5B4 0%, #FFC857 100%);
}

.menu-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.menu-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 0.5rem;
}

.menu-card-description {
    color: #6B7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.6;
}

.menu-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.menu-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF6B35;
}

.menu-card-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.badge-signature {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
}

.badge-hot {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
}

.badge-new {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.add-to-cart-btn:active {
    transform: scale(0.98);
}

/* Cart Item */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

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

.cart-item-name {
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: #FF6B35;
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 1rem;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FF6B35;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #F7931E;
    transform: scale(1.1);
}

.quantity-btn:active {
    transform: scale(0.95);
}

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

.cart-item-remove {
    color: #EF4444;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.cart-item-remove:hover {
    color: #DC2626;
    transform: scale(1.1);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    animation: slide-in-right 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid #10B981;
}

.toast.error {
    border-left: 4px solid #EF4444;
}

.toast.info {
    border-left: 4px solid #3B82F6;
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    font-weight: 500;
    color: #2C3E50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-card-image {
        height: 180px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF6B35;
}

/* Form Focus Styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Button Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FFC857 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Pulse Animation for New Badge */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.badge-new {
    animation: pulse 2s infinite;
}
