/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Rajdhani:wght@600;700&display=swap');

/* ===== BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-deep: #020817;
  --bg-card: rgba(15, 23, 50, 0.8);
  --border: rgba(255, 255, 255, 0.06);
  --amber: #f59e0b;
  --blue: #3b82f6;
  --purple: #a855f7;
  --green: #22c55e;
  --red: #ef4444;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(245, 158, 11, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  color: #e2e8f0;
  min-height: 100vh;
}

.font-rajdhani {
  font-family: 'Rajdhani', sans-serif;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9px;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ===== GLASS ===== */
.glass-dark {
  background: rgba(2, 8, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

/* ===== ICON BADGE ===== */
.icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* ===== ICON BUTTON ===== */
.icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border);
  color: #94a3b8;
  transition: all 0.15s ease;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
}

.icon-btn.active {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.3);
}

/* ===== ADD TAB ===== */
.add-tab-btn {
  width: 34px;
  height: 34px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1.5px dashed #334155;
  color: #475569;
  transition: all 0.15s;
  cursor: pointer;
}

.add-tab-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ===== VILLAGE TAB ===== */
.village-tab {
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  position: relative;
}

.village-tab:hover {
  color: #94a3b8;
}

.village-tab.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.15));
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

/* ===== STAT CARD ===== */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
}

.stat-label {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #475569;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 900;
  color: white;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== BUILDER CARD ===== */
.builder-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.builder-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), transparent);
}

.builder-card:hover::before {
  opacity: 1;
}

.builder-card.active {
  border-left: 3px solid var(--blue);
}

.builder-card.done {
  border-left: 3px solid var(--green);
}

.builder-card.empty {
  border-style: dashed;
  opacity: 0.5;
}

.builder-card.empty:hover {
  opacity: 0.8;
}

.builder-card.lab-card.active {
  border-left: 3px solid var(--purple);
}

/* ===== TIMER ===== */
.timer-display {
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #60a5fa;
  line-height: 1.1;
}

.timer-display.done {
  color: #4ade80;
}

.timer-display.lab {
  color: #c084fc;
}

.timer-display.urgent {
  color: #fbbf24;
  animation: pulseAmber 1s ease infinite;
}

@keyframes pulseAmber {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

/* ===== PROGRESS BAR ===== */
.prog-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9px;
  overflow: hidden;
  margin-top: 10px;
}

.prog-fill {
  height: 100%;
  border-radius: 9px;
  transition: width 1s linear;
}

.prog-fill.builder {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
}

.prog-fill.lab {
  background: linear-gradient(90deg, #a855f7, #c084fc);
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.5);
}

