/* ========================================
   SkinClaim — Личный кабинет
   ======================================== */

:root {
  --bg: #0f1419;
  --surface: #1a2028;
  --surface-hover: #232b36;
  --border: #2a3441;
  --text: #e6e8eb;
  --text-muted: #8b95a5;
  --accent: #4ade80;
  --accent-dark: #22c55e;
  --accent-orange: #f97316;
  --accent-orange-dark: #ea580c;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}

/* Main */
.main {
  padding: 32px 0 48px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border-color: #3a4556;
}

.card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.25), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.thumb {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background: #141a22;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.thumb img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.mult {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ref {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.weapon {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1px;
}

.name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.quality {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 2px;
}

.type {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.floats {
  font-size: 0.68rem;
  color: #5a6575;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Quality colors */
.q-factory-new { background: #1b3a2a; color: #4ade80; }
.q-minimal-wear { background: #1a2e1a; color: #22c55e; }
.q-field-tested { background: #3a2e1a; color: #fbbf24; }
.q-well-worn { background: #3a1a1a; color: #f87171; }
.q-battle-scarred { background: #2a1a2a; color: #a78bfa; }

/* Selected skin panel */
.selected-skin-panel {
  display: none;
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.selected-skin-panel.active {
  display: flex;
}

.selected-skin-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.selected-skin-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #141a22;
  border-radius: var(--radius-sm);
  padding: 6px;
}

.selected-skin-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.selected-skin-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.selected-skin-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.selected-skin-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
}

/* Withdraw button */
.withdraw-btn {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 48px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
}

.withdraw-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 6px 24px rgba(249, 115, 22, 0.45);
}

.withdraw-btn:active {
  transform: translateY(0);
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--text);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.modal-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-ok {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #0f1419;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 36px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  text-transform: uppercase;
}

.modal-ok:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Responsive */
@media (max-width: 1280px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .selected-skin-panel { flex-direction: column; align-items: stretch; text-align: center; }
  .selected-skin-info { justify-content: center; }
  .withdraw-btn { width: 100%; }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .logo { font-size: 1.2rem; }
  .thumb { height: 90px; }
}

@media (max-width: 340px) {
  .grid { grid-template-columns: 1fr; }
}
