* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    color: #e0e0e0;
    background: none;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

#canvas3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

header {
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 1.5rem 1rem;
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

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

.header-logo {
    height: 90px;
    width: 90px;
    border-radius: 50%;
    clip-path: circle(50% at 50% 50%);
    object-fit: contain; /* Changed from cover to contain */
    overflow: hidden;
    display: block;
    background: transparent; /* Optional: Add a background if needed */
}

.header-title {
    font-size: 2rem;
    font-weight: 700;
}

.typewriter {
    font-size: 1.125rem;
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40, end) infinite;
}

@keyframes typing {
    0% {
        width: 0;
    }

    50% {
        width: 100%;
    }

    100% {
        width: 0;
    }
}

.header-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-primary {
    background-color: #06b6d4;
    color: #ffffff;
    border: none;
}

.btn-primary:hover {
    background-color: #0891b2;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.news-ticker {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    overflow: hidden;
}

.ticker-wrapper {
    display: flex;
    white-space: nowrap;
    animation: tickerScroll 20s linear infinite;
}

@keyframes tickerScroll {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(-100%);
    }
}

.ticker-content {
    display: flex;
    gap: 2rem;
    color: #22d3ee;
    font-weight: 600;
}

section {
    padding: 3rem 1rem;
}

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

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

#description h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

#description p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

#features h2,
#products h2,
#marketplace h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

.swiper-slide {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0.5rem;
    padding: 1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.swiper-slide svg {
    width: 3rem;
    height: 3rem;
    margin-right: 1rem;
    color: #22d3ee;
}

.swiper-slide h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.swiper-slide p {
    font-size: 1rem;
}

.swiper-pagination-bullet {
    background: #22d3ee;
}

.product-grid,
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.product-card,
.market-card {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0.5rem;
    border: 2px solid #ffffff;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.product-card:hover,
.market-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.product-image,
.market-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-image.tilt,
.market-image.tilt {
    transform-style: preserve-3d;
}

.product-card a,
.market-card a {
    text-decoration: none;
    color: inherit;
}

.product-card h5,
.market-card h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #22d3ee;
    margin: 1rem;
}

.product-card p,
.market-card p {
    font-size: 1rem;
    color: #d1d5db;
    margin: 0 1rem 1rem;
}

.product-carousel .swiper-button-next,
.product-carousel .swiper-button-prev,
.market-carousel .swiper-button-next,
.market-carousel .swiper-button-prev {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-carousel .swiper-button-next:after,
.product-carousel .swiper-button-prev:after,
.market-carousel .swiper-button-next:after,
.market-carousel .swiper-button-prev:after {
    font-size: 20px;
}

.category-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: #22d3ee;
    text-align: center;
    margin: 2rem 0 1rem;
    border-bottom: 2px solid #22d3ee;
    padding-bottom: 0.5rem;
}

.search-and-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.search-bar,
.category-nav {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
}

.search-bar .form-control,
.category-nav .form-select {
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: 1px solid #4b5563;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.search-bar .form-control:focus,
.category-nav .form-select:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.3);
    outline: none;
}

.search-bar .form-label,
.category-nav .form-label {
    color: #e0e0e0;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: block;
    text-align: center;
}

.modal-content {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border-radius: 0.5rem;
    backdrop-filter: blur(8px);
}

.modal-header,
.modal-footer {
    border: none;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.form-label {
    color: #e0e0e0;
}

.form-control {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #4b5563;
    color: #ffffff !important;
    border-radius: 0.375rem;
}

.form-control:focus {
    background: rgba(0, 0, 0, 0.8);
    border-color: #22d3ee;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.3);
    outline: none;
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    background: rgba(0, 0, 0, 0.7) !important;
    transition: background-color 5000s ease-in-out 0s;
}

textarea.form-control {
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff !important;
}

textarea.form-control:focus {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff !important;
}

textarea.form-control:-webkit-autofill,
textarea.form-control:-webkit-autofill:hover,
textarea.form-control:-webkit-autofill:focus,
textarea.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    background: rgba(0, 0, 0, 0.7) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.btn-close {
    filter: invert(1);
}

.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    min-width: 300px;
    border-radius: 0.5rem;
    padding: 1rem;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background-color: #10b981;
}

.toast-error {
    background-color: #ef4444;
}

#lottie-avatar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    z-index: 1000;
    background: rgba(6, 182, 212, 0.2);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
    cursor: pointer;
}

#lottie-avatar:hover {
    transform: scale(1.15);
}

#marketplace-hero {
    position: relative;
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(0, 0, 0, 0.8));
    border-bottom: 2px solid #22d3ee;
}

#marketplace-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #22d3ee;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
    margin-bottom: 1rem;
}

#marketplace-hero p {
    font-size: 1.25rem;
    color: #d1d5db;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .header-logo {
        height: 40px;
        width: 40px;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .typewriter {
        font-size: 1rem;
    }

    #lottie-avatar {
        width: 80px;
        height: 80px;
        bottom: 10px;
        right: 10px;
    }

    #description h2,
    #marketplace-hero h1 {
        font-size: 2rem;
    }

    #description p,
    #marketplace-hero p {
        font-size: 1rem;
    }

    .search-and-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar,
    .category-nav {
        max-width: 100%;
    }
}

@media (min-width: 640px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .header-buttons {
        margin-top: 0;
    }
}

/* Global scrollbar styling for all elements with overflow */
html, body, [style*="overflow"], [style*="overflow-x"], [style*="overflow-y"] {
    scrollbar-width: thin; /* Thin scrollbar for Firefox */
    scrollbar-color: #22d3ee rgba(31, 42, 68, 0.5); /* Cyan thumb, dark track matching sidebar */
}

/* WebKit scrollbar styling for all elements with overflow */
::-webkit-scrollbar {
    width: 10px; /* Vertical scrollbar width */
    height: 10px; /* Horizontal scrollbar height */
}

::-webkit-scrollbar-track {
    background: rgba(31, 42, 68, 0.5); /* Dark track matching sidebar (#1f2a44) */
    border-radius: 5px;
    margin: 5px; /* Prevent scrollbar from touching edges */
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #06b6d4, #22d3ee); /* Cyan gradient matching theme */
    border-radius: 5px;
    box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.2); /* Glossy effect */
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #22d3ee, #06b6d4); /* Reverse gradient on hover */
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Ensure smooth scrolling for touch devices */
[style*="overflow"], [style*="overflow-x"], [style*="overflow-y"] {
    -webkit-overflow-scrolling: touch;
}