/* --- GLOBAL VARIABLES --- */
:root {
  --yellow: #fff24d;
  --orange: #ff5b03;
  --bg: #0b0d12;
  --panel: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .12);
  --text: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .70);
  --radius: 18px;
}

/* --- BASE STYLES --- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: 
    radial-gradient(900px 420px at 10% -10%, rgba(255,242,77,.18), transparent 60%),
    radial-gradient(700px 360px at 90% 0%, rgba(255,91,3,.14), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
}

/* --- LAYOUT CONTAINERS --- */
.container-fluid { width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* --- NAVIGATION --- */
.main-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 5%; background: rgba(11, 13, 18, 0.9);
  backdrop-filter: blur(15px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1000;
}

.nav-logo a { text-decoration: none; color: white; font-size: 1.4rem; font-weight: 800; letter-spacing: 2px; }
.nav-logo span { color: var(--yellow); font-weight: 300; }
.nav-content { display: flex; align-items: center; gap: 40px; }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.85rem; transition: 0.3s; }
.nav-links a:hover { color: var(--yellow); }

/* --- SEARCH & DROPDOWN --- */
.search { position: relative; width: 250px; }
.search input {
  width: 100%; padding: 8px 15px 8px 35px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 20px; color: white; outline: none;
}
.search-icon { position: absolute; left: 12px; top: 7px; opacity: 0.5; }

