/* ============================================
   Smart Waste Detector - Enhanced Theme
   Bootstrap 5 + Custom CSS
   ============================================ */

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --danger: #ef4444;
  --info: #3b82f6;
  --success: #10b981;
  --warning: #f59e0b;
  --bg-light: #f0fdf4;
  --bg-white: #ffffff;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 4px 12px rgba(16, 185, 129, 0.15);
  --shadow-md: 0 8px 24px rgba(16, 185, 129, 0.2);
  --shadow-lg: 0 12px 40px rgba(16, 185, 129, 0.25);
}

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

html, body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 50%, #f9fafb 100%);
  color: var(--text-dark);
  line-height: 1.6;
}

/* ============================================
   NAVBAR ENHANCEMENT
   ============================================ */

.navbar {
  background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(240,253,250,0.95) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
  padding: 0.8rem 2rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #34d399);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.navbar-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.navbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.navbar-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 1rem;
}

.nav-link:hover {
  color: var(--primary-dark);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

.btn-login, .btn-register {
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-login {
  color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-login:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.btn-register {
  background: linear-gradient(135deg, #10b981, #34d399);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn {
  font-weight: 600;
  border-radius: 25px;
  padding: 10px 24px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  color: white;
}

.btn-outline-primary {
  color: var(--primary-dark);
  border: 2px solid var(--primary-dark);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: white;
  border: none;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 12px;
}

/* ============================================
   CARD STYLES
   ============================================ */

.card {
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  background: var(--bg-white);
  transition: all 0.3s ease;
  overflow: hidden;
}

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

.card-header {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(52, 211, 153, 0.05));
  border-bottom: 2px solid var(--primary-light);
  padding: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 18px;
}

.card-text {
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(52, 211, 153, 0.05));
  border-radius: 30px;
  padding: 3rem 2rem;
  margin: 2rem 0;
  border: 2px solid var(--primary-light);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1), transparent);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero-section h1 {
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.hero-section .accent {
  background: linear-gradient(135deg, #10b981, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-section p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 500px;
  position: relative;
  z-index: 1;
}

/* ============================================
   FORM STYLES
   ============================================ */

.form-control {
  border-radius: 15px;
  border: 2px solid var(--border-color);
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: var(--bg-white);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 13px;
}

.form-select {
  border-radius: 15px;
  border: 2px solid var(--border-color);
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* ============================================
   ALERT STYLES
   ============================================ */

.alert {
  border-radius: 15px;
  border: none;
  padding: 16px 20px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
  color: #065f46;
  border-left: 5px solid #10b981;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  color: #7f1d1d;
  border-left: 5px solid #ef4444;
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: #0c2340;
  border-left: 5px solid #3b82f6;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  color: #78350f;
  border-left: 5px solid #f59e0b;
}

/* ============================================
   UPLOAD ZONE
   ============================================ */

.upload-zone {
  border: 3px dashed var(--primary);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.02), rgba(52, 211, 153, 0.02));
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--primary-dark);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(52, 211, 153, 0.05));
  transform: translateY(-2px);
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 1rem;
  animation: bounce 2s ease-in-out infinite;
}

.upload-title {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 18px;
}

.upload-text {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 1.5rem;
}

/* ============================================
   STATS & BADGES
   ============================================ */

.stat-box {
  background: linear-gradient(135deg, var(--primary-light), rgba(209, 250, 229, 0.5));
  border-radius: 20px;
  padding: 1.5rem;
  border: 2px solid var(--primary-light);
  text-align: center;
  transition: all 0.3s ease;
}

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

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-dark);
}

/* ============================================
   IMAGE STYLES
   ============================================ */

.img-detection {
  border-radius: 20px;
  border: 2px solid var(--primary-light);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
  width: 100%;
  height: auto;
  object-fit: cover;
}

.img-thumbnail-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}

/* ============================================
   TABLE STYLES
   ============================================ */

.table {
  border-radius: 15px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
  color: var(--primary-dark);
  font-weight: 700;
  border: none;
  padding: 1rem;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.table tbody tr:hover {
  background: var(--primary-light);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   BADGE STYLES
   ============================================ */

.badge {
  border-radius: 50px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 12px;
  display: inline-block;
}

.badge-success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

.badge-warning {
  background: linear-gradient(135deg, #fed7aa, #fdba74);
  color: #92400e;
}

.badge-danger {
  background: linear-gradient(135deg, #fecaca, #fca5a5);
  color: #7f1d1d;
}

.badge-info {
  background: linear-gradient(135deg, #bfdbfe, #93c5fd);
  color: #0c2340;
}

/* ============================================
   DROPZONE
   ============================================ */

.dropzone {
  border: 2px dashed var(--primary);
  border-radius: 20px;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.02), rgba(52, 211, 153, 0.02));
  cursor: pointer;
  transition: all 0.3s ease;
}

.dropzone:hover {
  border-color: var(--primary-dark);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(52, 211, 153, 0.05));
}

.dropzone-icon {
  font-size: 48px;
  margin-bottom: 1rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes slideIn {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .navbar {
    padding: 0.8rem 1rem;
  }

  .navbar-text {
    display: none;
  }

  .logo-badge {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .hero-section {
    padding: 2rem 1rem;
  }

  .hero-section h1 {
    font-size: 28px;
  }

  .card {
    margin-bottom: 1rem;
  }

  .stat-box {
    margin-bottom: 1rem;
  }

  .table {
    font-size: 12px;
  }

  .table thead th,
  .table tbody td {
    padding: 0.75rem 0.5rem;
  }

  .btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .upload-zone, .dropzone {
    padding: 1.5rem;
  }

  .upload-icon {
    font-size: 36px;
  }

  .upload-title {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .card {
    border-radius: 15px;
    padding: 1rem;
  }

  .hero-section {
    padding: 1.5rem 1rem;
  }

  .hero-section h1 {
    font-size: 24px;
  }

  .btn {
    width: 100%;
    padding: 10px 12px;
  }
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(52, 211, 153, 0.05));
  border-top: 2px solid var(--primary-light);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 3rem;
}