:root {
    /* Brand colors from logo */
    --bg-primary: #12121f;
    --bg-secondary: #1a1a2e;
    --bg-card: #232340;
    --bg-input: #0f0f1a;
    
    /* Accent gradient: cyan → purple (paintbrush) */
    --accent-cyan: #00d4ff;
    --accent-blue: #6b9fff;
    --accent-purple: #a78bfa;
    --accent-violet: #8b5cf6;
    
    --accent: #a78bfa;
    --accent-hover: #c4b5fd;
    
    --text-primary: #f0f0f0;
    --text-secondary: #9090a8;
    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;
    --border: #2e2e4a;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Navigation */
nav {
    background: var(--bg-secondary);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
}
.logo img {
    max-height: 50px;
}

.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent-cyan); }

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-purple));
    color: #fff;
}
.btn-primary:hover { 
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
.btn-success { background: var(--success); color: #000; }

/* Hero */
.hero {
    text-align: center;
    padding: 100px 24px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

.hero-content { position: relative; }
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 800; }
.hero h1 span:first-child { color: #fff; }
.hero h1 span:last-child { color: var(--accent-purple); }
.hero p { color: var(--text-secondary); font-size: 1.25rem; max-width: 600px; margin: 0 auto 40px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-buttons .btn { padding: 14px 32px; font-size: 1.05rem; }
.hero-stats { display: flex; gap: 60px; justify-content: center; margin-top: 60px; flex-wrap: wrap; }
.stat-value { 
    font-size: 2.5rem; font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label { color: var(--text-secondary); font-size: 0.95rem; margin-top: 4px; }

.container { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.section-header h2 { font-size: 1.8rem; }

/* Filters */
.filters { display: flex; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.filter-btn {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
.filter-btn.active { 
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-purple));
    border-color: transparent;
    color: #fff;
}

/* Theme Grid */
.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.theme-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}
.theme-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}
.theme-preview {
    height: 180px;
    padding: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.6;
    position: relative;
}
.theme-preview::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--bg-secondary));
}
.theme-info { padding: 20px; }
.theme-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.theme-name { font-size: 1.15rem; font-weight: 600; }
.theme-price {
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-purple));
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}
.theme-price.free { background: linear-gradient(135deg, #10b981, var(--success)); }
.theme-creator { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 12px; }
.theme-creator a { color: var(--accent-cyan); text-decoration: none; }
.theme-meta { display: flex; gap: 16px; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 16px; }
.color-dots { display: flex; gap: 8px; margin-bottom: 16px; }
.color-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}
.color-dot:hover { transform: scale(1.2); border-color: var(--accent-purple); }
.theme-actions { display: flex; gap: 10px; }
.theme-actions .btn { flex: 1; justify-content: center; }

/* Sell Section */
.sell-section {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    border: 2px solid var(--accent-violet);
    border-radius: 24px;
    padding: 60px;
    text-align: center;
    margin: 60px 0;
    position: relative;
}
.sell-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    border-radius: 22px;
}
.sell-section h2 { font-size: 2.2rem; margin-bottom: 16px; position: relative; }
.sell-section > p { color: var(--text-secondary); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; position: relative; }
.earnings-calc {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 28px;
    max-width: 400px;
    margin: 32px auto;
    border: 1px solid var(--border);
    position: relative;
}
.earnings-calc h4 { 
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.calc-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.calc-row span:last-child { color: var(--text-primary); }
.calc-row:last-child { border: none; font-weight: 700; font-size: 1.1rem; padding-top: 16px; margin-top: 8px; }
.calc-row:last-child span:last-child { color: var(--success); }

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
}
.modal-header { padding: 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-size: 1.4rem; }
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 1.8rem; cursor: pointer; }
.modal-close:hover { color: var(--accent-purple); }
.modal-body { padding: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-secondary); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-purple); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group small { color: var(--text-secondary); font-size: 0.85rem; margin-top: 6px; display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 60px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}
.footer-logo { margin-bottom: 16px; font-size: 1.3rem; font-weight: 700; }
.footer-logo span:first-child { color: #fff; }
.footer-logo span:last-child { color: var(--accent-purple); }
footer p { color: var(--text-secondary); }
footer a { color: var(--accent-cyan); text-decoration: none; }
.footer-links { display: flex; gap: 24px; justify-content: center; margin-top: 20px; }

.toast {
    position: fixed;
    bottom: 24px; right: 24px;
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-purple));
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1001;
}
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .nav-links a:not(.btn) { display: none; }
    .sell-section { padding: 40px 24px; }
    .form-row { grid-template-columns: 1fr; }
}