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

:root {
  --primary-dark: #0f172a;
  --accent: #f43f5e;
  --bg: #ffffff;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
}

.app-container {
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 10px 80px rgba(0, 0, 0, 0.15);
  overflow-x: hidden;
  border-radius: 0;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(226, 232, 240, 0.5);
  display: flex;
  justify-content: space-around;
  padding: 12px 0 8px;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  flex: 1;
}

.nav-item i {
  font-size: 22px;
  transition: all 0.3s ease;
}

.nav-item span {
  font-size: 11px;
  font-weight: 500;
}

.nav-item.active {
  color: var(--accent);
}

.nav-item:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.nav-item.active i {
  animation: bounceIn 0.4s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.btn-primary {
  background: var(--accent);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #dc2f4e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.3);
}

.card {
  border-radius: 16px;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-control {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

.gradient-bg {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #020617 100%);
}

/* Secondary Header & Navigation */
.secondary-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: white;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
}

.back-arrow {
  font-size: 22px;
  color: var(--primary-dark);
  padding: 12px;
  margin-left: -12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.back-arrow:active {
  transform: scale(0.95);
  opacity: 0.7;
  background-color: rgba(15, 23, 42, 0.05);
}

.page-transition {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-right-out {
  transform: translateX(30%);
  opacity: 0;
}

.slide-left-out {
  transform: translateX(-30%);
  opacity: 0;
}

/* Standard Modal */
.standard-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

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

.standard-modal {
  background: white;
  border-radius: 20px;
  padding: 24px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  animation: slideUpModal 0.3s ease;
}

@keyframes slideUpModal {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.standard-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 20px;
}

.standard-modal-actions {
  display: flex;
  gap: 12px;
}

.standard-modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel {
  background: #f1f5f9;
  color: var(--text-dark);
}

.btn-confirm {
  background: var(--accent);
  color: white;
}

/* Page Slide Intro */
.slide-in-right {
  animation: slideInRight 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInRight {
  from { transform: translateX(30%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (min-width: 768px) {
  body {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  }
  
  .app-container {
    border-radius: 32px;
    min-height: 90vh;
    max-height: 90vh;
    overflow-y: auto;
  }
}