/* TookAndCook Web-App Styles */

:root {
  --primary: #48BB78;
  --primary-dark: #38A169;
  --background: #FAFAFA;
  --card-bg: #FFFFFF;
  --text-primary: #212121;
  --text-secondary: #757575;
  --border: #E0E0E0;
  --shadow: rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  overflow-y: scroll; /* Scrollbar immer anzeigen */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px; /* Identisch zu .recipe-page padding */
}

/* Navigation */
.navbar {
  background: var(--card-bg);
  box-shadow: 0 2px 8px var(--shadow);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px; /* Identisch zu .recipe-page padding */
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.brand-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 350px;
  justify-content: flex-end;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

.user-email {
  color: var(--text-secondary);
  font-size: 14px;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-full {
  width: 100%;
}

.lang-toggle {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.lang-toggle:hover {
  background: var(--primary-dark);
}

/* Login Page */
.login-container {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}

.login-card {
  background: var(--card-bg);
  padding: 48px;
  border-radius: 16px;
  box-shadow: 0 8px 24px var(--shadow);
  max-width: 400px;
  width: 100%;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.login-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  font-size: 14px;
}

.form-input {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  transition: border 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.divider {
  text-align: center;
  margin: 24px 0;
  color: var(--text-secondary);
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.btn-google {
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.btn-google:hover {
  background: var(--background);
}

.google-icon {
  flex-shrink: 0;
}

.btn-apple {
  background: #000000;
  color: white;
  border: 1px solid #000000;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  transition: all 0.2s;
}

.btn-apple:hover {
  background: #333333;
  border-color: #333333;
}

.apple-icon {
  flex-shrink: 0;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Recipes Page */
.recipes-page {
  padding: 32px 0;
  min-height: calc(100vh - 72px);
}

/* Back Navigation - Modern Style */
.back-nav {
  max-width: 1200px;
  margin: 0 auto 20px;
  /* Kein padding - .recipe-page hat bereits padding: 24px */
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  color: #2D3748;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.back-link:hover {
  background: #48BB78;
  color: white;
  border-color: #48BB78;
  box-shadow: 0 8px 20px rgba(72, 187, 120, 0.25);
  transform: translateY(-2px);
}

.back-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-link:hover .back-icon {
  transform: translateX(-3px);
}

.page-header {
  margin-bottom: 32px;
  text-align: center;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--text-secondary);
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.recipe-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text-primary);
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
}

.recipe-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--background);
}

.recipe-card-content {
  padding: 16px;
}

.recipe-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.recipe-card-meta {
  display: flex;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.recipe-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Loading */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 72px);
}

.loader {
  border: 4px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 80px 32px;
  color: var(--text-secondary);
}

/* Error Container */
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 72px);
  text-align: center;
}

.btn-home {
  margin-top: 24px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 8px;
  }
  
  .user-email {
    display: none;
  }
  
  .recipes-grid {
    grid-template-columns: 1fr;
  }
  
  .login-card {
    padding: 32px 24px;
  }
}

