
* { margin:0; padding:0; box-sizing: border-box; }
body {
  background: #1c1e24;
  background: linear-gradient(180deg, #202226 0%, #17181c 100%);
  color: #e8e8ea;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  min-height: 100vh;
}

/* ===== TOPBAR ===== */
.topbar {
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 28px;
  background: rgba(30,32,38,0.9);
  border-bottom: 1px solid #2c2e35;
  position: sticky; top:0; z-index: 50;
  backdrop-filter: blur(6px);
}
.logo { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.logo span { color: #ffb800; }
.back-link {
  color: #cfd2d8; text-decoration:none; font-weight:600; font-size: 14px;
  padding: 8px 14px; border: 1px solid #3a3d45; border-radius: 8px;
  transition: 0.2s;
}
.back-link:hover { background:#2a2d34; color:#fff; }
.case-title-top { font-size: 17px; font-weight:700; color:#fff; }
.balance-box {
  display:flex; flex-direction:column; align-items:flex-end;
  background:#25272e; padding:8px 16px; border-radius:10px; border:1px solid #34363d;
}
.balance-label { font-size: 10px; color:#8a8d94; letter-spacing: 0.5px; }
.balance-value { font-size: 16px; font-weight:800; color:#4ade80; }

/* ===== HOME ===== */
.home-wrap { max-width: 1200px; margin: 0 auto; padding: 50px 24px; text-align:center; }
.home-title { font-size: 34px; font-weight:800; margin-bottom: 8px; }
.home-sub { color:#9a9da4; margin-bottom: 40px; font-size: 15px; }

.case-grid {
  display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.case-card {
  background: #24262c;
  border: 1px solid #33353c;
  border-radius: 16px;
  padding: 22px 16px;
  cursor:pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-align:center;
}
.case-card:hover {
  transform: translateY(-6px);
  border-color: #ffb800;
  box-shadow: 0 10px 30px rgba(255,184,0,0.15);
}
.case-card img { width: 100%; max-height: 160px; object-fit: contain; margin-bottom: 14px; }
.case-card .cname { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.case-card .cprice { color:#ffb800; font-weight:700; font-size: 14px; }

/* ===== HOVER INFO BAR (case page top) ===== */
.hover-info-bar {
  display:flex; align-items:center; justify-content:center; gap: 30px;
  min-height: 54px;
  background:#1a1b1f; border-bottom: 1px solid #2c2e35;
  font-size: 14px; color: #cfd2d8;
}
.hover-placeholder { color:#6b6e75; font-size: 13px; }
.hover-info-bar .h-name { font-weight:700; color:#fff; }
.hover-info-bar .h-price { color:#4ade80; font-weight:700; }
.hover-info-bar .h-chance { color:#ffb800; font-weight:700; }

/* ===== ROULETTE ===== */
.roulette-section { padding: 30px 0; background:#181a1e; border-bottom: 1px solid #2c2e35; }
.roulette-viewport {
  position: relative; max-width: 1000px; margin: 0 auto;
  height: 190px; overflow: hidden;
  background:#20222a; border-radius: 12px; border: 1px solid #2f313a;
}
.roulette-pointer {
  position:absolute; left:50%; top:0; bottom:0; width:2px;
  background: #ffb800; z-index: 10; transform: translateX(-50%);
}
.roulette-pointer::before, .roulette-pointer::after {
  content:''; position:absolute; left:50%; transform:translateX(-50%);
  border: 8px solid transparent;
}
.roulette-pointer::before { top:-2px; border-top-color:#ffb800; }
.roulette-pointer::after { bottom:-2px; border-bottom-color:#ffb800; }

.roulette-track {
  display:flex; align-items:center; height:100%;
  position: absolute; left:0; top:0;
  transition: none;
  will-change: transform;
}
.roulette-item {
  flex: 0 0 150px; height: 160px; margin: 0 6px;
  border-radius: 10px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding: 10px; text-align:center; position:relative;
  border: 1px solid rgba(255,255,255,0.06);
}
.roulette-item img { width: 90px; height: 68px; object-fit: contain; margin-bottom: 8px; }
.roulette-item .r-name { font-size: 11px; font-weight:700; color:#fff; line-height:1.2; }
.roulette-item.rarity-blue { background: linear-gradient(180deg, rgba(75,120,255,0.15), rgba(75,120,255,0.03)); }
.roulette-item.rarity-purple { background: linear-gradient(180deg, rgba(150,75,255,0.18), rgba(150,75,255,0.03)); }
.roulette-item.rarity-pink { background: linear-gradient(180deg, rgba(230,75,220,0.18), rgba(230,75,220,0.03)); }
.roulette-item.rarity-red { background: linear-gradient(180deg, rgba(255,70,70,0.2), rgba(255,70,70,0.03)); }
.roulette-item.rarity-gold { background: linear-gradient(180deg, rgba(255,200,0,0.25), rgba(255,200,0,0.04)); }

/* ===== CONTROLS ===== */
.controls-bar {
  display:flex; flex-direction:column; align-items:center; gap: 12px;
  padding: 24px; background:#181a1e; border-bottom: 1px solid #2c2e35;
}
.open-buttons { display:flex; gap: 14px; flex-wrap: wrap; justify-content:center; }
.btn-open {
  background: #ffb800; color:#1a1a1a; font-weight:800; border:none;
  padding: 14px 26px; border-radius: 10px; font-size: 14px; cursor:pointer;
  transition: 0.2s; display:flex; align-items:center; gap:8px;
}
.btn-open:hover { background:#ffc933; transform: translateY(-2px); }
.btn-open:disabled { opacity:0.5; cursor:not-allowed; transform:none; }
.price-tag { background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius:6px; font-size:12px; }
.btn-demo { background: #2f3138; color:#e8e8ea; border: 1px solid #444750; }
.btn-demo:hover { background:#3a3d45; }
.btn-skip {
  background: #ffb800; color:#1a1a1a; font-weight:800; border:none;
  padding: 10px 20px; border-radius: 8px; cursor:pointer; font-size: 13px;
}

/* ===== CONTENTS ===== */
.contents-section { max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; }
.contents-title { font-size: 22px; font-weight:800; margin-bottom: 20px; }
.contents-grid {
  display:grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.content-item {
  background:#24262c; border:1px solid #33353c; border-radius: 12px;
  padding: 14px; text-align:center; cursor:default; position:relative;
  transition: 0.2s;
}
.content-item:hover { border-color:#ffb800; transform: translateY(-4px); }
.content-item img { width:100%; height:80px; object-fit:contain; margin-bottom:10px; }
.content-item .ci-name { font-size:12px; font-weight:700; color:#fff; }
.content-item .ci-wear { font-size: 11px; color:#9a9da4; margin: 2px 0 6px; }
.content-item .ci-price { font-size: 13px; color:#4ade80; font-weight:700; }
.content-item .ci-chance { position:absolute; top:8px; right:10px; font-size:11px; color:#ffb800; font-weight:700; }
.content-item.rarity-blue { border-color: #4b78ff55; }
.content-item.rarity-purple { border-color: #964bff55; }
.content-item.rarity-pink { border-color: #e64bdc55; }
.content-item.rarity-red { border-color: #ff464655; }
.content-item.rarity-gold { border-color: #ffc80088; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset:0; background: rgba(0,0,0,0.7);
  display:flex; align-items:center; justify-content:center; z-index: 100;
}
.modal-box {
  background: #21232a; border: 1px solid #33353c; border-radius: 16px;
  width: 360px; padding: 22px; text-align:center; position:relative;
}
.modal-header { display:flex; align-items:center; gap: 12px; text-align:left; margin-bottom: 18px; }
.trophy-icon { font-size: 26px; }
.modal-title { font-weight:800; font-size: 16px; }
.modal-sub { font-size: 11px; color:#9a9da4; }
.modal-close {
  position:absolute; top:14px; right:14px; background:#2c2e35; border:none; color:#e8e8ea;
  width:28px; height:28px; border-radius:8px; font-size:16px; cursor:pointer;
}
.modal-item-image { background:#181a1e; border-radius:12px; padding: 20px; margin-bottom: 14px; }
.modal-item-image img { width:100%; max-height:150px; object-fit:contain; }
.modal-item-name { font-weight:800; font-size: 16px; }
.modal-item-wear { color:#9a9da4; font-size: 13px; margin: 4px 0 8px; }
.modal-item-price { color:#4ade80; font-weight:800; font-size: 18px; margin-bottom: 14px; }
.modal-note {
  background: rgba(75,150,255,0.1); border: 1px solid rgba(75,150,255,0.3);
  border-radius: 10px; padding: 10px; font-size: 12px; color:#a9c8ff; margin-bottom: 16px;
}
.btn-close-modal {
  width:100%; padding: 12px; background:#2c2e35; border:none; border-radius:10px;
  color:#e8e8ea; font-weight:700; cursor:pointer;
}
.btn-close-modal:hover { background:#3a3d45; }

@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .case-title-top { order: 3; width:100%; text-align:center; }
}
