@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

:root {
  --bg-dark: #080b11;
  --bg-panel: #0f131a;
  --bg-card: #151b26;
  --bg-input: #1d2433;
  --border: #232d3f;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --danger: #ef4444;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.logo { text-align: center; margin-bottom: 32px; }
.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 14px;
  font-size: 26px;
  margin-bottom: 16px;
}
.logo-icon.small { width: 36px; height: 36px; font-size: 18px; margin: 0; }
.logo h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.logo p { color: var(--text-muted); font-size: 14px; }

.input-group { margin-bottom: 20px; }
.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.input-group input, .chest-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.2s ease;
}

.input-group input:focus, .chest-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-primary, .btn-secondary, .btn-danger {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-main); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: var(--danger); color: white; }

.error-msg { color: var(--danger); font-size: 13px; margin-top: 12px; text-align: center; }

.dashboard { max-width: 1400px; width: 100%; margin: 0 auto; padding: 40px 24px; }

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-right { display: flex; gap: 12px; }

.notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}
.notification.show { transform: translateY(0); opacity: 1; }
.notification.success { background: var(--success); }
.notification.error { background: var(--danger); }

.shop-section { margin-bottom: 48px; }
.section-header { margin-bottom: 20px; }
.buy-header h2 { color: var(--warning); font-size: 18px; margin-bottom: 4px; }
.sell-header h2 { color: var(--success); font-size: 18px; margin-bottom: 4px; }
.section-desc { color: var(--text-muted); font-size: 14px; }

.chest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.chest-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.2s ease;
}

.chest-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
}

.chest-coords {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: monospace;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 8px;
  width: fit-content;
}

.chest-card.modified .chest-input {
  border-color: var(--success);
  box-shadow: 0 0 0 3px var(--success-glow);
}

.current-item {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.current-item strong { color: var(--text-main); font-weight: 600; }

@media (max-width: 768px) {
  .dashboard { padding: 20px 16px; }
  header { flex-direction: column; align-items: stretch; gap: 20px; }
  .header-right { flex-direction: column; }
}
