/* ========================================
   STEAM PLATFORM — MAIN STYLES
   Dark theme inspired by Steam/Discord
   ======================================== */

:root {
  --bg-darkest: #0a0e17;
  --bg-dark: #0f1923;
  --bg-medium: #171d2b;
  --bg-light: #1e2a3a;
  --bg-lighter: #253447;
  --bg-hover: #2a3f55;
  --bg-card: #16202d;
  --bg-input: #0d1117;

  --text-primary: #e8edf3;
  --text-secondary: #8b9bb4;
  --text-muted: #556b84;
  --text-link: #67c1f5;

  --accent-blue: #1a9fff;
  --accent-blue-hover: #47b5ff;
  --accent-green: #4caf50;
  --accent-green-dark: #388e3c;
  --accent-red: #e74c3c;
  --accent-orange: #f39c12;
  --accent-purple: #9b59b6;
  --accent-gold: #ffd700;

  --gradient-blue: linear-gradient(135deg, #1a9fff 0%, #0d47a1 100%);
  --gradient-green: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  --gradient-featured: linear-gradient(135deg, #1a2a3a 0%, #0d1b2a 100%);

  --border-color: #1e3a52;
  --border-light: #2a4a6a;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 20px rgba(26,159,255,0.15);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  background: var(--bg-darkest);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-blue-hover);
}

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-lighter);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg-hover);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--gradient-blue);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  filter: brightness(1.1);
}

.btn-success {
  background: var(--gradient-green);
  color: white;
}

.btn-danger {
  background: var(--accent-red);
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-red);
  color: white;
  border-radius: 9px;
  margin-left: 4px;
}

/* ========================================
   AUTH SCREEN
   ======================================== */

.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-darkest);
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(26,159,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(13,71,161,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(26,159,255,0.04) 0%, transparent 50%);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  margin-bottom: 12px;
}

.auth-logo h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 6px;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-form h2 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(26,159,255,0.15);
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-error {
  color: var(--accent-red);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  min-height: 20px;
}

/* ========================================
   TOP BAR
   ======================================== */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
  background: linear-gradient(180deg, #1b2838 0%, #171d25 100%);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-primary);
}

.app-logo:hover {
  color: var(--accent-blue);
}

.main-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(26,159,255,0.15);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wallet-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(76,175,80,0.1);
  border: 1px solid rgba(76,175,80,0.3);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-green);
  transition: var(--transition);
}

.wallet-display:hover {
  background: rgba(76,175,80,0.2);
}

.cart-btn {
  cursor: pointer;
  font-size: 18px;
  position: relative;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.cart-btn:hover {
  background: rgba(255,255,255,0.05);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
}

.user-menu:hover {
  background: rgba(255,255,255,0.05);
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-lighter);
  border: 2px solid var(--accent-blue);
}

#header-username {
  font-size: 13px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-arrow {
  font-size: 10px;
  color: var(--text-muted);
}

.user-dropdown {
  position: absolute;
  top: 56px;
  right: 20px;
  width: 220px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}

.user-dropdown a {
  display: block;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
}

.user-dropdown a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.user-dropdown hr {
  border: none;
  border-top: 1px solid var(--border-color);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
  min-height: calc(100vh - 56px);
}

.page {
  display: none;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* ========================================
   STORE
   ======================================== */

.store-search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-medium);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.store-search-bar input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
}

.store-search-bar input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.store-search-bar select {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
}

.free-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.free-toggle input {
  accent-color: var(--accent-blue);
}

/* Featured Section */

.featured-section {
  margin-bottom: 32px;
}

.featured-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.featured-card {
  position: relative;
  background: var(--gradient-featured);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent-blue);
}

.featured-card-image {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-dark) 100%);
  position: relative;
}

.featured-card-image .game-emoji {
  font-size: 56px;
}

.featured-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-blue);
  color: white;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.featured-card-info {
  padding: 16px;
}

.featured-card-info h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.featured-card-info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Games Grid */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

.game-card-image {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-medium) 100%);
  position: relative;
}

.game-card-info {
  padding: 12px;
}

.game-card-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-genre {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.game-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--accent-gold);
}

.price-tag {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.price-tag.free {
  color: var(--accent-green);
}

.price-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-right: 4px;
}

.discount-badge {
  display: inline-block;
  background: var(--accent-green);
  color: white;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
}

/* ========================================
   GAME DETAIL
   ======================================== */

