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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

h1 {
    color: #4f46e5;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.money-display {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.products-section, .cart-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.products-section {
    animation: slideInLeft 0.8s ease-out;
}

.cart-section {
    animation: slideInRight 0.8s ease-out;
}

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

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

h2 {
    color: #4f46e5;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.product-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #4f46e5;
}

.product-emoji {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

.product-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #374151;
}

.product-price {
    color: #059669;
    font-weight: bold;
    font-size: 1.1rem;
}

.add-to-cart {
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.add-to-cart:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

.cart-items {
    min-height: 200px;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    animation: slideInFade 0.5s ease-out;
}

@keyframes slideInFade {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.cart-item-emoji {
    font-size: 1.5rem;
}

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

.quantity-btn {
    background: #6b7280;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

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

.cart-total {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 15px;
    color: #059669;
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.checkout-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.empty-cart {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    margin-top: 50px;
}

.receipt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.receipt-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease-out;
}

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

.receipt-content h3 {
    text-align: center;
    color: #4f46e5;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.close-receipt {
    width: 100%;
    background: #4f46e5;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.close-receipt:hover {
    background: #4338ca;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    h1 {
        font-size: 2rem;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

