:root {
    --bg: #0f1220;
    --panel: #171b2e;
    --panel-light: #202542;
    --accent: #00c2ff;
    --accent-2: #7b5cff;
    --text: #eef0ff;
    --text-dim: #9aa1c4;
    --danger: #ff5c7a;
    --success: #37e2a4;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }

.topbar {
    background: var(--panel);
    border-bottom: 1px solid #2a2f4d;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 20px;
}

.brand {
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.brand-mark {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 900;
}

.searchbar {
    flex: 1;
    display: flex;
    max-width: 480px;
}
.searchbar input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #2a2f4d;
    border-radius: var(--radius) 0 0 var(--radius);
    background: var(--panel-light);
    color: var(--text);
}
.searchbar button {
    padding: 8px 16px;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--accent);
    color: #06131a;
    font-weight: 600;
    cursor: pointer;
}

.nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 600;
}
.nav-links a:hover { color: var(--accent); }
.btn-signup {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #06131a !important;
    padding: 8px 16px;
    border-radius: var(--radius);
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px 60px;
    min-height: 70vh;
}

h1, h2, h3 { line-height: 1.2; }

.hero {
    background: linear-gradient(135deg, rgba(0,194,255,0.15), rgba(123,92,255,0.15));
    border: 1px solid #2a2f4d;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
}
.hero h1 { margin: 0 0 8px; font-size: 28px; }
.hero p { color: var(--text-dim); margin: 0; }

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.game-card {
    background: var(--panel);
    border: 1px solid #2a2f4d;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .15s ease, border-color .15s ease;
    display: flex;
    flex-direction: column;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.game-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--panel-light), #10132a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 13px;
    overflow: hidden;
}
.game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-info { padding: 12px; }
.game-title { font-weight: 700; margin: 0 0 4px; font-size: 15px; }
.game-meta { color: var(--text-dim); font-size: 12px; display: flex; justify-content: space-between; }

.card {
    background: var(--panel);
    border: 1px solid #2a2f4d;
    border-radius: var(--radius);
    padding: 24px;
    max-width: 440px;
    margin: 40px auto;
}
.card h1, .card h2 { margin-top: 0; }

.form-group { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=file], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid #2a2f4d;
    background: var(--panel-light);
    color: var(--text);
    font-size: 14px;
}
textarea { resize: vertical; min-height: 90px; }

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #06131a;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}
.btn:hover { opacity: 0.92; }
.btn-secondary {
    background: var(--panel-light);
    color: var(--text);
    border: 1px solid #2a2f4d;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error { background: rgba(255,92,122,0.12); color: var(--danger); border: 1px solid rgba(255,92,122,0.3); }
.alert-success { background: rgba(55,226,164,0.12); color: var(--success); border: 1px solid rgba(55,226,164,0.3); }

.profile-header {
    display: flex;
    gap: 20px;
    align-items: center;
    background: var(--panel);
    border: 1px solid #2a2f4d;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}
.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: #06131a;
    overflow: hidden;
    flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.play-frame {
    background: #05070f;
    border: 1px solid #2a2f4d;
    border-radius: 16px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--text-dim);
    text-align: center;
    padding: 20px;
}

.footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    padding: 20px;
    border-top: 1px solid #2a2f4d;
}

.tag {
    display: inline-block;
    background: var(--panel-light);
    color: var(--text-dim);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #2a2f4d;
}

.empty-state {
    text-align: center;
    color: var(--text-dim);
    padding: 60px 20px;
}
