/* Modern Food Donation Network CSS */
:root {
  --primary: #2e7d32;       /* Green */
  --secondary: #ff8f00;     /* Orange */
  --light: #f5f5f5;         /* Light gray */
  --dark: #212121;          /* Dark gray */
  --error: #c62828;         /* Red */
  --success: #2e7d32;       /* Green */
  --shadow: 0 3px 10px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: #f9f9f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary), #4caf50);
  color: white;
  padding: 2rem 0;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('assets/pattern.png') repeat;
  opacity: 0.1;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
}

/* Main Content */
main {
  flex: 1;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  width: 100%;
}

.hero {
  text-align: center;
  margin: 2rem 0 3rem;
  animation: fadeIn 0.8s ease-out;
}

.hero h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto;
}

.login-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.option-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
}

.option-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.option-card h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  position: relative;
}

.option-card p {
  color: #666;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--secondary);
  color: white;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: #e65100;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--dark);
  color: white;
  margin-top: auto;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.option-card {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.option-card:nth-child(1) { animation-delay: 0.1s; }
.option-card:nth-child(2) { animation-delay: 0.3s; }

/* Donation Cards */
.donation-card {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.donation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.donation-card h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.donation-card p {
    margin: 0.5rem 0;
    color: #555;
}

.donation-card .btn {
    margin-top: 1rem;
    width: 100%;
}

/* Search Filters */
.search-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-filters input,
.search-filters select {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

/* Success Message */
.success-message {
    background-color: #e8f5e9;
    border-left: 4px solid #2e7d32;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 0 4px 4px 0;
}

.success-message h3 {
    color: #2e7d32;
    margin-top: 0;
}

/* Textarea Styles */
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

/* Image Upload Styles */
#foodImage {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
    background: white;
}

#imagePreview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    border: 1px solid #eee;
}

#detectionResults {
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-top: 1rem;
    padding: 1rem;
}

#detectionResults h4 {
    margin-top: 0;
    color: var(--primary);
}

#detectionResults p {
    margin-bottom: 0;
    color: #333;
}

#imagePreview {
    margin: 1rem 0;
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  .login-options {
    grid-template-columns: 1fr;
  }
  
  .option-card {
    padding: 1.5rem;
  }
}