.search-results-dropdown {
    position: absolute; top: 115%; left: 0; width: 100%;
    background: rgba(11, 13, 18, 0.98); backdrop-filter: blur(15px);
    border: 1px solid var(--line); border-radius: 12px;
    max-height: 350px; overflow-y: auto; z-index: 1001; display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.search-item {
    display: flex; align-items: center; padding: 12px; gap: 12px;
    border-bottom: 1px solid var(--line); text-decoration: none; transition: 0.2s;
}
.search-item:hover { background: var(--panel); }
.search-item img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.search-item-info h4 { margin: 0; font-size: 14px; color: white; }
.search-item-info span { font-size: 11px; color: var(--muted); }

/* --- CLASSIC RECIPE PAPER (SINGLE PAGE) --- */
.recipe-paper {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px;
    margin-top: 20px;
}

.recipe-header { text-align: center; margin-bottom: 30px; }
.recipe-header h1 { font-size: 2.5rem; margin: 10px 0; }
.recipe-meta { display: flex; justify-content: center; gap: 20px; align-items: center; color: var(--muted); }

.recipe-hero-img { 
    width: 100%; height: 400px; border-radius: var(--radius); 
    background-size: cover; background-position: center; 
    border: 1px solid var(--line); margin-bottom: 30px;
}

.recipe-grid-classic {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    margin-top: 40px;
}

.ingredients-section h2, .instructions-section h2, .notes-section h2 {
    border-bottom: 1px solid var(--yellow);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

.interactive-controls { display: flex; gap: 10px; margin-bottom: 20px; }
.interactive-controls input, .interactive-controls select, #resetRecipe {
    background: var(--bg); border: 1px solid var(--line); color: white; padding: 5px 10px; border-radius: 5px; outline: none;
}

.ing-list { list-style: none; padding: 0; }
.ing-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.ing-list li strong { color: var(--yellow); }

.steps-list { display: flex; flex-direction: column; gap: 20px; }
.step { padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.step strong { color: var(--yellow); margin-right: 10px; }

.notes-box { 
    background: rgba(255, 242, 77, 0.05); border: 1px dashed var(--yellow); 
    padding: 25px; border-radius: 15px; color: var(--text); min-height: 120px; 
    outline: none; line-height: 1.6;
}

/* --- BUTTONS --- */
.print-btn {
    background: var(--yellow); color: var(--bg); border: none;
    padding: 8px 20px; border-radius: 30px; font-weight: 700;
    cursor: pointer; transition: 0.3s;
}
.print-btn:hover { background: white; transform: scale(1.05); }

#resetRecipe { cursor: pointer; transition: 0.2s; }
#resetRecipe:hover { border-color: var(--yellow); color: var(--yellow); }

/* --- GALLERY / HOME PAGE ELEMENTS --- */
.recipe-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: 0.3s; }
.card:hover { transform: translateY(-5px); }
.card-img { height: 180px; background-size: cover; background-position: center; }
.card-body { padding: 20px; }

.footer { padding: 40px 5%; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 50px; }

/* --- PRINT OPTIMIZATION --- */
@media print {
    .no-print { display: none !important; }
    
    body { background: white !important; color: black !important; padding: 0; }
    
    .container { max-width: 100% !important; margin: 0 !important; }

    .recipe-paper {
        background: white !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    .recipe-grid-classic {
        display: block !important; /* Forces layout to stack vertically for paper */
    }
    
    .recipe-hero-img {
        height: 250px !important;
        margin-bottom: 20px !important;
        filter: grayscale(100%); /* Saves colored ink */
        border: 1px solid #ddd !important;
    }
    
    h1, h2, strong { color: black !important; border-bottom-color: #333 !important; }
    
    .ing-list li { border-bottom: 1px solid #ddd !important; color: black !important; }
    .ing-list li strong { color: black !important; }
    
    .notes-box {
        border: 1px solid #ccc !important;
        background: #fdfdfd !important;
        color: #333 !important;
        min-height: 80px !important;
    }
    
    .step { border-bottom: 1px solid #eee !important; }
}
.modal { 
    display: none; position: fixed; z-index: 2000; left: 0; top: 0; 
    width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); 
}
.modal-content { 
    background: var(--bg); border: 1px solid var(--line); margin: 10% auto; 
    padding: 40px; width: 90%; max-width: 450px; border-radius: var(--radius); position: relative; 
}
.close { position: absolute; right: 20px; top: 15px; font-size: 28px; cursor: pointer; color: var(--muted); }
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea { background: var(--panel); border: 1px solid var(--line); padding: 12px; border-radius: 8px; color: white; }

/* --- MOBILE RESPONSIVENESS (SCREEN) --- */
@media (max-width: 900px) {
    .recipe-grid-classic { grid-template-columns: 1fr; }
    .recipe-paper { padding: 20px; }
    .nav-content { display: none; } /* Add menu toggle logic in JS if needed */
}
/* --- ENHANCED BACKGROUND --- */
body {
  margin: 0;
  min-height: 100vh;
  /* Dark base with layered gradients for depth */
  background-color: var(--bg);
  background-image: 
    /* Top-left soft yellow glow */
    radial-gradient(at 0% 0%, rgba(255, 242, 77, 0.15) 0px, transparent 50%),
    /* Bottom-right warm orange glow */
    radial-gradient(at 100% 100%, rgba(255, 91, 3, 0.1) 0px, transparent 50%),
    /* Center deep purple/blue mist for complexity */
    radial-gradient(at 50% 50%, rgba(40, 44, 52, 0.3) 0px, transparent 80%),
    /* Subtle grain texture overlay */
    url("https://www.transparenttextures.com/patterns/stardust.png");
  
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  background-attachment: fixed; /* Keeps background still while scrolling */
}

/* --- ADDING DEPTH TO THE RECIPE PAPER --- */
.recipe-paper {
  background: rgba(255, 255, 255, 0.03); /* Semi-transparent */
  backdrop-filter: blur(20px); /* Glassmorphism effect */
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); /* Soft shadow for "lift" */
  border-radius: var(--radius);
  padding: 40px;
  margin-top: 20px;
}

/* --- ACCENT DECORATION --- */
/* A subtle line under headers to add "designer" feel */
.recipe-header h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--yellow);
  margin: 15px auto 0;
  border-radius: 2px;
}
.container-fluid::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url('https://www.transparenttextures.com/patterns/asfalt-dark.png');
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}