:root {
  --bg-color: #e9ede7;
  --text-color: #222;
  --link-color: #3366cc;
  --link-hover-color: #1d4ed8;
  --secondary-text-color: #666;
  --footer-text-color: #aaa;
  --card-bg: #ffffff;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body {
  font-family: system-ui, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
  --bg-color: #1e1e1e;
  --text-color: #e5e5e5;
  --link-color: #7aa2f7;
  --link-hover-color: #a5bdfd;
  --secondary-text-color: #aaa;
  --footer-text-color: #666;
  --card-bg: #2a2a2a;
  --box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

.container {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 20px;
  background-color: var(--card-bg);
  border-radius: 1rem;
  box-shadow: var(--box-shadow);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.3em;
}

header p {
  font-size: 1.1rem;
  color: var(--secondary-text-color);
}

.recipe-list,
.nav-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1em;
}

.recipe-list li,
.nav-list li {
  margin: 0.5em 0;
}

.recipe-list a,
.nav-list a,
.social a,
.home-link,
.back-link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
}

.recipe-list a:hover,
.nav-list a:hover,
.social a:hover,
.home-link:hover {
  text-decoration: underline;
  color: var(--link-hover-color);
}

footer {
  margin-top: 4em;
  font-size: 0.9rem;
  text-align: center;
  color: var(--footer-text-color);
}

.social {
  margin-top: 2em;
  font-size: 0.95rem;
  text-align: center;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--card-bg);
  padding: 1.5em;
  border-radius: 1rem;
  box-shadow: var(--box-shadow);
  margin-bottom: 2em;
}

.profile-pic {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1em;
}

.card {
  background-color: var(--card-bg);
  padding: 1.5em;
  border-radius: 1rem;
  box-shadow: var(--box-shadow);
  margin-bottom: 2em;
}

.home-link {
  display: inline-block;
  margin-bottom: 1em;
}

.theme-toggle {
  margin-left: 1em;
  padding: 0.4em 0.8em;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background-color: var(--link-color);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--link-hover-color);
}

/* Goodreads Widget Styling */
.goodreads-container {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.5em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  max-width: 100%;
  margin: 20px 0;
  text-align: left; /* ← Left-align the text */
}
/* Force Goodreads card to remain light even in dark mode */
.dark .goodreads-container {
  background-color: #59a67d !important;
  color: #000000 !important;
}

.goodreads-header {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.goodreads-books {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start; /* ← left-align contents */
}

.goodreads-book {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.goodreads-book-text {
  display: flex;
  flex-direction: column;
}
.goodreads-book-text a {
  text-decoration: none;
  color: var(--link-color);
  font-weight: bold;
  margin-bottom: 4px;
}

.goodreads-book-text a:hover {
  text-decoration: underline;
}

.goodreads-author {
  font-size: 0.9rem;
  color: #666;
}



.goodreads-book img {
  width: 50px;
  height: auto;
  border-radius: 5px;
}

.goodreads-book a {
  text-decoration: none;
  color: var(--link-color);
  font-weight: bold;
}

.goodreads-book a:hover {
  text-decoration: underline;
}

.recipe-photo {
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  margin-top: 1em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-form {
  max-width: 600px;
  margin: 2rem auto;
  font-family: sans-serif;
  padding: 2rem;
  background-color: var(--card-bg);
  color: var(--text-color);
  border-radius: 12px;
  box-shadow: var(--box-shadow);
}

.form-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.form-group {
  display: block;
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: bold;
}

.form-input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #ccc; /* You could even make this a variable */
  background-color: var(--card-bg);
  color: var(--text-color);
  box-sizing: border-box;
}

.form-button {
  display: block;
  width: 100%;
  background-color: var(--link-color);
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-button:hover {
  background-color: var(--link-hover-color);
}

.form-button.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.form-button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  transform: translateY(-50%);
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}
