:root {
  --dark-green: #1a4d3a;
  --medium-green: #2d6a4f;
  --light-green: #52c41a;
  --yellow: #ffd84d;
  --white: #ffffff;
  --gray: #6b7280;
  --dark-gray: #374151;
  --black: #0f172a;
  --slate: #1e293b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
}

/* Header Navigation */
.header-nav {
  background: var(--dark-green);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background: var(--medium-green);
  color: var(--white);
}

/* Hero Section */
.hero-section {
  position: relative;
  height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(rgba(26, 77, 58, 0.8), rgba(26, 77, 58, 0.6)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%232d6a4f;stop-opacity:1" /><stop offset="100%" style="stop-color:%231a4d3a;stop-opacity:1" /></linearGradient></defs><rect width="1200" height="800" fill="url(%23bg)"/><g transform="translate(600,400)"><!-- Bird body --><ellipse cx="0" cy="20" rx="60" ry="45" fill="%23ff6b6b" opacity="0.9"/><!-- Bird head --><circle cx="-15" cy="-10" r="35" fill="%23ff4757" opacity="0.9"/><!-- Beak --><path d="M-45 -5 Q-60 0 -45 5 Q-50 0 -45 -5" fill="%23ffa502"/><!-- Eye --><circle cx="-25" cy="-15" r="6" fill="%23000"/><circle cx="-23" cy="-17" r="2" fill="%23fff"/><!-- Wing --><ellipse cx="15" cy="15" rx="25" ry="40" fill="%23ff7675" opacity="0.8"/><!-- Tail feathers --><path d="M55 25 Q75 15 85 35 Q75 45 55 35" fill="%23ff6b6b" opacity="0.7"/><path d="M55 35 Q80 25 90 50 Q80 60 55 45" fill="%23ff7675" opacity="0.7"/><!-- Mossy rock --><ellipse cx="100" cy="150" rx="80" ry="40" fill="%236c5ce7" opacity="0.6"/><ellipse cx="90" cy="140" rx="60" ry="25" fill="%235f3dc4" opacity="0.7"/><!-- Green foliage background --><circle cx="200" cy="100" r="40" fill="%232d6a4f" opacity="0.3"/><circle cx="1000" cy="200" r="60" fill="%232d6a4f" opacity="0.2"/><circle cx="150" cy="600" r="50" fill="%231a4d3a" opacity="0.4"/><circle cx="1050" cy="650" r="45" fill="%231a4d3a" opacity="0.3"/></g></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  margin-top: 0;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dark-green);
  opacity: 0.8;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 77, 58, 0.9) 0%, rgba(26, 77, 58, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin: 0 0 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
}

.hero-description {
  font-size: 1.3rem;
  margin: 0 0 2.5rem;
  opacity: 0.95;
  font-weight: 400;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(255, 216, 77, 0.3);
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: #fbbf24;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 216, 77, 0.4);
  text-decoration: none;
  color: var(--black);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--dark-green);
  transform: translateY(-2px);
  text-decoration: none;
}

/* How It Works Section */
.how-it-works {
  position: relative;
  margin: 0;
  padding: 0;
}

.works-banner {
  height: 200px;
  background: linear-gradient(rgba(26, 77, 58, 0.8), rgba(26, 77, 58, 0.6)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><defs><linearGradient id="bg2" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%232d6a4f;stop-opacity:1" /><stop offset="100%" style="stop-color:%231a4d3a;stop-opacity:1" /></linearGradient></defs><rect width="1200" height="400" fill="url(%23bg2)"/><g transform="translate(600,200)"><!-- Bird legs and rock --><ellipse cx="50" cy="80" rx="15" ry="60" fill="%23ff6b6b" opacity="0.7"/><ellipse cx="80" cy="80" rx="15" ry="60" fill="%23ff6b6b" opacity="0.7"/><ellipse cx="65" cy="120" rx="40" ry="20" fill="%236c5ce7" opacity="0.6"/><ellipse cx="60" cy="110" rx="25" ry="15" fill="%235f3dc4" opacity="0.7"/><!-- Foliage blur --><circle cx="200" cy="100" r="30" fill="%232d6a4f" opacity="0.2"/><circle cx="1000" cy="150" r="40" fill="%232d6a4f" opacity="0.15"/><circle cx="150" cy="300" r="35" fill="%231a4d3a" opacity="0.25"/><circle cx="1050" cy="250" r="30" fill="%231a4d3a" opacity="0.2"/></g></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

.works-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 77, 58, 0.9) 0%, rgba(26, 77, 58, 0.7) 100%);
}

