:root {
  --bg-dark: #07090e;
  --bg-card: #0b0f1a;
  --bg-card-hover: #121829;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.35);
  
  --primary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* UTILITY CLASSES */
.hidden {
  display: none !important;
}

/* NAVBAR */
.navbar {
  background: rgba(11, 14, 23, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 24px;
}

.nav-container {
  max-width: 1340px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.brand-icon {
  width: 30px;
  height: 30px;
  color: var(--accent-cyan);
}

.brand-highlight {
  color: var(--accent-cyan);
  margin-left: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(16, 21, 36, 0.9);
  border: 1px solid var(--border-color);
  padding: 6px 8px 6px 14px;
  border-radius: 40px;
}

.user-details {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
}

.user-badge-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  color: var(--text-main);
  text-transform: lowercase;
}

.balance-badge {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid var(--border-glow);
  padding: 6px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.balance-amount {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.currency-symbol {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(0, 242, 254, 0.2);
  color: var(--accent-cyan);
  border-color: var(--border-glow);
}

/* BUTTONS */
.btn {
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #040812;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 242, 254, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.3);
  color: #fff;
}

.btn-block {
  width: 100%;
}

/* MAIN CONTENT */
.main-content {
  max-width: 1340px;
  margin: 0 auto;
  padding: 30px 24px;
  flex: 1;
  width: 100%;
}

/* HERO BANNER */
.hero-banner {
  background: linear-gradient(135deg, rgba(16, 21, 36, 0.95) 0%, rgba(6, 8, 14, 0.98) 100%);
  border: 1px solid var(--border-glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 242, 254, 0.05);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid var(--border-glow);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
}

/* FILTER CONTROLS */
.filter-section {
  margin-bottom: 30px;
}

.filter-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.provider-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px 10px 40px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

/* GAMES GRID */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 242, 254, 0.2);
}

/* BLACK EMPTY FRAME CARD (NO IMAGE FETCHING) */
.black-frame-box {
  width: 100%;
  aspect-ratio: 16/10;
  position: relative;
  background: radial-gradient(circle at center, #111625 0%, #06080e 100%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  user-select: none;
}

.black-frame-provider {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
  background: rgba(0, 242, 254, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.black-frame-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
  color: #e2e8f0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 14, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-card:hover .game-overlay {
  opacity: 1;
}

.play-btn {
  background: var(--primary-gradient);
  color: #040812;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.game-card:hover .play-btn {
  transform: translateY(0);
}

.game-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #080a12;
}

.game-provider-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-title-text {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.no-games {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* LOGIN MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #0d1220;
  border: 1px solid var(--border-glow);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 242, 254, 0.15);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 32px;
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid var(--border-glow);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.modal-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  background: #141b2d;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s;
}

.form-group input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.bonus-info-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #a7f3d0;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

/* IN-LOBBY GAME LAUNCHER MODAL OVERLAY */
.game-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 7, 0.96);
  z-index: 300;
  display: flex;
  flex-direction: column;
}

.game-modal-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.game-modal-topbar {
  background: #090d17;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-modal-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-pill {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid var(--border-glow);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.active-game-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.game-modal-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lobby-bal-display {
  font-size: 14px;
  color: var(--text-muted);
}

.lobby-bal-display strong {
  font-family: var(--font-heading);
  color: var(--accent-cyan);
  font-size: 16px;
  margin-left: 4px;
}

.game-iframe-wrapper {
  flex: 1;
  width: 100%;
  background: #000;
  position: relative;
}

.game-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}
