* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #3498db;
    --secondary: #9b59b6;
    --accent: #e74c3c;
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --card-bg: #1e1e1e;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --border: #333;
    --success: #2ecc71;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

button {
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: rgba(18, 18, 18, 0.95);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

header.scrolled {
    padding: 10px 0;
    background-color: rgba(10, 10, 10, 0.98);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--accent);
}

.logo i {
    font-size: 28px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
    position: relative;
}

nav ul li a {
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.auth-buttons a {
    margin-left: 15px;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn {
    color: var(--text);
    border: 1px solid var(--border);
}

.login-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.register-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    overflow: hidden;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    margin-left: 20px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--darker-bg), var(--dark-bg));
    color: white;
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(155, 89, 182, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--text-muted);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    opacity: 100;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.4s forwards;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.4);
}

/* Products Section */
.products {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 3px;
}

.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.product-image {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 50px;
    position: relative;
    height: 300px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
}

.product-info {
    padding: 25px;
}

.product-category {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 20px;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.product-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.product-button {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.product-button:hover::before {
    left: 100%;
}

.product-button:hover {
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Product Detail Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 50px auto;
    border-radius: 12px;
    max-width: 1000px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.4s ease;
    overflow: hidden;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--text);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent);
}

.modal-body {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.product-detail-image {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 80px;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.product-detail-info h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text);
}

.product-detail-category {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: inline-block;
    padding: 5px 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 20px;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
    margin: 20px 0;
}

.product-detail-description {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.7;
}

.product-features {
    margin: 25px 0;
}

.product-features h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text);
}

.features-list {
    list-style: none;
}

.features-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.features-list li i {
    color: var(--success);
    margin-right: 10px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-add-to-cart,
.btn-buy-now {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-add-to-cart {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-add-to-cart:hover {
    background: rgba(52, 152, 219, 0.1);
}

.btn-buy-now {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-buy-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

/* Checkout Modal */
.checkout-modal .modal-content {
    max-width: 800px;
}

.checkout-steps {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.checkout-step {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    position: relative;
    color: var(--text-muted);
    font-weight: 500;
}

.checkout-step.active {
    color: var(--primary);
}

.checkout-step.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

.checkout-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--darker-bg);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.filter {
    position: relative;
    max-width: 200px;
    width: 100%;
    margin-top: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--darker-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.order-summary {
    background: var(--darker-bg);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.order-summary h3 {
    margin-bottom: 15px;
    color: var(--text);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--accent);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.payment-method {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method img {
    width: 30px;
    height: 30px;
}

.payment-method.selected {
    border-color: var(--primary);
    background: rgba(52, 152, 219, 0.1);
}

.payment-method i {
    font-size: 30px;
    margin-bottom: 10px;
    color: var(--primary);
}

.btn-complete-order {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--success), #27ae60);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
    transition: all 0.3s ease;
}

.btn-complete-order:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
}

/* Features Section */
.features {
    background-color: var(--darker-bg);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, rgba(52, 152, 219, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.features-content {
    position: relative;
    z-index: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text);
}

.feature-description {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Footer */
footer {
    background-color: var(--darker-bg);
    color: white;
    padding: 80px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-column ul li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border-radius: 50%;
    color: var(--text);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 100;
    z-index: 999;
}

.scroll-to-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Loading animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        text-align: center;
    }

    nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }

    nav ul li {
        margin: 5px 10px;
    }

    .hero {
        padding: 140px 0 80px;
    }

    .hero h1 {
        font-size: 2.3rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .modal-content {
        margin: 20px auto;
    }

    .modal-body {
        padding: 20px;
    }

    .feature-card {
        padding: 30px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}