.works-content {
  background: #f8fffe;
  padding: 4rem 0;
  position: relative;
}

.works-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark-green);
  margin: 0 0 1.5rem;
  letter-spacing: -0.5px;
}

.works-description {
  text-align: center;
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 800px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--medium-green);
}

.card-icon {
  color: var(--medium-green);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-icon svg {
  transition: all 0.3s ease;
}

.feature-card:hover .card-icon svg {
  transform: scale(1.1);
  color: var(--light-green);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark-green);
  margin: 0 0 1rem;
  letter-spacing: -0.25px;
}

.card-description {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.5;
  margin: 0;
}

/* Call to Action Section */
.cta-section {
  background: #fef3c7;
  padding: 4rem 2rem 4rem 2rem;
  text-align: center;
  margin-bottom: 0;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark-green);
  margin: 0 0 1.5rem;
  letter-spacing: -0.5px;
}

.cta-description {
  font-size: 1.2rem;
  color: var(--gray);
  margin: 0 0 2rem;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  background: var(--medium-green);
  color: var(--white);
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: var(--dark-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.4);
  text-decoration: none;
  color: var(--white);
}

/* Discovery Page Styles */
.discovery-main {
  background: #f8fffe;
  min-height: 100vh;
  padding-top: 80px;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark-green);
  margin: 0 0 1.5rem;
  letter-spacing: -0.5px;
}

.page-description {
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 800px;
  margin: 0 auto 1rem;
  line-height: 1.6;
}

.demo-mode {
  font-size: 1rem;
  color: var(--gray);
  font-style: italic;
  margin: 0;
  opacity: 0.8;
}

.discovery-card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 0 auto;
}

.discovery-card h2 {
  margin: 0 0 1.5rem;
  font-size: 1.8rem;
  color: var(--dark-green);
  font-weight: 700;
  text-align: center;
}

.discovery-upload-area {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  padding: 3rem 2rem;
  margin: 1.5rem 0;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.discovery-upload-area:hover {
  border-color: var(--medium-green);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(45, 106, 79, 0.15);
}

.discovery-upload-area .upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.discovery-upload-area .upload-icon {
  font-size: 3rem;
  opacity: 0.7;
  transition: all 0.3s ease;
  color: var(--dark-gray);
}

.discovery-upload-area:hover .upload-icon {
  opacity: 1;
  transform: scale(1.1);
  color: var(--medium-green);
}

.discovery-upload-area .upload-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark-green);
}

.discovery-upload-area .file-types {
  font-size: 1rem;
  color: var(--gray);
}

.discovery-upload-area input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

/* Main Container */
.container {
  max-width: 880px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.8rem;
  color: var(--dark-green);
  font-weight: 700;
}

.desc {
  color: var(--gray);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* Upload Area */
.upload-area {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  padding: 3rem 2rem;
  margin: 1.5rem 0;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.upload-area:hover {
  border-color: var(--yellow);
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 216, 77, 0.15);
}

.upload-area.dragover {
  border-color: var(--yellow);
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  transform: scale(1.02);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.upload-icon {
  font-size: 3rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
  opacity: 1;
  transform: scale(1.1);
}

.upload-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.upload-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark-green);
}

.upload-subtitle {
  font-size: 1rem;
  color: var(--gray);
}

input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--slate);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  animation: slideIn 0.3s ease;
}

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

.file-name {
  color: var(--white);
  font-weight: 500;
  flex: 1;
  margin-right: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-file {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.remove-file:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

/* Form Elements */
.form-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

#submit-btn {
  width: 100%;
  padding: 1.2rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--yellow) 0%, #fbbf24 100%);
  color: var(--black);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(255, 216, 77, 0.3);
}

#submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 216, 77, 0.4);
}

#submit-btn:disabled {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  color: var(--white);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.small {
  color: var(--gray);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 1rem;
}

/* Security Styles */
.security-status {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid #d63031;
}

.security-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.security-icon {
  font-size: 1.2rem;
}