.game-detail {
  max-width: 900px;
  margin: 0 auto;
}

.game-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  cursor: pointer;
  font-size: 14px;
}

.game-detail-back:hover {
  color: var(--text-primary);
}

.game-detail-header {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.game-detail-image {
  width: 360px;
  min-height: 200px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-dark) 100%);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.game-detail-info {
  flex: 1;
}

.game-detail-info h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.game-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.meta-item {
  font-size: 13px;
  color: var(--text-secondary);
}

.meta-item span {
  color: var(--text-primary);
  font-weight: 600;
}

.game-detail-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.game-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.game-detail-price {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-medium);
  border-radius: var(--radius-md);
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.game-tag {
  padding: 4px 10px;
  background: var(--bg-lighter);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}

.game-detail-section {
  margin-top: 32px;
}

.game-detail-section h2 {
  font-size: 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Screenshots gallery */
.screenshots-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.screenshot-item {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
  aspect-ratio: 16/9;
}
.screenshot-item:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(26, 159, 255, 0.3);
}
.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Achievements in detail */

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.achievement-card.unlocked {
  border-color: var(--accent-gold);
  background: rgba(255,215,0,0.05);
}

.achievement-card.locked {
  opacity: 0.6;
}

.achievement-icon {
  font-size: 28px;
  width: 44px;
  text-align: center;
}

.achievement-info h4 {
  font-size: 14px;
  margin-bottom: 2px;
}

.achievement-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.achievement-rarity {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-transform: uppercase;
}

.rarity-common { background: rgba(150,150,150,0.2); color: #aaa; }
.rarity-uncommon { background: rgba(76,175,80,0.2); color: var(--accent-green); }
.rarity-rare { background: rgba(26,159,255,0.2); color: var(--accent-blue); }
.rarity-epic { background: rgba(155,89,182,0.2); color: var(--accent-purple); }
.rarity-legendary { background: rgba(255,215,0,0.2); color: var(--accent-gold); }

/* Reviews */

.review-card {
  padding: 16px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-lighter);
  object-fit: cover;
}

.review-user {
  font-weight: 600;
  font-size: 14px;
}

.review-sentiment {
  margin-left: auto;
  font-size: 20px;
}

.review-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.review-form {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.review-form h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.review-sentiment-select {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.sentiment-btn {
  padding: 8px 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.sentiment-btn.active-positive {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(76,175,80,0.1);
}

.sentiment-btn.active-negative {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: rgba(231,76,60,0.1);
}

.review-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  resize: vertical;
  margin-bottom: 12px;
}

.review-form textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* ========================================
   LIBRARY
   ======================================== */

.library-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: calc(100vh - 104px);
  margin: -24px;
}

.library-sidebar {
  background: var(--bg-dark);
  border-right: 1px solid var(--border-color);
  padding: 20px;
  overflow-y: auto;
}

.library-sidebar h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.library-sidebar input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  margin-bottom: 12px;
  font-size: 13px;
}

.library-sidebar input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.library-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.lib-filter {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}

.lib-filter.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

.library-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.library-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.library-item:hover {
  background: var(--bg-light);
}

.library-item.selected {
  background: var(--bg-lighter);
  border-left: 3px solid var(--accent-blue);
}

.library-item-icon {
  font-size: 24px;
  width: 36px;
  text-align: center;
}

.library-item-info h4 {
  font-size: 13px;
  font-weight: 600;
}

.library-item-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.library-detail {
  padding: 24px;
  overflow-y: auto;
}

.library-empty-state,
.chat-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 16px;
}

.library-game-header {
  margin-bottom: 24px;
}

.library-game-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.library-game-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.library-stat {
  padding: 12px 20px;
  background: var(--bg-medium);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.library-stat label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.library-stat span {
  font-size: 16px;
  font-weight: 700;
}

.library-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ========================================
   FRIENDS & MESSENGER
   ======================================== */

.friends-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  height: calc(100vh - 104px);
  margin: -24px;
}

.friends-sidebar {
  background: var(--bg-dark);
  border-right: 1px solid var(--border-color);
  padding: 20px;
  overflow-y: auto;
}

.friends-sidebar h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.add-friend-section {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.add-friend-section input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
}

.add-friend-section input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.friend-requests {
  margin-bottom: 16px;
}

