/* ===================================
   BELI GAMES – Dark Gaming Theme
   =================================== */

/* ── Lokale Schriften (DSGVO: keine Google-Server) ── */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('fonts/inter-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('fonts/orbitron-latin.woff2') format('woff2');
}

:root {
    --bg-dark: #0a0a14;
    --bg-card: #12121f;
    --bg-elevated: #1a1a2e;
    --accent: #7c3aed;
    --accent-glow: #9f5ff7;
    --accent2: #06b6d4;
    --gold: #f59e0b;
    --text: #e2e8f0;
    --text-muted: #64748b;
    --border: #1e1e3a;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(124, 58, 237, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,10,20,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}
.logo a { display: inline-flex; line-height: 0; }
.logo-img { height: 44px; width: 44px; object-fit: contain; border-radius: 50%; }
.logo-accent { color: var(--gold); }
.header-nav { display: flex; gap: 2rem; }
.header-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
    position: relative;
    padding-bottom: 3px;
}
.header-nav a:hover { color: #fff; }
.header-nav a:hover::after,
.header-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
}
.site-header { border-bottom-color: rgba(245,158,11,0.25); }
.lang-switch { display: flex; gap: 0.4rem; align-items: center; }
.lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    border: 1px solid transparent;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.lang-flag .flag {
    display: block;
    width: 26px;
    height: 17px;
    border-radius: 3px;
    object-fit: cover;
    filter: grayscale(0.7);
    opacity: 0.55;
    transition: filter 0.2s, opacity 0.2s;
}
.lang-flag:hover { transform: translateY(-1px); }
.lang-flag:hover .flag { filter: grayscale(0); opacity: 1; }
.lang-flag.active { border-color: rgba(245,158,11,0.6); background: rgba(245,158,11,0.1); }
.lang-flag.active .flag { filter: grayscale(0); opacity: 1; }

/* ── Hero ── */
.hero {
    position: relative;
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 80% at 50% 0%, rgba(245,158,11,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.hero-accent { color: var(--gold); }
.hero-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    padding: 0.85rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(124,58,237,0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgba(124,58,237,0.6);
}

/* Pokeballs decoration */
.hero-balls { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pokeball {
    position: absolute;
    border-radius: 50%;
    border: 3px solid rgba(124,58,237,0.25);
    animation: float 8s ease-in-out infinite;
}
/* Mittellinie quer durch den Ball */
.pokeball::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -3px;
    right: -3px;
    height: 3px;
    background: rgba(124,58,237,0.25);
    transform: translateY(-50%);
}
/* Knopf in der Mitte */
.pokeball::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26%;
    height: 26%;
    border-radius: 50%;
    border: 3px solid rgba(124,58,237,0.25);
    background: var(--bg-dark);
    transform: translate(-50%, -50%);
}
.pb1 { width: 120px; height: 120px; top: 10%; left: 5%; animation-delay: 0s; }
.pb2 { width: 80px; height: 80px; top: 20%; right: 8%; animation-delay: 2s; }
.pb3 { width: 160px; height: 160px; bottom: 5%; right: 15%; animation-delay: 4s; opacity: 0.4; }
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* ── Filter ── */
.filter-section {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    position: sticky;
    top: var(--header-h, 64px);
    z-index: 90;
    transition: background 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.filter-section.scrolled {
    background: rgba(18, 18, 30, 0.5);
}
.container { max-width: 1200px; margin: 0 auto; }
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.filter-input, .filter-select {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.filter-input { flex: 1; min-width: 200px; }
.filter-input:focus, .filter-select:focus { border-color: var(--accent); }
.filter-select option { background: var(--bg-dark); }
.btn-filter {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-filter:hover { background: var(--accent-glow); }
.btn-reset {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.6rem;
    border-radius: 8px;
    transition: color 0.2s;
}
.btn-reset:hover { color: var(--text); }

/* ── Gallery ── */
.gallery-section { padding: 3rem 2rem; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}
@keyframes cardFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
.card-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    position: relative;
    opacity: 0;
    transform: translateY(28px);
}
.card-item.card-visible {
    animation: cardFadeUp 0.45s ease forwards;
}
.card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 28px rgba(245,158,11,0.18);
    border-color: rgba(245,158,11,0.5);
}
.card-image-wrap {
    position: relative;
    aspect-ratio: 3/4;
    background: var(--bg-elevated);
    overflow: hidden;
}
/* Skeleton shimmer */
.card-image-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
    animation: shimmer 1.4s infinite;
    z-index: 0;
}
@keyframes shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}
.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    transition: transform 0.4s, opacity 0.4s;
    opacity: 0;
    position: relative;
    z-index: 1;
}
.card-image-wrap img.img-loaded { opacity: 1; }
.card-item:hover .card-image-wrap img { transform: scale(1.05); }
.card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 4rem;
    opacity: 0.3;
}
.rarity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid rgba(245,158,11,0.4);
    z-index: 2;
}
.img-count-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: rgba(255,255,255,0.85);
    z-index: 2;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
}
.card-info { padding: 1rem; }
.card-name {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text);
}
.card-set, .card-condition {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
    line-height: 1.4;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.card-price {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
}
.card-links { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.btn-buy {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: opacity 0.2s, transform 0.2s;
}
.btn-buy:hover { opacity: 0.85; transform: scale(1.05); }
.btn-cardmarket { background: #1e88e5; color: #fff; }

/* Rarity glow effects */
.rarity-rare .card-item, .card-item.rarity-rare {
    border-color: rgba(59,130,246,0.4);
}
.card-item.rarity-holo, .card-item.rarity-holographic {
    border-color: rgba(168,85,247,0.5);
}
.card-item.rarity-ultra-rare {
    border-color: rgba(245,158,11,0.5);
    box-shadow: 0 0 12px rgba(245,158,11,0.1);
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 5rem 1rem;
    color: var(--text-muted);
}
.empty-icon { font-size: 4rem; display: block; margin-bottom: 1rem; }

/* ── Contact ── */
.contact-section {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
    text-align: center;
}
.contact-section h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}
.contact-section p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ── Series Groups ── */
.series-block { margin-bottom: 2.5rem; }
.series-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
}
.series-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
}
.series-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.series-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(245,158,11,0.3), transparent);
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2.5rem 0 1.5rem;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    height: 3rem;
    padding: 0 1rem;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--gold);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.page-btn:hover { background: var(--bg-card); border-color: var(--gold); box-shadow: 0 0 8px rgba(245,158,11,0.3); }
