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

:root {
    --dark-bg: #1a0d1f;
    --dark-purple: #2d1b3d;
    --purple: #7c3aed;
    --light-purple: #a78bfa;
    --pink: #ec4899;
    --light-pink: #f9a8d4;
    --text-light: #f3e8ff;
    --text-gray: #d8b4fe;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--dark-purple) 0%, var(--dark-bg) 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

header .container > :first-child {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo h1 {
    background: linear-gradient(135deg, var(--light-purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    margin: 0;
    padding: 0;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
}

nav a:hover {
    color: var(--light-pink);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--light-purple);
    font-weight: 500;
    font-size: 0.95rem;
}

.auth-btn {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--purple);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
}

.auth-btn:hover {
    background: var(--purple);
    transform: translateY(-2px);
}

.auth-btn.register {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border: none;
}

.auth-btn.register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(236, 72, 153, 0.4);
}

.auth-btn.logout {
    background: transparent;
    border: 2px solid var(--pink);
    color: var(--light-pink);
}

.auth-btn.logout:hover {
    background: var(--pink);
    color: white;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-icon svg {
    color: var(--text-light);
    transition: color 0.3s;
}

.cart-icon:hover svg {
    color: var(--light-pink);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--pink);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark-purple) 0%, var(--dark-bg) 50%, #1f0a2e 100%);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(124, 58, 237, 0.2), transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(236, 72, 153, 0.2), transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--light-purple), var(--light-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.cta-button {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    font-weight: 600;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4);
}

/* Filter Section */
.filter-section {
    padding: 3rem 0;
    background: var(--dark-bg);
}

.filter-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--light-purple);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--dark-purple);
    color: var(--text-light);
    border: 2px solid var(--purple);
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover {
    background: var(--purple);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border-color: var(--pink);
}

/* Products Section */
.products-section {
    padding: 3rem 0;
    background: var(--dark-bg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.product-card {
    background: linear-gradient(135deg, var(--dark-purple) 0%, #1f0a2e 100%);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(236, 72, 153, 0.3);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: var(--light-pink);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.product-description {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-rating {
    color: #fbbf24;
    margin-bottom: 1rem;
}

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

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--light-purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.add-to-cart {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s;
    font-weight: 600;
}

.add-to-cart:hover {
    transform: scale(1.05);
}

/* About Section */
.about-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--dark-purple) 0%, var(--dark-bg) 100%);
    text-align: center;
}

.about-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--light-purple);
}

.about-section > .container > p {
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--text-gray);
    font-size: 1.1rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature {
    padding: 2rem;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 1rem;
    color: var(--light-pink);
    stroke: var(--light-pink);
}

.feature h4 {
    color: var(--light-pink);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.feature p {
    color: var(--text-gray);
}

/* Footer */
footer {
    background: var(--dark-purple);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--light-purple);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-gray);
    text-decoration: none;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--light-pink);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(124, 58, 237, 0.3);
    color: var(--text-gray);
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        gap: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

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

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

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, var(--dark-purple) 0%, #1f0a2e 100%);
    padding: 2rem 2rem 1.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(124, 58, 237, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

.modal-content h2 {
    color: var(--light-purple);
    margin-bottom: 0.3rem;
    font-size: 1.6rem;
    text-align: center;
}

.modal-subtitle {
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 1.3rem;
    font-size: 0.85rem;
}

.close {
    position: absolute;
    right: 1.2rem;
    top: 1.2rem;
    color: var(--text-gray);
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close:hover {
    color: var(--light-pink);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    color: var(--light-purple);
    font-weight: 500;
    font-size: 0.85rem;
}

.form-group input {
    background: rgba(124, 58, 237, 0.1);
    border: 2px solid rgba(124, 58, 237, 0.3);
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--purple);
    background: rgba(124, 58, 237, 0.15);
}

.form-group input::placeholder {
    color: var(--text-gray);
    opacity: 0.6;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.forgot-password {
    color: var(--light-pink);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--pink);
}

.submit-btn {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.3rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4);
}

.switch-auth {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.switch-auth a {
    color: var(--light-pink);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.switch-auth a:hover {
    color: var(--pink);
}

/* Cart Modal Styles */
.cart-modal-content {
    max-width: 600px;
    max-height: 85vh;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin: 1.5rem 0;
    padding-right: 0.5rem;
}

.cart-items::-webkit-scrollbar {
    width: 8px;
}

.cart-items::-webkit-scrollbar-track {
    background: rgba(124, 58, 237, 0.1);
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: var(--pink);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

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

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cart-item-name {
    color: var(--light-purple);
    font-weight: 600;
    font-size: 1rem;
}

.cart-item-category {
    color: var(--text-gray);
    font-size: 0.8rem;
}

.cart-item-price {
    color: var(--light-pink);
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

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

.quantity-btn:hover {
    background: var(--pink);
    transform: scale(1.1);
}

.quantity-display {
    color: var(--text-light);
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.remove-item-btn {
    background: transparent;
    color: var(--pink);
    border: 1px solid var(--pink);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
    margin-left: auto;
}

.remove-item-btn:hover {
    background: var(--pink);
    color: white;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-gray);
}

.cart-empty svg {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    color: var(--purple);
    opacity: 0.5;
}

.cart-summary {
    border-top: 2px solid rgba(124, 58, 237, 0.3);
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.cart-total span:first-child {
    color: var(--text-light);
}

.total-price {
    color: var(--light-pink);
    font-size: 1.5rem;
}

.checkout-btn {
    width: 100%;
    margin-bottom: 0.8rem;
}

.clear-cart-btn {
    width: 100%;
    background: transparent;
    color: var(--pink);
    border: 2px solid var(--pink);
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.clear-cart-btn:hover {
    background: var(--pink);
    color: white;
}