.prog-fill.done {
  background: linear-gradient(90deg, #16a34a, #4ade80);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* ===== BOOST BADGE ===== */
.boost-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* ===== BOOST BUTTON (per slot) ===== */
.slot-btn {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.6);
  color: #64748b;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.slot-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
}

.slot-btn.amber {
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
}

.slot-btn.amber:hover {
  background: rgba(245, 158, 11, 0.18);
}

/* ===== ACTION PILL ===== */
.action-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ===== GLOBAL BOOST CARD ===== */
.boost-card {
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.boost-card.builder-pot {
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(59, 130, 246, 0.2);
}

.boost-card.lab-pot {
  background: rgba(168, 85, 247, 0.07);
  border-color: rgba(168, 85, 247, 0.2);
}

.boost-card.event-boost {
  background: rgba(245, 158, 11, 0.07);
  border-color: rgba(245, 158, 11, 0.2);
}

.boost-card.gold-pass {
  background: rgba(250, 204, 21, 0.07);
  border-color: rgba(250, 204, 21, 0.2);
}

.boost-card.hammer-jam {
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(239, 68, 68, 0.2);
}

.boost-card.clash-pass {
  background: rgba(34, 197, 94, 0.07);
  border-color: rgba(34, 197, 94, 0.2);
}

.boost-card-label {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.6;
}

.boost-card-value {
  font-size: 12px;
  font-weight: 800;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-box {
  background: #0d1626;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  position: relative;
}

.modal-title {
  font-size: 18px;
  font-weight: 900;
  color: white;
}

.modal-enter {
  animation: modalIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.close-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.6);
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ===== FORM ELEMENTS ===== */
.field-label {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #475569;
  display: block;
  margin-bottom: 6px;
}

.input-field {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px 14px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s;
}

.input-field:focus {
  border-color: rgba(245, 158, 11, 0.4);
}

.input-field::placeholder {
  color: #334155;
}

textarea.input-field {
  resize: vertical;
}

select.input-field {
  cursor: pointer;
}

/* ===== STEPPER ===== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 6px;
}

.stepper button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.12s;
}

.stepper button:hover {
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber);
}

.stepper span {
  font-size: 20px;
  font-weight: 900;
  color: var(--amber);
  min-width: 40px;
  text-align: center;
}

/* ===== TOGGLE ===== */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.12s;
}

.toggle-row:hover {
  background: rgba(15, 23, 42, 0.9);
}

.toggle-check {
  width: 18px;
  height: 18px;
  accent-color: var(--amber);
  cursor: pointer;
  flex-none;
}

/* ===== BUTTONS ===== */
.btn-primary {
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d97706, #ea580c);
  color: white;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
}

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

.btn-secondary {
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: rgba(30, 41, 59, 1);
  color: #e2e8f0;
}

.btn-danger {
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* ===== SETTINGS BTN ===== */
.settings-btn {
  padding: 10px 24px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.03em;
}

.settings-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #94a3b8;
}

/* ===== SORT BUTTON ===== */
.sort-btn {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(30, 41, 59, 0.6);
  color: #64748b;
  cursor: pointer;
  transition: all 0.12s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sort-btn.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* ===== GLOBAL LIST ITEM ===== */
.global-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s;
  cursor: pointer;
}

.global-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

/* ===== TIME INPUT BOX ===== */
.time-input-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.time-input-box label {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475569;
  text-align: center;
}

/* ===== BOOST ITEM BUTTON ===== */
.boost-item-btn {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.boost-item-btn:hover {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

.boost-item-btn .item-icon {
  font-size: 22px;
  display: block;
  margin-bottom: 4px;
}

.boost-item-btn .item-name {
  font-size: 10px;
  font-weight: 800;
  color: #e2e8f0;
}

.boost-item-btn .item-desc {
  font-size: 9px;
  color: #64748b;
  margin-top: 2px;
}

/* ===== NOTIFICATION HELPER STATUS ===== */
.helper-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}

.helper-status-bar.available {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.helper-status-bar.cooldown {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== TOAST ===== */
.toast {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(13, 22, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== BOOST ACTIVE BANNER ===== */
.boost-banner {
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.boost-banner.builder {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.boost-banner.lab {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}

.boost-banner.event {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.helper-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

/* ===== NUMPAD ===== */
.btn-numpad {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 900;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  cursor: pointer;
}
.btn-numpad:active {
  background: var(--primary);
  transform: scale(0.95);
}

/* ===== NOTIFICATION DRAWER ===== */
.notif-drawer {
  position: fixed;
  top: 64px;
  right: 0;
  z-index: 360;
  width: 300px;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  background: rgba(8, 12, 28, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom-left-radius: 20px;
  box-shadow: -12px 12px 40px rgba(0, 0, 0, 0.6);
  animation: drawerSlideIn 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.notif-drawer.hidden {
  display: none !important;
}

@keyframes drawerSlideIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notif-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.notif-desktop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(245, 158, 11, 0.05);
  border-bottom: 1px solid rgba(245, 158, 11, 0.1);
  flex-shrink: 0;
}

.notif-clear-btn {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  cursor: pointer;
  transition: all 0.12s;
}

.notif-clear-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

.notif-enable-btn {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}

.notif-enable-btn:hover {
  background: rgba(245, 158, 11, 0.25);
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  flex: 1;
  text-align: center;
}

/* ===== NOTIFICATION CARD ===== */
.notif-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 14px;
  padding: 12px;
  position: relative;
  flex-shrink: 0;
  animation: toastIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== NOTIFICATION BADGE ===== */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: #ef4444;
  color: white;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

.notif-badge.hidden {
  display: none !important;
}