.page-btn.active { background: var(--gold); color: #000; border-color: var(--gold); box-shadow: 0 0 12px rgba(245,158,11,0.5); }

/* ── Cookie Banner ── */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 999;
    background: #12121f;
    border-top: 1px solid rgba(245,158,11,0.3);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.cookie-text { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; flex: 1; min-width: 200px; }
.cookie-text a { color: var(--gold); text-decoration: none; }
.cookie-text a:hover { text-decoration: underline; }
.cookie-btns { display: flex; gap: 0.6rem; flex-shrink: 0; }
.cookie-btn-accept {
    background: var(--gold); color: #000;
    border: none; border-radius: 7px;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem; font-weight: 700;
    cursor: pointer; transition: background 0.2s;
}
.cookie-btn-accept:hover { background: #fbbf24; }
.cookie-btn-decline {
    background: transparent; color: var(--text-muted);
    border: 1px solid var(--border); border-radius: 7px;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.cookie-btn-decline:hover { color: var(--text); border-color: #444; }

/* ── Footer ── */
.site-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.site-footer a { color: var(--gold); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Admin Styles (shared) ── */
.admin-body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    padding: 2rem;
}
.admin-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 480px;
    margin: 0 auto;
}
.admin-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-glow);
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 80px; }
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border: none;
    padding: 0.85rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: opacity 0.2s;
}
.btn-submit:hover { opacity: 0.9; }
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.4); color: #10b981; }
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.4); color: #ef4444; }

/* Admin Dashboard */
.admin-header {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.admin-cards-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.admin-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}
.admin-card-body { padding: 0.75rem; }
.admin-card-name { font-weight: 700; font-size: 0.85rem; margin-bottom: 0.5rem; }
.btn-delete {
    display: inline-block;
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.4);
    color: #ef4444;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-delete:hover { background: rgba(239,68,68,0.3); }
.btn-secondary {
    display: inline-block;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
    text-decoration: none;
}
.btn-secondary:hover { border-color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 640px) {
    .header-nav { gap: 0.75rem; }
    .header-nav > a { display: none; }
    .lang-switch { display: flex; }
    .hero { padding: 4rem 1.5rem 3rem; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
    .admin-body { padding: 1rem; }
}
