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

:root {
  --bg: #0d0f14;
  --bg2: #161920;
  --bg3: #1e2130;
  --border: #2a2d3e;
  --text: #e8eaf0;
  --text2: #8b8fa8;
  --accent: #00d4a0;
  --accent2: #0099ff;
  --danger: #e05050;
  --success: #00d4a0;
}

body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; min-height: 100vh; }

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.8; }

/* Navbar */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 60px; background: var(--bg2);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 1.3rem; font-weight: 700; color: var(--accent); letter-spacing: 2px; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: var(--text2); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.credits-badge { background: var(--bg3); padding: 4px 12px; border-radius: 20px; color: var(--accent) !important; font-weight: 600; }
.avatar { width: 28px; height: 28px; border-radius: 50%; }
.user-info { display: flex; align-items: center; gap: 8px; color: var(--text2); font-size: 0.9rem; }
.btn-logout { color: var(--danger) !important; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* Hero */
.home-hero { display: flex; align-items: center; justify-content: center; min-height: 100vh; text-align: center; }
.hero-content h1 { font-size: 4rem; font-weight: 800; color: var(--accent); letter-spacing: 4px; margin-bottom: 1rem; }
.hero-content p { color: var(--text2); font-size: 1.2rem; margin-bottom: 2rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: opacity 0.2s; background: var(--accent); color: #000; }
.btn:hover { opacity: 0.85; }
.btn-steam { background: #1b2838; color: #fff; border: 1px solid #3a4a5c; }
.btn-secondary { background: var(--bg3); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.btn-buy { width: 100%; margin-top: auto; }

/* Page header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.page-header h1 { font-size: 1.8rem; }
.credits-display { font-size: 1.2rem; font-weight: 700; color: var(--accent); }

/* Section */
.section { margin-bottom: 3rem; }
.section h2 { font-size: 1.2rem; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.2rem; }

/* Packs */
.packs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.pack-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; text-align: center; display: flex; flex-direction: column; gap: 0.5rem; }
.pack-name { font-weight: 700; font-size: 1.1rem; }
.pack-credits { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.pack-bonus { background: #1a3a2a; color: var(--accent); font-size: 0.8rem; padding: 2px 8px; border-radius: 20px; display: inline-block; }
.pack-price { font-size: 1.2rem; font-weight: 700; color: var(--text2); margin-bottom: 0.5rem; }

/* Items */
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.item-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.item-img { width: 100%; height: 140px; object-fit: cover; }
.item-img-placeholder { width: 100%; height: 140px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: var(--bg3); }
.item-info { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.item-name { font-weight: 700; }
.item-desc { font-size: 0.85rem; color: var(--text2); flex: 1; }
.item-price { font-weight: 700; color: var(--accent); }
.item-price-eur { font-weight: 700; color: #f0a500; }

/* Profile */
.profile-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem; padding: 1.5rem; background: var(--bg2); border-radius: 12px; border: 1px solid var(--border); }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; }
.profile-header h1 { font-size: 1.5rem; margin-bottom: 0.3rem; }

/* Table */
.table { width: 100%; border-collapse: collapse; background: var(--bg2); border-radius: 12px; overflow: hidden; }
.table th { text-align: left; padding: 12px 16px; background: var(--bg3); color: var(--text2); font-size: 0.8rem; text-transform: uppercase; }
.table td { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 0.9rem; }
.table tr:hover td { background: var(--bg3); }

/* Badges */
.badge { padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-pending { background: #2a2500; color: #f0a500; }
.badge-paid { background: #001a2a; color: var(--accent2); }
.badge-delivered { background: #001a12; color: var(--success); }
.badge-failed { background: #2a0000; color: var(--danger); }

/* Admin */
.admin-nav { display: flex; gap: 1rem; margin-bottom: 2rem; }
.admin-nav a { padding: 8px 16px; background: var(--bg3); border-radius: 8px; color: var(--text2); font-size: 0.9rem; }
.admin-nav a:hover { color: var(--text); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; text-align: center; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-label { color: var(--text2); font-size: 0.85rem; margin-top: 0.3rem; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 0.8rem; max-width: 600px; }
.form-inline { flex-direction: row; flex-wrap: wrap; max-width: none; }
.form-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.form input, .form textarea, .form select, input[type=text], input[type=number], textarea {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; border-radius: 8px; font-size: 0.9rem; width: 100%;
}
.form textarea { min-height: 80px; resize: vertical; }
.form-actions { display: flex; gap: 0.8rem; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal.hidden { display: none; }
.modal-content { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; width: 100%; max-width: 500px; }
.modal-content h2 { margin-bottom: 1rem; }

/* Toast */
.toast { position: fixed; bottom: 2rem; right: 2rem; padding: 12px 20px; border-radius: 8px; font-weight: 600; z-index: 2000; }
.toast.hidden { display: none; }
.toast.success { background: #001a12; color: var(--success); border: 1px solid var(--success); }
.toast.error { background: #2a0000; color: var(--danger); border: 1px solid var(--danger); }

/* Error */
.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 1rem; text-align: center; }
.empty { color: var(--text2); font-style: italic; }
