@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700&display=swap');

:root {
    --primary-color: #00ff88; /* Modern Neon Green */
    --primary-glow: rgba(0, 255, 136, 0.4);
    --secondary-color: #1a1a1a;
    --background-dark: #0a0a0a;
    --background-light: #121212;
    --card-bg: rgba(30, 30, 30, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent-color: #ff0055;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background-dark);
    color: var(--text-color);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 255, 136, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 85, 0.05) 0%, transparent 20%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--transition-speed);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #fff;
    line-height: 1.2;
}

/* Header & Navigation */
header {
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 10px var(--primary-glow);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

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

nav a {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
    box-shadow: 0 0 8px var(--primary-color);
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

nav a.active {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #00cc6a);
    color: #000;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all var(--transition-speed);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.5);
    background: linear-gradient(135deg, #00ff9d, #00e676);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), var(--background-dark)), url('https://images.unsplash.com/photo-1542751371-adc38448a05e?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, transparent 20%, var(--background-dark) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: #ddd;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Search Bar */
.search-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
    border-radius: 12px;
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-container input {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    color: white;
    font-size: 1rem;
    outline: none;
}

.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-container .btn {
    border-radius: 8px;
    margin: 0;
}

/* Categories */
.categories {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    margin-bottom: 3rem;
    font-size: 2.2rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
    box-shadow: 0 0 10px var(--primary-glow);
    border-radius: 2px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--card-bg);
    padding: 2rem 1rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--card-border);
    transition: all var(--transition-speed);
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.15);
    background: rgba(40, 40, 40, 0.8);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: transform var(--transition-speed);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    text-shadow: 0 0 15px var(--primary-glow);
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Listings Grid */
.listings {
    padding: 4rem 2rem;
    background-color: var(--background-light);
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.listing-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.listing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.listing-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.listing-card:hover .listing-image img {
    transform: scale(1.05);
}

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

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.listing-price {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.listing-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.listing-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

.listing-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

/* Listings Page Layout */
.listings-container {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 2rem;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    height: fit-content;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

.sidebar h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--card-border);
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #fff;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    cursor: pointer;
}

.checkbox-wrapper input {
    margin-right: 10px;
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.checkbox-wrapper span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary-color);
}

/* Detail Page */
.detail-container {
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

@media (min-width: 900px) {
    .detail-container {
        flex-direction: row;
        min-height: 600px;
    }
}

.detail-image {
    flex: 1.2;
    background-color: #000;
    position: relative;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #050505;
}

.detail-info {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.detail-info h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.detail-price {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.meta-item i {
    color: var(--primary-color);
}

.description {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.seller-card {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    margin-top: auto;
}

.seller-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.seller-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    margin-right: 1rem;
    border: 2px solid var(--primary-color);
}

/* Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 6rem auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.auth-container h2 {
    margin-bottom: 2rem;
    color: #fff;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--card-border);
    background: rgba(0,0,0,0.3);
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
}

.form-footer {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer */
footer {
    background: #050505;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
}

footer a {
    color: var(--text-muted);
    margin: 0 1rem;
    font-size: 0.9rem;
}

footer a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    nav ul {
        position: fixed;
        top: 70px; /* Header height */
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 1px solid var(--card-border);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    nav ul.show {
        transform: translateY(0);
    }

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

    .listings-container {
        flex-direction: column;
        padding: 0 1rem;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .detail-container {
        flex-direction: column;
    }
}
