:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-2: #242836;
    --text: #eef0f6;
    --muted: #9aa3b5;
    --primary: #6c5ce7;
    --primary-hover: #5b4cdb;
    --accent: #00cec9;
    --danger: #ff7675;
    --success: #55efc4;
    --border: #2f3545;
    --radius: 12px;
    --shadow: 0 10px 40px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1100px, 92%); margin: 0 auto; }

.site-header {
    background: rgba(26,29,39,.95);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: blur(8px);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 0;
}
.logo { font-weight: 700; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.site-header nav { display: flex; gap: 1rem; align-items: center; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--text); text-decoration: none; }

.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1a1d27 0%, #2d1b69 50%, #0f1117 100%);
    border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .5rem; }
.hero p { color: var(--muted); max-width: 560px; }

.section { padding: 2.5rem 0; }
.section h2 { margin-top: 0; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-thumb { position: relative; aspect-ratio: 16/10; background: var(--surface-2); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-placeholder {
    display: grid; place-items: center; height: 100%;
    color: var(--muted); font-weight: 600; background: linear-gradient(135deg, #242836, #1a1d27);
}
.thumb-placeholder.large { min-height: 280px; font-size: 1.5rem; }
.badge {
    position: absolute; top: .75rem; left: .75rem;
    background: var(--primary); color: white; font-size: .75rem;
    padding: .25rem .5rem; border-radius: 999px;
}
.card-body { padding: 1rem; }
.card-body h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.card-body p { margin: 0; color: var(--muted); font-size: .9rem; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.price { color: var(--accent); font-weight: 700; }
.price-lg { font-size: 1.75rem; color: var(--accent); font-weight: 700; }
.tag {
    display: inline-block; background: var(--surface-2); color: var(--muted);
    padding: .2rem .55rem; border-radius: 999px; font-size: .8rem; margin-right: .35rem;
}

.btn, button.btn {
    display: inline-block; border: none; cursor: pointer;
    background: var(--surface-2); color: var(--text);
    padding: .65rem 1.1rem; border-radius: 8px; font-weight: 600;
    text-decoration: none; font-size: .95rem;
}
.btn-primary, button.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover, button.btn-primary:hover { background: var(--primary-hover); text-decoration: none; }
.btn-secondary { background: transparent; border: 1px solid var(--border); }
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: .4rem .75rem; font-size: .85rem; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.filters a {
    padding: .35rem .75rem; border-radius: 999px; background: var(--surface);
    border: 1px solid var(--border); color: var(--muted);
}
.filters a.active, .filters a:hover { background: var(--primary); color: white; text-decoration: none; }

.project-detail .detail-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
@media (max-width: 800px) {
    .project-detail .detail-grid { grid-template-columns: 1fr; }
}
.detail-media img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.description { margin: 1.5rem 0; color: var(--muted); white-space: pre-wrap; }

.auth-page { min-height: 70vh; display: grid; place-items: center; padding: 2rem; }
.auth-card {
    width: min(420px, 100%); background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 2rem; box-shadow: var(--shadow);
}
.auth-card h1 { margin-top: 0; }
.auth-card label { display: block; margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.auth-card input {
    display: block; width: 100%; margin-top: .35rem;
    padding: .65rem .75rem; border-radius: 8px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.auth-footer { margin-top: 1rem; color: var(--muted); font-size: .9rem; }

.alert { padding: .85rem 1rem; border-radius: 8px; margin: 1rem 0; }
.alert.success { background: rgba(85,239,196,.12); border: 1px solid rgba(85,239,196,.35); color: #aaf0dc; }
.alert.error { background: rgba(255,118,117,.12); border: 1px solid rgba(255,118,117,.35); color: #ffb4b3; }
.alert.inline { display: inline-block; }

.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { background: var(--surface-2); color: var(--muted); font-size: .85rem; }
.status { padding: .2rem .5rem; border-radius: 6px; font-size: .8rem; text-transform: capitalize; }
.status-paid { background: rgba(85,239,196,.15); color: #55efc4; }
.status-pending { background: rgba(255,206,86,.15); color: #fdcb6e; }

.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 3rem; color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--accent); font-size: .95rem; }
.browse-section { margin-bottom: 2.5rem; }
.badge-type { top: auto; bottom: .75rem; left: .75rem; background: var(--accent); color: #0f1117; }
