* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0f0f1a;
  --accent: #ff5722;
  --accent2: #7c4dff;
  --bg: #0a0a1a;
  --card-bg: rgba(255,255,255,0.04);
  --text: #ffffff;
  --text-light: #8888aa;
  --radius: 16px;
  --glow: 0 0 20px rgba(124,77,255,0.3);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated background gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(124,77,255,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(255,87,34,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(0,200,255,0.05) 0%, transparent 50%);
  z-index: -1;
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Header */
header {
  position: sticky;
  top: 0;
  background: rgba(15,15,26,0.9);
  backdrop-filter: blur(12px);
  color: #fff;
  z-index: 100;
  border-bottom: 1px solid rgba(124,77,255,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a {
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover { color: #fff; }

.cart-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s;
}

.cart-btn:hover { background: #e64a19; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f0f2e 0%, #1a0a3e 50%, #0a1a2e 100%);
  color: #fff;
  padding: 8rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E");
  animation: heroScroll 20s linear infinite;
}

@keyframes heroScroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-60px); }
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #7c4dff 50%, #ff5722 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero p {
  font-size: 1.2rem;
  color: #aab;
  margin-bottom: 2rem;
  position: relative;
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8a50 100%);
  color: #fff;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255,87,34,0.3);
  position: relative;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255,87,34,0.5);
}

/* Products */
.products-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.products-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid #ddd;
  background: #fff;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-card .card-image {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: #f0f0f0;
}

.product-card .card-info {
  padding: 1rem;
}

.product-card .card-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.product-card .card-info .price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.15rem;
}

.product-card .card-info .tag {
  display: inline-block;
  background: #eee;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border-radius: var(--radius);
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.modal-body {
  display: flex;
  gap: 2rem;
}

.modal-image {
  flex: 0 0 200px;
  height: 200px;
  background: #f0f0f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}

.modal-info { flex: 1; }
.modal-info h2 { margin-bottom: 0.5rem; }

.modal-price {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.modal-desc {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.modal-options {
  margin-bottom: 1rem;
}

.modal-options label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.modal-options select {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}

/* Cart Sidebar */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 200;
}

.cart-overlay.open { display: block; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  z-index: 201;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item-emoji { font-size: 2rem; }

.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.95rem; }
.cart-item-info .cart-item-detail { font-size: 0.8rem; color: var(--text-light); }

.cart-item-price {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 1.2rem;
}

.cart-item-remove:hover { color: #e53935; }

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid #eee;
}

.cart-total {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cart-empty {
  text-align: center;
  color: var(--text-light);
  padding: 3rem 0;
}

/* Checkout */
.checkout-modal { max-width: 500px; }

#checkout-form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
}

#checkout-form input,
#checkout-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}

#checkout-form textarea { resize: vertical; min-height: 80px; }

.checkout-summary {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.order-confirmation {
  text-align: center;
  padding: 2rem 0;
}

.order-confirmation h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.9rem;
  border-top: 1px solid rgba(124,77,255,0.15);
  margin-top: 3rem;
  background: rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .modal-body { flex-direction: column; }
  .modal-image { flex: none; width: 100%; height: 150px; }
}

/* Sigmooples Badge */
.sigmooples-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,165,0,0.1));
  border: 2px solid rgba(255,215,0,0.4);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-weight: 600;
  color: #ffd700;
  font-size: 0.95rem;
  cursor: help;
  box-shadow: 0 0 12px rgba(255,215,0,0.15);
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%,100% { box-shadow: 0 0 12px rgba(255,215,0,0.15); }
  50% { box-shadow: 0 0 20px rgba(255,215,0,0.3); }
}

.sigmooples-label {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Hero Updates */
.hero-sub {
  font-size: 1rem;
  color: #ffd700;
  margin-top: 0.5rem;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: #fff;
}

.btn-outline:hover {
  background: var(--accent);
}

/* Games Section */
.games-section {
  background: transparent;
  padding: 4rem 2rem;
  color: #fff;
}

.games-section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.games-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff, #7c4dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.games-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #8888aa;
  margin-bottom: 1.5rem;
}

