:root {
  --primary: #6366f1;
  --secondary: #ec4899;
  --accent: #10b981;
  --bg-color: #f1f5f9;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --header-bg: rgba(241, 245, 249, 0.8);
  --pill-hover-bg: #f8fafc;
  --tag-bg: #f1f5f9;
  --tag-text: #64748b;
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-default: #e2e8f0;
  --surface-muted: #f8fafc;
  --action-hover-bg: #f8fafc;
  --thumb-bg: #e2e8f0;
  --scrollbar-thumb: #cbd5e1;
  --scrollbar-thumb-hover: #94a3b8;
  --on-primary: #ffffff;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

html[data-theme='dark'] {
  --primary: #818cf8;
  --secondary: #f472b6;
  --accent: #34d399;
  --bg-color: #0f172a;
  --sidebar-bg: #1e293b;
  --card-bg: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --white: #334155;
  --header-bg: rgba(15, 23, 42, 0.88);
  --pill-hover-bg: #334155;
  --tag-bg: #334155;
  --tag-text: #94a3b8;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-default: rgba(148, 163, 184, 0.35);
  --surface-muted: #0f172a;
  --action-hover-bg: #334155;
  --thumb-bg: #334155;
  --scrollbar-thumb: #475569;
  --scrollbar-thumb-hover: #64748b;
  --shadow:
    0 4px 14px rgb(99 102 241 / 0.22),
    0 2px 8px rgb(236 72 153 / 0.12),
    0 1px 2px rgb(129 140 248 / 0.15);
  --shadow-lg:
    0 12px 28px rgb(99 102 241 / 0.28),
    0 8px 16px rgb(236 72 153 / 0.14),
    0 2px 6px rgb(244 114 182 / 0.12);
  --on-primary: #ffffff;
}

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

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

/* Sidebar Styling */
.sidebar {
  width: 80px;
  background: var(--sidebar-bg);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  border-right: 1px solid var(--border-subtle);
}

.logo-container {
  width: 48px;
  height: 48px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
}

.logo-container:hover {
  transform: scale(1.1);
}

.logo-container img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.3s;
}

.theme-toggle:hover {
  background: var(--pill-hover-bg);
  color: var(--primary);
}

html[data-theme='dark'] .theme-icon-light {
  display: none;
}

html[data-theme='dark'] .theme-icon-dark {
  display: block !important;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.nav-item {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-item:hover, .nav-item.active {
  background: var(--primary);
  color: var(--on-primary);
}

.logout-container {
  margin-top: auto;
}

/* Main Content Styling */
.main-wrapper {
  margin-left: 80px;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.header {
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  z-index: 900;
}

.header-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.profile-chip--accent {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

.profile-chip--link {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.header-notify {
  box-shadow: var(--shadow);
  background: var(--card-bg);
  border-radius: 50%;
}

.search-box {
  width: 500px;
  background: var(--card-bg);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}

.search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  outline: none;
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  padding: 6px 16px;
  border-radius: 40px;
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 14px;
}

.profile-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

/* Content Sections */
.content-grid {
  padding: 0 40px 40px 40px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

.hero-banner {
  height: 320px;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 500px;
}

.hero-content h2 {
  font-size: 32px;
  margin-bottom: 8px;
}

a.play-btn {
  text-decoration: none;
}

.play-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-md);
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
  font-size: 16px;
  margin-top: 20px;
}

.play-btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

/* Categories */
.category-section {
  margin-top: 40px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title h3 {
  font-size: 20px;
  font-weight: 700;
}

.section-title a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}

.category-pills {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
}

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

.pill {
  padding: 10px 24px;
  background: var(--card-bg);
  border-radius: 40px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: var(--shadow);
  white-space: nowrap;
  border: 1px solid transparent;
}

.pill:hover {
  background: var(--pill-hover-bg);
  border-color: var(--primary);
}

.pill.active {
  background: var(--primary);
  color: white;
}

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

.game-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow);
  transition: 0.3s;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.game-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  background-color: var(--thumb-bg);
  object-fit: cover;
  margin-bottom: 12px;
}

.game-info h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.rating {
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Side Info Section (What's New / Ads) */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.panel-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
}

.whats-new-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

a.whats-new-item {
  text-decoration: none;
  color: inherit;
}

.whats-new-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.item-info h5 {
  font-size: 14px;
}

.item-info p {
  font-size: 11px;
  color: var(--text-muted);
}

a.item-update-btn {
  text-decoration: none;
  text-align: center;
}

.item-update-btn {
  margin-left: auto;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: var(--card-bg);
  cursor: pointer;
  color: var(--text-muted);
}

.ad-slot {
  width: 100%;
  background: var(--tag-bg);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
  font-weight: bold;
  min-height: 250px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.tag-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  font-size: 12px;
  background: var(--tag-bg);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--tag-text);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Custom Icons (Mini library for demo) */
.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Game Player Page Styles */
.breadcrumb {
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-muted);
}
.breadcrumb a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}
.breadcrumb span {
    margin: 0 8px;
}

.game-player-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.game-container {
    background: #000;
    border-radius: var(--radius-lg);
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.game-iframe-mock {
    width: 100%;
    height: 100%;
    border: none;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.3s;
    cursor: pointer;
}

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

.game-details-box {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-subtle);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.game-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.game-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.action-btn:hover {
    background: var(--action-hover-bg);
    border-color: var(--primary);
}

.game-meta-pills {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-default);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 16px;
    font-weight: 600;
}

.game-info-tabs {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 24px;
}

.tab {
    padding-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
}

html[data-theme='dark'] .tab {
    color: #cbd5e1;
}

html[data-theme='dark'] .tab.active {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.game-description h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.game-description p {
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--pill-hover-bg);
  padding: 12px;
  border-radius: var(--radius-sm);
}

.key-cap {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 4px 10px;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
