:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #1e293b;
    --dark-text: #0f172a;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background: var(--light-bg);
    overflow-x: hidden;
}

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

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: transform 0.3s;
}

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

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.main-nav a:hover::after {
    width: 100%;
}

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

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Hero Section - Completely Redesigned */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: var(--gradient-1);
    overflow: hidden;
    padding: 4rem 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 20%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    color: var(--white);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.title-line-1 {
    display: block;
    animation: fadeInUp 1s ease 0.2s both;
}

.title-line-2 {
    display: block;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.8s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-box {
    display: flex;
    gap: 0;
    background: var(--white);
    border-radius: 15px;
    padding: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 1s both;
    max-width: 600px;
}

.search-icon {
    padding: 0 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    outline: none;
    border-radius: 10px;
}

.search-btn {
    padding: 1rem 2rem;
    background: var(--gradient-1);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    transform: scale(1.05);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    animation: fadeInUp 1s ease 1.2s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.hero-image {
    position: relative;
    height: 500px;
}

.hero-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 200px;
}

.hero-card:nth-child(1) {
    top: 0;
    left: 0;
}

.hero-card:nth-child(2) {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.hero-card:nth-child(3) {
    bottom: 0;
    left: 20%;
}

.floating {
    animation: floatCard 3s ease-in-out infinite;
}

.floating-delay-1 {
    animation: floatCard 3s ease-in-out infinite 0.5s;
}

.floating-delay-2 {
    animation: floatCard 3s ease-in-out infinite 1s;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.card-icon {
    font-size: 3rem;
}

.card-text {
    font-weight: 600;
    color: var(--dark-text);
    text-align: center;
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
}

/* Category Grid - Redesigned */
.categories-section {
    background: var(--white);
}

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

.category-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--dark-text);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0.1;
    transition: left 0.5s;
}

.category-card:hover::before {
    left: 0;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.category-card h3 {
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.category-count {
    color: var(--gray);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 1rem;
}

.category-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.category-card:hover .category-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Listings Grid - Enhanced */
.listings-section {
    background: var(--light-bg);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.listing-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
}

.listing-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.listing-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.card-content {
    padding: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--gradient-1);
    color: var(--white);
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-content h3 {
    margin: 0.5rem 0;
    color: var(--dark-text);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
}

.card-content p {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.price {
    font-weight: 700;
    color: var(--success);
    font-size: 1.1rem;
}

.free {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Auth Pages */
.auth-page {
    background: var(--gradient-1);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark-text);
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray);
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease;
}

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

.alert-error {
    background: #fee2e2;
    color: var(--error);
    border: 2px solid var(--error);
}

.alert-success {
    background: #d1fae5;
    color: var(--success);
    border: 2px solid var(--success);
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
    background: var(--light-bg);
    min-height: 80vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tables */
.table-container {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.table-container h2 {
    padding: 1.5rem;
    margin: 0;
    background: var(--gradient-1);
    color: var(--white);
    font-size: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--light-bg);
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--dark-text);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tbody tr {
    transition: all 0.3s;
}

tbody tr:hover {
    background: var(--light-bg);
}

/* Footer */
.main-footer {
    background: var(--dark-bg);
    color: var(--white);
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
}

/* Form Field Items */
.form-field-item {
    border: 2px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 15px;
    background: var(--light-bg);
    transition: all 0.3s;
}

.form-field-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Loading Animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-image {
        display: none;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .search-box {
        flex-direction: column;
        padding: 1rem;
    }
    
    .search-box input {
        margin-bottom: 0.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .listing-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .listing-info {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}