.sigmooples-rate-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.sigmooples-rate-info span {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.game-frame-wrapper {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.game-frame-header {
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.game-frame-balance {
  color: #ffd700;
}

#game-iframe,
#game-iframe-breakout,
#game-iframe-bugjump,
#game-iframe-gravity,
#game-iframe-bowling,
#game-iframe-tetris,
#game-iframe-spaceshooter,
#game-iframe-monsterbrawl,
#game-iframe-asteroids,
#game-iframe-td,
#game-iframe-gemrush,
#game-iframe-snake {
  width: 100%;
  height: 750px;
  border: none;
  display: block;
}

.game-frame-footer {
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.last-reward-msg {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  color: #0f0;
}

.game-tip {
  font-size: 0.9rem;
  color: #999;
  margin: 0;
}

/* Payment Section */
.payment-section {
  margin: 1.5rem 0;
}

.payment-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.payment-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.payment-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #ddd;
  background: #f9f9f9;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.payment-tab:hover {
  border-color: var(--accent);
}

.payment-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.payment-panel {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
}

.card-input-wrap {
  position: relative;
}

.card-type-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

.card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.card-security-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}

/* Sigmooples Payment Panel */
.smg-payment-info {
  font-size: 1rem;
}

.smg-balance-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #ddd;
}

.smg-balance-row:last-of-type {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.1rem;
}

.smg-balance-val {
  color: #ffa500;
  font-weight: 600;
}

.smg-insufficient {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  color: #c00;
}

.smg-play-link {
  color: #0066cc;
  text-decoration: underline;
  font-weight: 600;
}

.smg-rate-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #666;
}

/* Order Confirmation */
.order-confirm-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .sigmooples-rate-info {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  #game-iframe {
    height: 400px;
  }
  
  .payment-tabs {
    flex-direction: column;
  }
  
  .card-row {
    grid-template-columns: 1fr;
  }
}

/* Product image (photo) */
.card-image--photo {
  padding: 0;
  background: #fff;
}

.card-image--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-image--photo {
  background: #fff;
  padding: 0;
  overflow: hidden;
}

.modal-image--photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Canvas mockup containers */
.card-image--canvas {
  padding: 0;
  background: #f0f0f0;
}

.product-mockup-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-image--canvas {
  background: #f0f0f0;
  padding: 0;
  overflow: hidden;
}

.modal-image--canvas .product-mockup-canvas {
  width: 100%;
  height: 100%;
}

/* Stats / Visitor Counter Section */
.stats-section {
  background: rgba(124,77,255,0.03);
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(124,77,255,0.1);
}

.stats-inner {
  max-width: 500px;
  margin: 0 auto;
}

.stats-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.stats-subtitle {
  color: #aaa;
  margin-bottom: 2rem;
}

.stats-counter-wrap {
  display: inline-block;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 2rem 3rem;
  margin-bottom: 1rem;
}

.stats-counter {
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent2);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(124,77,255,0.5);
}