.friend-request {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(26,159,255,0.05);
  border: 1px solid rgba(26,159,255,0.2);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.friend-request-info {
  flex: 1;
}

.friend-request-info h4 {
  font-size: 13px;
}

.friend-request-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.friend-request-actions {
  display: flex;
  gap: 4px;
}

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.friend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.friend-item:hover {
  background: var(--bg-light);
}

.friend-item.selected {
  background: var(--bg-lighter);
}

.friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-lighter);
  position: relative;
}

.friend-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-dark);
  position: absolute;
  bottom: -1px;
  right: -1px;
}

.friend-status-dot.online { background: var(--accent-green); }
.friend-status-dot.offline { background: var(--text-muted); }

.friend-avatar-wrapper {
  position: relative;
}

.friend-info {
  flex: 1;
}

.friend-info h4 {
  font-size: 14px;
  font-weight: 600;
}

.friend-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.friend-unread {
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-blue);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  padding: 0 5px;
}

/* Chat Area */

.chat-area {
  display: flex;
  flex-direction: column;
  background: var(--bg-darkest);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-medium);
  border-bottom: 1px solid var(--border-color);
}

.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-lighter);
}

.chat-header-info h3 {
  font-size: 15px;
}

.chat-header-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-message {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-message.sent {
  align-self: flex-end;
  background: var(--accent-blue);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.received {
  align-self: flex-start;
  background: var(--bg-medium);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-message-time {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
}

.chat-typing {
  padding: 4px 20px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  min-height: 24px;
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg-dark);
  border-top: 1px solid var(--border-color);
  position: relative;
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 14px;
}

.chat-input-area input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* ========================================
   ACTIVITY FEED
   ======================================== */

.activity-feed {
  max-width: 700px;
}

.activity-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  transition: var(--transition);
}

.activity-item:hover {
  border-color: var(--border-light);
}

.activity-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-lighter);
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-content h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.activity-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.activity-type-icon {
  font-size: 18px;
  margin-right: 6px;
}

/* ========================================
   PROFILE
   ======================================== */

.profile-content {
  max-width: 800px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  position: relative;
}

.profile-avatar-section {
  text-align: center;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  background: var(--bg-lighter);
  border: 3px solid var(--accent-blue);
  margin-bottom: 10px;
}

.profile-avatar-upload {
  font-size: 12px;
  color: var(--text-link);
  cursor: pointer;
}

.profile-avatar-upload:hover {
  color: var(--accent-blue-hover);
}

.profile-info {
  flex: 1;
}

.profile-info h1 {
  font-size: 26px;
  margin-bottom: 4px;
}

.profile-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(26,159,255,0.15);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 10px;
}

.profile-xp-bar {
  width: 200px;
  height: 6px;
  background: var(--bg-lighter);
  border-radius: 3px;
  margin-bottom: 14px;
  overflow: hidden;
}

.profile-xp-fill {
  height: 100%;
  background: var(--gradient-blue);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.profile-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.profile-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.profile-stat-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
}

.profile-stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-blue);
}

.profile-stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.profile-edit-section {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.profile-edit-section h2 {
  font-size: 18px;
  margin-bottom: 20px;
}

/* ========================================
   WALLET
   ======================================== */

.wallet-page {
  max-width: 600px;
  margin: 0 auto;
}

.wallet-balance-card {
  padding: 32px;
  background: var(--gradient-blue);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-glow);
}

