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

:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #0891b2;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg-color: #f0f9ff;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-light: #64748b;
  --border-color: #e2e8f0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
.navbar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-brand:hover {
  opacity: 0.9;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  flex: 1;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h1 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
}

/* Cards */
.fish-card,
.feature-card,
.last-fed-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.fish-card {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.fish-photo {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fish-card h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.fish-card p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* About Section */
.about-section,
.purpose-section {
  margin-bottom: 2rem;
}

.purpose-section h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.purpose-section > p {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  text-align: center;
}

.feature-card h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.feature-card.coming-soon {
  opacity: 0.7;
}

.badge {
  display: inline-block;
  background: var(--text-light);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* Buttons */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.25rem;
}

.btn-secondary {
  background: var(--text-light);
}

.btn-secondary:hover {
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

/* Feeding Page Specific */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-light);
}

.feeding-status {
  text-align: center;
  margin-bottom: 3rem;
}

.last-fed-card {
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

.last-fed-card h2 {
  color: var(--text-light);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.last-fed-time {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.time-ago {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.feeding-indicator {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
  display: inline-block;
}

.feeding-indicator.recent {
  background: #d1fae5;
  color: #065f46;
}

.feeding-indicator.moderate {
  background: #fef3c7;
  color: #92400e;
}

.feeding-indicator.overdue {
  background: #fee2e2;
  color: #991b1b;
}

.feed-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.password-input {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  width: 200px;
  text-align: center;
  transition: border-color 0.2s ease;
}

.password-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.password-input.error {
  border-color: var(--danger-color);
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.undo-btn {
  background: var(--warning-color);
}

.undo-btn:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.feed-btn {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
  }
}

/* Feeding History */
.feeding-history {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.feeding-history h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.history-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

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

.history-item:last-child {
  border-bottom: none;
}

.history-item.latest {
  background: #eff6ff;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
}

.no-history {
  color: var(--text-light);
  text-align: center;
  padding: 2rem;
}

/* Feeding Tips */
.feeding-tips {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.feeding-tips h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feeding-tips ul {
  list-style: none;
}

.feeding-tips li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-light);
}

.feeding-tips li::before {
  content: "•";
  color: var(--accent-color);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Footer */
footer {
  background: var(--text-color);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 1.5rem;
  margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .nav-brand {
    font-size: 1.1rem;
  }

  .nav-menu {
    gap: 0.25rem 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .nav-menu li {
    flex: 0 0 auto;
  }

  .nav-menu a {
    display: block;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .container {
    padding: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0.5rem;
  }

  .nav-brand {
    font-size: 1rem;
  }

  .nav-menu {
    gap: 0.3rem;
    width: 100%;
    justify-content: center;
  }

  .nav-menu li {
    display: block;
  }

  .nav-menu a {
    display: block;
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    min-width: 70px;
  }

  .nav-menu a:hover,
  .nav-menu a.active {
    border-color: rgba(255, 255, 255, 0.8);
  }
}