.captcha-section {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.captcha-section h3 {
  color: var(--dark-green);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.captcha-desc {
  color: var(--gray);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.captcha-question {
  background: var(--white);
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark-green);
  min-width: 120px;
  text-align: center;
}

.captcha-container input[type="number"] {
  background: var(--white);
  color: var(--dark-green);
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  width: 100px;
  text-align: center;
}

.captcha-container input[type="number"]:focus {
  border-color: var(--yellow);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 216, 77, 0.1);
}

.refresh-btn {
  background: var(--dark-gray);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
  text-decoration: none;
  display: inline-block;
}

.refresh-btn:hover {
  background: var(--gray);
  color: var(--white);
}

.captcha-submit-btn {
  background: var(--yellow);
  color: var(--black);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.captcha-submit-btn:hover {
  background: #fbbf24;
}

.captcha-note {
  color: var(--gray);
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Success/Error messages */
.security-message {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.security-message.success {
  background: rgba(34, 197, 94, 0.1);
  color: #059669;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.security-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Footer */
footer {
  background: var(--dark-green);
  color: var(--white);
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Results Page Styles */
.results-main {
  background: #f8fffe;
  min-height: calc(100vh - 160px);
  padding-top: 80px;
}

.results-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Main Species Card */
.species-main-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--medium-green);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.species-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.species-title-section {
  flex: 1;
}

.species-name {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 0.5rem;
  letter-spacing: -0.5px;
}

.species-scientific {
  font-size: 1.1rem;
  color: #718096;
  font-style: italic;
  margin: 0;
}

.conservation-status {
  margin-left: 1rem;
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-block;
  color: #ffffff;
}

.status-badge.endangered {
  background: #E53935;
}

.status-badge.vulnerable {
  background: #FF9800;
}

.status-badge.near-threatened {
  background: #FFC107;
  color: #000000;
}

.status-badge.least-concern {
  background: #4CAF50;
}

.status-badge.data-deficient {
  background: #9E9E9E;
}

.status-badge.unknown {
  background: #607D8B;
}

.species-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.species-image-section {
  display: flex;
  justify-content: center;
}

.species-image-container {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--medium-green);
}

.species-image {
  width: 100%;
  height: auto;
  display: block;
}

.species-info-section {
  padding-left: 1rem;
}

.info-item {
  margin-bottom: 1.5rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-icon-inline {
  font-size: 1rem;
  color: var(--medium-green);
  margin-right: 0.5rem;
}

.info-label {
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.info-value {
  color: #4a5568;
  line-height: 1.5;
  font-size: 1rem;
}

/* Information Cards Grid */
.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.info-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.card-icon {
  font-size: 1.2rem;
  margin-right: 0.75rem;
  color: var(--medium-green);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0;
}

.card-content {
  color: #4a5568;
  line-height: 1.6;
}

.card-content p {
  margin: 0;
}

/* Fun Fact Card */
.fun-fact-card {
  background: #FFFBEB;
  border: 1px solid #D9E8D9;
}

.fun-fact-card .card-icon {
  color: var(--medium-green);
}

/* Conservation Card */
.conservation-card {
  border: 1px solid #F0D9D9;
}

.conservation-card .card-icon {
  color: #E53935;
}

.conservation-detail {
  margin-bottom: 1rem;
}

.conservation-detail:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.detail-value {
  color: #4a5568;
  line-height: 1.5;
}

/* Habitat Card */
.habitat-card {
  border: 1px solid #D9E8D9;
}

.habitat-card .card-icon {
  color: var(--medium-green);
}

.habitat-detail {
  margin-bottom: 1rem;
}

.habitat-detail:last-child {
  margin-bottom: 0;
}

.country-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.country-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.country-tag:hover {
  background: #e2e8f0;
  transform: scale(1.05);
}

.map-preview {
  margin-top: 0.5rem;
}

.map-placeholder {
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-placeholder:hover {
  border-color: var(--medium-green);
  background: #f0f9ff;
  color: var(--medium-green);
}

.map-placeholder i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.primary-btn {
  background: var(--medium-green);
  color: #ffffff;
}

.primary-btn:hover {
  background: var(--dark-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
  text-decoration: none;
  color: #ffffff;
}

.secondary-btn {
  background: transparent;
  color: var(--medium-green);
  border: 2px solid var(--medium-green);
}

.secondary-btn:hover {
  background: var(--medium-green);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
  text-decoration: none;
}

/* No Animal Card */
.no-animal-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.no-animal-content {
  max-width: 500px;
  margin: 0 auto;
}

.no-animal-icon {
  font-size: 4rem;
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

.no-animal-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 1rem;
}

.no-animal-description {
  font-size: 1.1rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 2rem;
}

/* Embedded Map Container */
.embedded-map-container {
  margin-top: 0.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#embedded-map {
  width: 100%;
  height: 300px;
  border-radius: 8px;
}

/* Legacy styles for backward compatibility */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.panel {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

img.preview {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-top: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Map specific styles */
.map-container {
  position: relative;
  width: 100%;
  height: 80vh;
  background: linear-gradient(135deg, var(--slate) 0%, #334155 100%);
  border-radius: 18px;
  overflow: hidden;
  margin: 1rem 0;
}

#globe {
  width: 100%;
  height: 100%;
  cursor: grab;
}

#globe:active {
  cursor: grabbing;
}

.map-controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #334155;
  color: white;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: var(--yellow);
  transform: translateY(-1px);
}

.habitat-info {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(10px);
  color: white;
}

.habitat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.habitat-tag {
  background: var(--yellow);
  color: var(--black);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.habitat-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(255, 216, 77, 0.3);
}

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
  z-index: 100;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .nav-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .hero-section {
    margin-top: 0;
    height: calc(100vh - 140px);
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 300px;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .upload-icon {
    font-size: 2.5rem;
  }
  
  .captcha-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .captcha-question {
    min-width: auto;
  }
  
  .captcha-container input[type="number"] {
    width: 100%;
  }
  
  .result-grid {
    grid-template-columns: 1fr;
  }
  
  .map-container {
    height: 60vh;
  }
  
  .map-controls {
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .control-btn {
    padding: 0.4rem;
    font-size: 0.8rem;
  }
  
  .habitat-info {
    bottom: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    padding: 0.75rem;
  }
  
  /* How It Works Mobile */
  .works-banner {
    height: 150px;
  }
  
  .works-content {
    padding: 3rem 0;
  }
  
  .works-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .works-description {
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  
  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .feature-card {
    padding: 1.5rem 1rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .card-description {
    font-size: 0.9rem;
  }
  
  /* CTA Section Mobile */
  .cta-section {
    padding: 3rem 1rem 3rem 1rem;
  }
  
  .cta-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .cta-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .cta-button {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  /* Discovery Page Mobile */
  .discovery-main {
    padding-top: 140px;
  }
  
  .page-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .page-description {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .demo-mode {
    font-size: 0.9rem;
  }
  
  .discovery-card {
    margin: 0 1rem;
    padding: 1.5rem;
  }
  
  .discovery-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .discovery-upload-area {
    padding: 2rem 1rem;
  }
  
  .discovery-upload-area .upload-icon {
    font-size: 2.5rem;
  }
  
  .discovery-upload-area .upload-title {
    font-size: 1rem;
  }
  
  .discovery-upload-area .file-types {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .logo-text {
    font-size: 1.2rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* How It Works Small Mobile */
  .works-title {
    font-size: 1.8rem;
  }
  
  .works-description {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }
  
  .feature-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0.5rem;
  }
  
  .feature-card {
    padding: 1.25rem 1rem;
  }
  
  .card-icon {
    margin-bottom: 1rem;
  }
  
  .card-icon svg {
    width: 40px;
    height: 40px;
  }
  
  /* CTA Section Small Mobile */
  .cta-section {
    padding: 2.5rem 0.5rem 2.5rem 0.5rem;
  }
  
  .cta-title {
    font-size: 1.8rem;
  }
  
  .cta-description {
    font-size: 0.95rem;
  }
  
  .cta-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
  
  /* Discovery Page Small Mobile */
  .page-title {
    font-size: 1.8rem;
  }
  
  .page-description {
    font-size: 0.95rem;
  }
  
  .discovery-card {
    margin: 0 0.5rem;
    padding: 1.25rem;
  }
  
  .discovery-card h2 {
    font-size: 1.3rem;
  }
  
  .discovery-upload-area {
    padding: 1.5rem 0.75rem;
  }
  
  .discovery-upload-area .upload-icon {
    font-size: 2rem;
  }
  
  .discovery-upload-area .upload-title {
    font-size: 0.95rem;
  }
  
  .discovery-upload-area .file-types {
    font-size: 0.85rem;
  }

  /* Results Page Mobile */
  .results-title {
    font-size: 2rem;
  }

  .results-subtitle {
    font-size: 1rem;
  }

  .species-name {
    font-size: 1.5rem;
  }

  .species-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .species-info-section {
    padding-left: 0;
  }

  .info-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .action-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}