.wallet-label {
  display: block;
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.wallet-amount {
  font-size: 40px;
  font-weight: 800;
}

.wallet-topup {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.wallet-topup h3 {
  margin-bottom: 16px;
  font-size: 16px;
}

.topup-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.topup-btn {
  padding: 10px 20px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.topup-btn:hover {
  border-color: var(--accent-green);
  background: rgba(76,175,80,0.1);
  color: var(--accent-green);
}

.topup-custom {
  display: flex;
  gap: 8px;
}

.topup-custom input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

.topup-custom input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.transactions-section {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.transactions-section h3 {
  margin-bottom: 16px;
  font-size: 16px;
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-medium);
  border-radius: var(--radius-md);
}

.transaction-desc {
  font-size: 14px;
}

.transaction-date {
  font-size: 12px;
  color: var(--text-muted);
}

.transaction-amount {
  font-size: 14px;
  font-weight: 700;
}

.transaction-amount.positive { color: var(--accent-green); }
.transaction-amount.negative { color: var(--accent-red); }

/* ========================================
   CART
   ======================================== */

.cart-items {
  max-width: 700px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.cart-item-image {
  width: 120px;
  height: 60px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-lighter);
  font-size: 28px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.cart-item-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.cart-item-price {
  font-size: 16px;
  font-weight: 700;
}

.cart-item-remove {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px;
  transition: var(--transition);
}

.cart-item-remove:hover {
  color: var(--accent-red);
}

.cart-summary {
  max-width: 700px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.cart-total {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  gap: 8px;
}

.cart-empty {
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
  font-size: 16px;
}

/* ========================================
   WISHLIST
   ======================================== */

.wishlist-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.wishlist-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.wishlist-item-image {
  width: 80px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-lighter);
  font-size: 24px;
  flex-shrink: 0;
}

.wishlist-item-info {
  flex: 1;
}

.wishlist-item-info h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.wishlist-actions {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

/* ========================================
   SETTINGS
   ======================================== */

.settings-content {
  max-width: 600px;
}

.settings-section {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.settings-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.setting-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.setting-toggle input {
  accent-color: var(--accent-blue);
  width: 18px;
  height: 18px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.setting-row label {
  font-size: 14px;
  color: var(--text-secondary);
}

.setting-row select {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: slideIn 0.3s ease;
  max-width: 350px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success {
  border-left: 3px solid var(--accent-green);
}

.toast.error {
  border-left: 3px solid var(--accent-red);
}

.toast.info {
  border-left: 3px solid var(--accent-blue);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(24px); }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
  .library-layout,
  .friends-layout {
    grid-template-columns: 1fr;
  }
  
  .featured-carousel {
    grid-template-columns: 1fr;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .game-detail-header {
    flex-direction: column;
  }

  .game-detail-image {
    width: 100%;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .store-search-bar {
    flex-wrap: wrap;
  }

  .main-nav {
    gap: 0;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 11px;
  }
}

/* ========================================
   GAME EMOJI BACKGROUNDS
   ======================================== */

.game-emoji-bg {
  background: linear-gradient(135deg, #1a2332 0%, #0d1520 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Default avatar placeholder */
.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-blue);
  color: white;
  font-weight: 800;
  font-size: 20px;
}

/* Tab section styles for profile */
.profile-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
}

.profile-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.profile-tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.profile-tab:hover {
  color: var(--text-primary);
}

.profile-tab-content {
  display: none;
}

.profile-tab-content.active {
  display: block;
}

/* Game colors for variety */
.game-color-1 { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
.game-color-2 { background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%); }
.game-color-3 { background: linear-gradient(135deg, #2d132c 0%, #1a1a2e 100%); }
.game-color-4 { background: linear-gradient(135deg, #1b2631 0%, #17202a 100%); }
.game-color-5 { background: linear-gradient(135deg, #1a2332 0%, #0f172a 100%); }
.game-color-6 { background: linear-gradient(135deg, #162447 0%, #1f4068 100%); }

/* ========================================
   STORE BANNER & MARQUEE
   ======================================== */

.store-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.banner-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.banner-slide {
  min-width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 48px;
  position: relative;
  overflow: hidden;
}

.banner-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,255,255,0.05) 0%, transparent 60%);
}

.banner-slide-content {
  position: relative;
  z-index: 2;
  max-width: 60%;
}

.banner-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  color: white;
}

.banner-slide-content h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.banner-slide-content p {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 14px;
  line-height: 1.5;
  max-width: 500px;
}

.banner-price {
  display: flex;
  align-items: center;
  gap: 10px;
}

.banner-discount {
  background: var(--accent-green);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 16px;
}

.banner-old-price {
  color: rgba(255,255,255,0.5);
  text-decoration: line-through;
  font-size: 14px;
}

.banner-new-price {
  color: white;
  font-size: 22px;
  font-weight: 800;
}

.banner-free {
  color: var(--accent-green);
  font-size: 20px;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(76,175,80,0.5);
}

.banner-slide-emoji {
  font-size: 100px;
  position: relative;
  z-index: 2;
  animation: bannerEmojiBounce 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
}

@keyframes bannerEmojiBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.05); }
}

.banner-controls {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 5;
}

.banner-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.banner-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

.banner-dots {
  display: flex;
  gap: 8px;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: var(--transition);
}

.banner-dot.active {
  background: white;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.banner-marquee {
  background: linear-gradient(90deg, var(--accent-blue), #6c5ce7, var(--accent-blue));
  padding: 8px 0;
  overflow: hidden;
  position: relative;
}

.marquee-track {
  display: flex;
  animation: marqueeScroll 30s linear infinite;
  white-space: nowrap;
}

.marquee-track span {
  font-size: 13px;
  font-weight: 700;
  color: white;
  letter-spacing: 1px;
  padding: 0 40px;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========================================
   GAME OVERLAY (Snake + Minigame)
   ======================================== */

.game-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  animation: fadeIn 0.3s ease;
}

.game-overlay-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  min-width: 600px;
}

.game-overlay-header h2 {
  font-size: 18px;
  flex: 1;
}

.game-overlay-stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
}

.game-overlay canvas {
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #0a0a0a;
  box-shadow: 0 0 40px rgba(26,159,255,0.15);
}

.game-overlay-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ========================================
   FRIEND PROFILE MODAL
   ======================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  padding: 32px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-lighter);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.modal-close:hover {
  background: var(--accent-red);
  color: white;
}

.fp-header {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.fp-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 3px solid var(--accent-blue);
  background: var(--bg-lighter);
}

.fp-info h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.fp-info .fp-status {
  font-size: 13px;
  margin-bottom: 8px;
}

.fp-info .fp-status.online { color: var(--accent-green); }
.fp-info .fp-status.offline { color: var(--text-muted); }

.fp-info .fp-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 8px;
}

.fp-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.fp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.fp-stat {
  padding: 12px;
  background: var(--bg-medium);
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-color);
}

.fp-stat .val {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-blue);
}

.fp-stat .lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.fp-section {
  margin-bottom: 20px;
}

.fp-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fp-game-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fp-game-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-medium);
  border-radius: var(--radius-md);
}

.fp-game-item .fp-game-icon {
  font-size: 24px;
}

.fp-game-item .fp-game-info {
  flex: 1;
}

.fp-game-item .fp-game-info h4 {
  font-size: 14px;
}

.fp-game-item .fp-game-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.fp-ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.fp-ach-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,215,0,0.05);
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: var(--radius-md);
}

.fp-ach-item .icon {
  font-size: 22px;
}

.fp-ach-item .info h4 {
  font-size: 13px;
}

.fp-ach-item .info p {
  font-size: 11px;
  color: var(--text-muted);
}

/* ========================================
   CALL OVERLAY
   ======================================== */

.call-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0a0e17 0%, #1a2332 50%, #0f1923 100%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.call-container {
  text-align: center;
}