.stats-counter-label {
  font-size: 0.95rem;
  color: #aaa;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stats-note {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Wide checkout layout */
.checkout-modal--wide {
  max-width: 820px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.checkout-left h3,
.checkout-right .payment-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checkout-left .checkout-summary {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.9rem;
  height: 100%;
  min-height: 120px;
}

@media (max-width: 600px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

/* History button */
.history-btn {
  background: rgba(124,77,255,0.1);
  color: #bbb;
  border: 1px solid rgba(124,77,255,0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}
.history-btn:hover {
  background: rgba(124,77,255,0.2);
  color: #fff;
  border-color: rgba(124,77,255,0.5);
  box-shadow: 0 0 12px rgba(124,77,255,0.2);
}

/* History items */
.history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.history-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.history-info {
  flex: 1;
  min-width: 0;
}
.history-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-date {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.1rem;
}
.history-amount {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.history-amount--order { color: #e53935; }
.history-amount--smg   { color: #ffa500; }

/* Header logo image */
.header-logo-img {
  height: 36px;
  width: 36px;
  object-fit: cover;
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 0.4rem;
}

/* Prototype banner */
.prototype-banner {
  background: linear-gradient(90deg, #ff5722, #ff8a50, #ff5722);
  background-size: 200% 100%;
  animation: bannerShift 3s linear infinite;
  color: #fff;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

@keyframes bannerShift {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* Skins Shop */
.skins-shop {
  background: rgba(0,0,0,0.3);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.skins-shop h3 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.skins-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.skins-tab {
  padding: 0.6rem 1.5rem;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #ccc;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.skins-tab:hover { border-color: var(--accent); color: #fff; }
.skins-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.skin-card {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s;
}

.skin-card:hover {
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.skin-card--equipped {
  border-color: var(--accent);
  background: rgba(255,87,34,0.1);
}

.skin-preview {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  border: 2px solid rgba(255,255,255,0.3);
}

.skin-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.skin-desc {
  font-size: 0.75rem;
  color: #aaa;
  margin-bottom: 0.75rem;
}

.skin-btn {
  display: block;
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.skin-btn--equipped {
  background: var(--accent);
  color: #fff;
  cursor: default;
}

.skin-btn--equip {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.skin-btn--equip:hover { background: rgba(255,255,255,0.25); }

.skin-btn--buy {
  background: rgba(255,215,0,0.2);
  color: #ffd700;
  border: 1px solid rgba(255,215,0,0.4);
}
.skin-btn--buy:hover { background: rgba(255,215,0,0.3); }

.skin-btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Login Screen */
.login-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0a0a2e 0%, #1a0a3e 50%, #0f0f2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.login-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(124,77,255,0.2);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(124,77,255,0.1);
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--accent);
}

.login-box h1 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.login-box p {
  color: #aaa;
  margin-bottom: 1.5rem;
}

.login-box input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.login-box input::placeholder { color: #666; }

.login-box .btn {
  width: 100%;
}

.login-msg {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.4em;
  color: #ff4444;
}

/* Kicked Screen */
.kicked-screen {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.kicked-box {
  text-align: center;
  padding: 3rem;
}

.kicked-box h1 {
  color: #ff2222;
  font-size: 4rem;
  margin-bottom: 1rem;
}

.kicked-box p {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.kicked-sub {
  color: #666;
  font-size: 1rem;
}

/* Promo Pass */
.promo-section {
  margin-top: 3rem;
  background: rgba(255,215,0,0.05);
  border: 2px solid rgba(255,215,0,0.2);
  border-radius: 15px;
  padding: 2rem;
}

.promo-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.promo-header h3 {
  font-size: 1.5rem;
  color: #ffd700;
  margin-bottom: 0.5rem;
}

.promo-desc {
  color: #aaa;
  font-size: 0.95rem;
}

.promo-locked {
  text-align: center;
  padding: 2rem 0;
}

.promo-lock-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.promo-locked p {
  color: #ccc;
  margin-bottom: 1rem;
}

.promo-input-row {
  display: flex;
  gap: 0.5rem;
  max-width: 350px;
  margin: 0 auto;
}

.promo-input-row input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255,215,0,0.3);
  background: rgba(0,0,0,0.3);
  color: #fff;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: monospace;
}

.promo-input-row input::placeholder { color: #666; }

.promo-msg {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.4em;
}

.promo-unlocked-msg {
  text-align: center;
  color: #00ff88;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

#game-iframe-asteroids,
#game-iframe-td {
  width: 100%;
  height: 750px;
  border: none;
  display: block;
}

/* Super Promo */
.super-promo-section {
  border-color: rgba(180,100,255,0.3);
  background: rgba(180,100,255,0.05);
  margin-top: 2rem;
}

.super-promo-section .promo-header h3 {
  color: #cc66ff;
}

/* Username display */
.username-display {
  color: #aaa;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Login tabs */
.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}

.login-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.05);
  color: #aaa;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.login-tab.active {
  background: var(--accent);
  color: #fff;
}

.login-tab:hover:not(.active) {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.login-box input[type="password"] {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.login-box input[type="password"]::placeholder { color: #666; }

/* Friends panel */
.friends-add {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem 0;
}

.friends-add input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
}

.friend-msg {
  padding: 0.25rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 1.4em;
}

.friend-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 0 0.25rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 0.5rem;
}

/* Sword Clash Animation */
.sword-clash-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.9);
  animation: clashFade 1.8s ease forwards;
  pointer-events: none;
}

@keyframes clashFade {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

.sword-clash-explosion {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffcc00 0%, #ff4400 40%, transparent 70%);
  animation: explode 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes explode {
  0% { transform: scale(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

.sword-left, .sword-right {
  position: absolute;
  font-size: 5rem;
  animation-duration: 0.4s;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1.2);
}

.sword-left {
  animation-name: swordFromLeft;
}

.sword-right {
  animation-name: swordFromRight;
  transform: scaleX(-1);
}

@keyframes swordFromLeft {
  0% { transform: translateX(-200px) rotate(-45deg); opacity: 0; }
  60% { transform: translateX(-10px) rotate(15deg); opacity: 1; }
  100% { transform: translateX(-10px) rotate(10deg); opacity: 1; }
}

@keyframes swordFromRight {
  0% { transform: translateX(200px) rotate(45deg) scaleX(-1); opacity: 0; }
  60% { transform: translateX(10px) rotate(-15deg) scaleX(-1); opacity: 1; }
  100% { transform: translateX(10px) rotate(-10deg) scaleX(-1); opacity: 1; }
}

.clash-text {
  position: absolute;
  top: 60%;
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px #ff4400, 0 0 40px #ffcc00;
  animation: clashTextPop 0.5s ease 0.3s both;
  letter-spacing: 3px;
}

@keyframes clashTextPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.clash-sparks {
  position: absolute;
  width: 0;
  height: 0;
}

.clash-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: sparkFly 0.7s ease-out 0.2s forwards;
  opacity: 0;
}

@keyframes sparkFly {
  0% { transform: translate(0, 0); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)); opacity: 0; }
}

/* Challenge cards */
.challenge-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.challenge-card--pending { border-color: rgba(255,200,0,0.3); }
.challenge-card--active { border-color: rgba(0,200,255,0.3); background: rgba(0,200,255,0.05); }
.challenge-card--done { border-color: rgba(100,100,100,0.2); }

.challenge-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.challenge-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.challenge-info {
  flex: 1;
  font-size: 0.9rem;
  color: #fff;
}

.challenge-detail {
  color: #aaa;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.challenge-status {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #64c8ff;
}

.challenge-result {
  margin-top: 0.3rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.challenge-actions {
  margin-top: 0.75rem;
  text-align: right;
}

.challenge-actions .btn {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
}

/* Party panel */
.party-section {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
}

.party-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.party-panel {
  padding: 0.5rem 0;
}

.party-code-display {
  text-align: center;
  background: #f0f0f0;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.party-code-big {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--accent);
  font-family: monospace;
}

.party-code-label {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}

.party-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.party-player-name {
  flex: 1;
  font-weight: 600;
}

.party-player-score {
  font-weight: 700;
  color: var(--accent);
}

.party-player-waiting {
  color: #aaa;
  font-style: italic;
  font-size: 0.85rem;
}

.party-status-bar {
  text-align: center;
  padding: 0.75rem;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.party-winner {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  border-radius: 12px;
  color: #000;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Messages */
.unread-badge {
  background: #ff3333;
  color: #fff;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.3rem;
  font-weight: 700;
}

.msg-chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
  font-weight: 700;
}

.msg-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.msg-bubble {
  max-width: 75%;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  word-wrap: break-word;
}

.msg-bubble--mine {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-bubble--theirs {
  align-self: flex-start;
  background: #f0f0f0;
  color: #222;
  border-bottom-left-radius: 4px;
}

.msg-bubble-time {
  font-size: 0.7rem;
  color: #999;
  margin-top: 0.2rem;
}

.msg-chat-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #eee;
}

.msg-chat-input input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 0.9rem;
}

.msg-unread-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.msg-unread-item:hover { background: #f9f9f9; }

/* Game Selector Grid */
.game-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.game-select-card {
  background: rgba(124,77,255,0.06);
  border: 2px solid rgba(124,77,255,0.15);
  border-radius: 20px;
  padding: 1.8rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1.2);
  position: relative;
  overflow: hidden;
}

.game-select-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(124,77,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.game-select-card:hover::before { opacity: 1; }

.game-select-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent2);
  box-shadow: 0 12px 35px rgba(124,77,255,0.3), 0 0 0 1px rgba(124,77,255,0.2);
}

.game-select-card:active {
  transform: translateY(-2px) scale(0.98);
}

.game-select-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.game-select-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.game-select-rate {
  font-size: 0.75rem;
  color: #8888aa;
  background: rgba(255,255,255,0.05);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  display: inline-block;
}

/* Active game frame */
.game-active-frame {
  margin-bottom: 2rem;
}

.game-frame-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.4);
  padding: 0.75rem 1.5rem;
  border-radius: 12px 12px 0 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: none;
}

.game-frame-topbar .btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
}

.game-frame-topbar .btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

#game-iframe {
  width: 100%;
  height: 750px;
  border: none;
  display: block;
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-top: none;
}

/* Message sender name */
.msg-bubble-sender {
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  opacity: 0.7;
}

.msg-bubble--mine .msg-bubble-sender { color: rgba(255,255,255,0.7); }
.msg-bubble--theirs .msg-bubble-sender { color: #555; }

/* Friend cards */
.friend-card {
  background: rgba(124,77,255,0.05);
  border: 1px solid rgba(124,77,255,0.15);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
}

.friend-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.friend-avatar {
  font-size: 1.8rem;
  width: 40px;
  height: 40px;
  background: rgba(124,77,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.friend-details { flex: 1; }

.friend-username {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.friend-stats {
  font-size: 0.8rem;
  color: #8888aa;
  margin-top: 0.15rem;
}

.friend-card-actions {
  display: flex;
  gap: 0.5rem;
}

.friend-card-actions .skin-btn {
  flex: 1;
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
}

/* Game scroll bar */
.game-scroll-wrapper {
  position: relative;
}

.game-scroll-bar {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem 0;
  z-index: 10;
}

.scroll-arrow {
  width: 36px;
  height: 50px;
  background: rgba(124,77,255,0.3);
  border: 1px solid rgba(124,77,255,0.5);
  color: #fff;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin: 0 2px;
}

.scroll-arrow:hover, .scroll-arrow:active {
  background: rgba(124,77,255,0.6);
}
