:root {
  --primary-color: #0077b6;
  --secondary-color: #03045e;
  --accent-color: #00b4d8;
  --text-dark: #1a1a1a;
  --text-light: #f8f9fa;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-main: 0 10px 30px rgba(0, 119, 182, 0.15);
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-main);
  background: #f0f4f8;
  color: var(--text-dark);
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

/* Background Blobs for Atmosphere */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.6;
}

.blob {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.blob-1 { width: 400px; height: 400px; top: -100px; left: -100px; animation: float 20s infinite alternate; }
.blob-2 { width: 500px; height: 500px; bottom: -150px; right: -150px; animation: float 25s infinite reverse; background: linear-gradient(135deg, var(--accent-color), #caf0f8); }
.blob-3 { width: 300px; height: 300px; top: 40%; left: 60%; animation: float 18s infinite; background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)); }

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(50px) scale(1.1); }
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 4rem; /* Ekstra padding nederst */
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeInDown 0.8s ease-out;
}

.header h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.beginner-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

.beginner-tip-box {
    margin-top: 1.5rem;
    background: rgba(0, 180, 216, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 1rem;
    border-radius: 0.5rem;
}

.beginner-tip-box h4 {
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.beginner-tip-box p {
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: italic;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.7;
}

.recipe-container {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  perspective: 1000px;
}

.recipe-card {
  width: 100%;
  max-width: 650px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow-main);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s;
  animation: cardFadeIn 0.8s ease-out forwards;
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-5px) rotateX(1deg);
  box-shadow: 0 15px 40px rgba(0, 119, 182, 0.25);
}

.card-image-wrap {
  width: 100%;
  height: 250px;
  overflow: hidden;
  position: relative;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.recipe-card:hover .card-image-wrap img {
  transform: scale(1.05);
}

.card-details {
  padding: 2rem;
  overflow-y: auto;
}

.card-details h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  border-bottom: 2px solid rgba(0, 119, 182, 0.1);
  padding-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #555;
  flex-wrap: wrap;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 119, 182, 0.08);
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  font-weight: 600;
}

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

.ingredients h3, .steps h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
}

.ingredients ul, .steps ol {
  list-style-position: inside;
  line-height: 1.6;
}

.ingredients ul li { list-style: none; margin-bottom: 0.4rem; font-size: 0.95rem; }
.ingredients ul li::before { content: "•"; color: var(--primary-color); font-weight: bold; display: inline-block; width: 1em; }

.steps ol li { margin-bottom: 0.6rem; font-size: 0.95rem; font-weight: 300; }

.nutrition-pill {
    margin-top: 1.5rem;
    background: var(--secondary-color);
    color: white;
    padding: 1rem;
    border-radius: 1.5rem;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.nutrition-item strong { display: block; font-size: 1.1rem; }

/* Control area */
.controls {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  border: none;
  padding: 1.2rem 3rem;
  font-size: 1.3rem;
  font-weight: 700;
  border-radius: 4rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(3, 4, 94, 0.3);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  font-family: var(--font-main);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(3, 4, 94, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.btn-primary:hover .btn-shine {
  left: 150%;
}

.card-content-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    padding: 3rem;
    text-align: center;
    color: #666;
}

.placeholder-icon { font-size: 5rem; margin-bottom: 2rem; animation: bounce 2s infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

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

@keyframes cardFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Animations for new content */
.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .header h1 { font-size: 2.2rem; }
  .card-content-grid { grid-template-columns: 1fr; }
  .btn-primary { width: 100%; }
}