.call-avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.call-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-blue);
  position: relative;
  z-index: 2;
  background: var(--bg-lighter);
}

.call-pulse {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 3px solid var(--accent-blue);
  animation: callPulse 2s ease-in-out infinite;
}

@keyframes callPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

.call-container h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.call-status {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 8px;
  animation: callDots 1.5s ease-in-out infinite;
}

@keyframes callDots {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.call-timer {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-green);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}

.call-actions {
  margin-top: 32px;
}

.call-btn {
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.call-hangup {
  background: var(--accent-red);
  color: white;
}

.call-hangup:hover {
  background: #c0392b;
  transform: scale(1.05);
}

/* ========================================
   WALLET MINIGAME SECTION
   ======================================== */

.wallet-minigame-section {
  padding: 24px;
  background: linear-gradient(135deg, rgba(255,215,0,0.05), rgba(26,159,255,0.05));
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  text-align: center;
}

/* ========================================
   EMOJI PICKER
   ======================================== */

.chat-emoji-picker {
  position: absolute;
  bottom: 60px;
  left: 16px;
  right: 16px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  z-index: 50;
  animation: fadeIn 0.2s ease;
}

.emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}

.emoji-item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.emoji-item:hover {
  background: var(--bg-hover);
  transform: scale(1.2);
}

.emoji-toggle-btn {
  font-size: 18px !important;
  padding: 8px 10px !important;
  min-width: 40px;
}

/* ========================================
   BANNER CLICKABLE HOVER
   ======================================== */

.banner-slide[data-banner-game]:hover,
.banner-slide[data-banner-action]:hover {
  filter: brightness(1.1);
}

.banner-slide[data-banner-game]::after,
.banner-slide[data-banner-action]::after {
  content: 'Нажмите, чтобы перейти →';
  position: absolute;
  bottom: 14px;
  right: 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.banner-slide[data-banner-game]:hover::after,
.banner-slide[data-banner-action]:hover::after {
  opacity: 1;
}
