/* ParkPaw Modern Dark Theme - Design System */

:root {
  /* Color Palette - Dark Theme with Teal/Cyan Accents */
  --primary-teal: #00BCD4;
  --primary-teal-dark: #0097A7;
  --primary-teal-light: #4DD0E1;
  --success-green: #4CAF50;
  --warning-orange: #FF9800;
  --danger-red: #F44336;
  
  /* Dark Theme Colors */
  --bg-dark-primary: #1A1A2E;
  --bg-dark-secondary: #16213E;
  --bg-dark-tertiary: #0F3460;
  --bg-card: #1E2A47;
  --bg-card-hover: #253352;
  
  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #B0BEC5;
  --text-muted: #78909C;
  
  /* Border & Shadow */
  --border-color: #2C3E50;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #00BCD4 0%, #0097A7 100%);
  --gradient-card: linear-gradient(135deg, #1E2A47 0%, #253352 100%);
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-dark-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Layout Container */
.app-container {
  display: flex;
  min-height: 100vh;
  background: var(--bg-dark-primary);
}

/* Sidebar Navigation */
.sidebar {
  width: 280px;
  background: var(--bg-dark-secondary);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1rem;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.sidebar-title h2 {
  font-size: 1.5rem;
  margin: 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-title p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.nav-link:hover {
  background: var(--bg-card-hover);
  color: var(--primary-teal-light);
  border-color: var(--primary-teal);
}

.nav-link.active {
  background: var(--gradient-card);
  color: var(--primary-teal);
  border-color: var(--primary-teal);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  width: calc(100% - 280px);
}

/* Top Header Bar */
.top-header {
  background: var(--bg-dark-secondary);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.user-stats {
  display: flex;
  gap: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-teal);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--primary-teal);
  object-fit: cover;
  position: relative;
}

.verified-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  background: var(--success-green);
  border-radius: 50%;
  border: 3px solid var(--bg-dark-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
}

.user-info h3 {
  margin: 0;
  font-size: 1.25rem;
}

.user-level {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.level-badge {
  background: var(--gradient-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Live Park Status Cards */
.park-status-card {
  background: var(--gradient-card);
  border-radius: 16px;
  padding: 1.5rem;
  border: 2px solid var(--primary-teal);
  position: relative;
  overflow: hidden;
}

.park-status-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 188, 212, 0.1) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(76, 175, 80, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--success-green);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--success-green);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.park-counter {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-teal);
  text-align: center;
  margin: 1rem 0;
  line-height: 1;
}

.park-counter-label {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Weather Alert */
.weather-alert {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 152, 0, 0.1) 100%);
  border: 2px solid var(--warning-orange);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.weather-icon {
  font-size: 2rem;
  color: var(--warning-orange);
}

.weather-info h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.weather-info p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Dog Match Cards */
.match-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
}

.match-card:hover {
  border-color: var(--primary-teal);
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.match-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.match-overlay {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.25rem;
}

.compatibility-high {
  color: var(--success-green);
}

.compatibility-medium {
  color: var(--warning-orange);
}

.match-info {
  padding: 1.5rem;
}

.match-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.match-details {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.personality-traits {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.trait-badge {
  background: rgba(0, 188, 212, 0.2);
  color: var(--primary-teal);
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--primary-teal);
}

.match-actions {
  display: flex;
  gap: 1rem;
}

.btn-match {
  flex: 1;
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-match:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-skip {
  flex: 1;
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
  padding: 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-skip:hover {
  border-color: var(--danger-red);
  color: var(--danger-red);
  background: rgba(244, 67, 54, 0.1);
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-teal);
  color: var(--primary-teal);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

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

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .user-stats {
    gap: 1.5rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .top-header {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Loading States */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-top: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Notification Badge */
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger-red);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.modal {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--primary-teal);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.3s ease;
}

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

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-dark-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
