.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 8px; }
.modal-transition { transition: visibility 0.2s, opacity 0.2s ease; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.app-container {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1), height 0.35s ease, border-radius 0.35s ease, box-shadow 0.35s ease;
}

/* Phone Mockup Mode */
.app-container.phone-mockup-frame {
  max-width: 412px !important;
  height: 840px !important;
  max-height: 94vh !important;
  border-radius: 46px !important;
  border: 10px solid #1e293b;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 18px;
  background-color: #1e293b;
  border-radius: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.phone-notch::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0f172a;
}
.phone-notch::after {
  content: '';
  width: 28px;
  height: 4px;
  border-radius: 4px;
  background: #334155;
}

.counter-animate { transition: all 0.3s ease-out; }

#statsBudgetBar { position: relative; }
#statsBudgetBar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.spinner {
  width: 40px; height: 40px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #1e293b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.shake { animation: shake 0.3s ease-in-out; }

.filter-chip {
  transition: all 0.2s ease;
  cursor: pointer;
}
.filter-chip.active { background: #1e293b; color: white; }
.filter-chip:not(.active) { background: #f1f5f9; color: #64748b; }
.filter-chip:not(.active):hover { background: #e2e8f0; }

.goal-icon.selected {
  background: #1e293b !important;
  color: white !important;
  transform: scale(1.1);
}
.goal-progress { transition: width 0.5s ease; }
.goal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

#confirmDeleteAccountBtn:not(:disabled) {
  background: #ef4444;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}
#confirmDeleteAccountBtn:not(:disabled):hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}
#confirmDeleteAccountBtn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
}
#deleteConfirmInput {
  transition: all 0.2s ease;
  letter-spacing: 2px;
}
#deleteConfirmInput:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  outline: none;
}

/* Laser Scanner Animation */
@keyframes laserSweep {
  0% { top: 0%; opacity: 0.8; }
  50% { top: 95%; opacity: 1; }
  100% { top: 0%; opacity: 0.8; }
}

.laser-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #10b981 30%, #34d399 50%, #10b981 70%, transparent 100%);
  box-shadow: 0 0 15px 3px rgba(16, 185, 129, 0.8), 0 0 30px 6px rgba(52, 211, 153, 0.4);
  animation: laserSweep 2s ease-in-out infinite;
  z-index: 20;
}

/* Radar Sweep Animation for Subscriptions */
@keyframes radarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-sweep {
  animation: radarSweep 3s linear infinite;
  transform-origin: center center;
}

/* Top Release Bar Styles */
.release-announcement-bar {
  background: linear-gradient(90deg, #090d16 0%, #1e293b 50%, #0f172a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glassmorphism card */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
  .tag { padding: 12px 16px !important; font-size: 0.9rem !important; }
  .nav-item { font-size: 0.7rem !important; }
  input, select, button { font-size: 16px !important; }
}

@media (min-width: 768px) {
  body {
    background: radial-gradient(circle at 50% 10%, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
    min-height: 100vh;
  }
  body.dark {
    background: radial-gradient(circle at 50% 10%, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  }
}