/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #FF9F1C;
    /* Orange */
    --secondary: #2EC4B6;
    /* Light Blue/Cyan */
    --accent: #FF99C8;
    /* Light Pink */
    --highlight: #FFBF00;
    /* Yellow */
    --dark: #0F0F0F;
    /* Black/Dark Gray */
    --surface: #1A1A1A;
    /* Slightly lighter dark */
    --text: #F0F0F0;
    --text-muted: #A0A0A0;

    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--text);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

/* --- Navigation --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--accent), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--highlight);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--highlight);
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section (Stream) --- */
.hero {
    padding: 2rem 5%;
    text-align: center;
}

.stream-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(135, 206, 250, 0.2);
    /* Cyan glow */
    border: 2px solid var(--border);
}

iframe,
#leezi {
    width: 100%;
    height: 100%;
}

.offline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.offline-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* --- Search Bar --- */
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
    position: relative;
}

#recipe-search {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    outline: none;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

#recipe-search:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 159, 28, 0.3);
}

#recipe-search::placeholder {
    color: var(--text-muted);
}

/* --- Recipes Section --- */
.recipes {
    padding: 4rem 5%;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

h2 span {
    color: var(--primary);
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.recipe-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--accent);
}

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

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

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

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: var(--text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: 0.3s;
}

.recipe-card:hover .play-icon {
    opacity: 1;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.card-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Modal & Recipe/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--surface);
    margin: auto;
    padding: 2rem;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

.close-modal {
    color: var(--text-muted);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
    /* Fix overlap */
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 10;
    background: var(--surface);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary);
    background: rgba(0, 0, 0, 0.05);
}

background: rgba(255, 255, 255, 0.02);
}

.modal-body {
    padding: 2rem;
}

.video-container {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

/* Metadata (Time, Difficulty) */
.recipe-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
    font-size: 1.1rem;
    color: var(--secondary);
}

.difficulty-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--dark);
    text-transform: uppercase;
}

.difficulty-badge.easy {
    background: #2EC4B6;
}

/* Cyan */
.difficulty-badge.medium {
    background: #FF9F1C;
}

/* Orange */
.difficulty-badge.hard {
    background: #FF99C8;
}

/* Pink */

/* Details Grid */
.recipe-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .recipe-details-grid {
        grid-template-columns: 1fr;
    }
}

.ingredients-list,
.instructions-list {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.ingredients-list h4,
.instructions-list h4 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.ingredients-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.ingredients-list li::before {
    content: '•';
    color: var(--accent);
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.instructions-list ol {
    list-style: none;
    counter-reset: step-counter;
}

.instructions-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.instructions-list li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--accent);
    color: var(--dark);
    border-radius: 50%;
    text-align: center;
    line-height: 1.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

/* --- Socials Page --- */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 3rem 5%;
    flex-wrap: wrap;
    background: linear-gradient(to bottom, var(--dark), var(--surface));
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.social-btn i {
    font-size: 1.4rem;
    color: var(--current-color);
    transition: 0.3s;
}

.social-btn:hover {
    transform: translateY(-5px);
    border-color: var(--current-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.1);
}

.feeds-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.social-feed {
    flex: 1;
    min-width: 400px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 2rem;
    height: fit-content;
}

.social-feed h3 {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.feed-content {
    max-height: 800px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) var(--surface);
}

/* Instagram Grid Style */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    /* Insta style grid */
    gap: 0.5rem;
}

.gallery-item {
    aspect-ratio: 1/1;
    /* Square posts */
    border-radius: 4px;
    /* Slight rounded corners like modern UI */
    overflow: hidden;
    position: relative;
    border: none;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

.gallery-item .overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .gallery {
        column-count: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll to Top --- */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--dark);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    background: var(--highlight);
}

/* --- FAQ Page Styles --- */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.faq-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    padding: 2rem;
    height: 100%;
}

.faq-image-container {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    /* max-height: 300px; */
    /* Optional constraint */
}

.faq-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* Or cover depending on image aspect ratio */
    display: block;
}

.faq-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: left;
}

.faq-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text);
}

.faq-content .highlight-text {
    color: var(--accent);
    font-weight: bold;
    margin-top: 1.5rem;
    text-align: center;
}

.faq-qa {
    margin-bottom: 2rem;
}

.faq-qa h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Admin Login (Premium) --- */
.login-container {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(255, 165, 0, 0.1), transparent);
}

.login-card {
    background: var(--surface);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--border);
    animation: slideUp 0.5s ease;
}

.admin-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--primary);
}

.login-header h2 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.login-header p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.02);
}

.input-group input:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.login-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
}

.error-msg {
    color: #ff4757;
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 20px;
}

/* --- Modal Controls (Horizontal Layout) --- */
.modal-controls-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.03);
    padding: 10px;
    border-radius: 16px;
    flex-wrap: wrap;
}

.control-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 5px;
}

/* Servings (Compact) */
.servings-control {
    background: transparent;
    padding: 0;
    border: none;
    gap: 0.5rem;
}

#serv-count {
    min-width: 20px;
    /* Compact */
}

/* Toggle (Compact) */
.toggle-label {
    width: 120px;
    /* More compact */
    height: 32px;
}

.toggle-slider {
    width: 56px;
    height: 24px;
}

.toggle-checkbox:checked+.toggle-label .toggle-slider {
    transform: translateX(56px);
    /* Adjusted for new width */
}

.toggle-option {
    font-size: 0.75rem;
}

/* Share (Matched) */
.icon-btn {
    width: 32px;
    height: 32px;
    /* Match others */
}