/* Font loaded via <link> in HTML for better performance */

/* Skip link for keyboard accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--primary);
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    z-index: 9999;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

: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: 1000;
    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%;
}

.lang-switcher {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 0.5rem;
}

.lang-switcher option {
    background: var(--dark);
    color: var(--text);
}

.menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: var(--dark);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 1100;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(255, 159, 28, 0.35);
    flex-shrink: 0;
}

.menu-btn .menu-icon-close {
    display: none;
}

.menu-btn.active {
    background: #ff4d6d;
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 77, 109, 0.4);
    transform: none;
}

.menu-btn.active .menu-icon-open {
    display: none;
}

.menu-btn.active .menu-icon-close {
    display: block;
}

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

.stream-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.tag-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: default;
}

.tag-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* --- Post Type Toggle --- */
.post-type-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
}

.toggle-btn {
    flex: 1;
    cursor: pointer;
}

.toggle-btn input {
    display: none;
}

.toggle-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.toggle-btn input:checked+span {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 4px 12px rgba(255, 159, 28, 0.3);
}

/* --- Status Badge --- */
.status-badge {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.2rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.status-badge .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-badge.live {
    border-color: #ff4d4d;
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.3);
}

.status-badge.live .dot {
    background: #ff4d4d;
    box-shadow: 0 0 8px #ff4d4d;
    animation: blink 1.5s infinite;
}

.status-badge.offline {
    opacity: 0.7;
}

.status-badge.offline .dot {
    background: #555;
}

@keyframes blink {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.stream-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 300px;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 159, 28, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

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

.twitch-load-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 100%;
    min-height: 200px;
    border: none;
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.25), rgba(15, 15, 15, 0.95));
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
}

.twitch-load-btn i {
    font-size: 2.5rem;
    color: #9146FF;
}

.twitch-load-btn small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.twitch-load-btn:hover,
.twitch-load-btn:focus-visible {
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.4), rgba(15, 15, 15, 0.95));
    transform: scale(1.01);
}

.twitch-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    height: 100%;
    min-height: 200px;
    color: #9146FF;
    font-weight: 600;
}

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

/* --- Entrance Animations --- */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

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

.recipe-card {
    animation: fadeSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger indices if generated by JS - we can handle this in ui.js or with CSS nth-child */
.recipe-card:nth-child(1) {
    animation-delay: 0.1s;
}

.recipe-card:nth-child(2) {
    animation-delay: 0.15s;
}

.recipe-card:nth-child(3) {
    animation-delay: 0.2s;
}

.recipe-card:nth-child(4) {
    animation-delay: 0.25s;
}

.recipe-card:nth-child(5) {
    animation-delay: 0.3s;
}

.recipe-card:nth-child(6) {
    animation-delay: 0.35s;
}

.recipe-card:nth-child(n+7) {
    animation-delay: 0.4s;
}


.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 --- */
.login-card {
    max-width: 450px;
    width: 90%;
}

.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);
}

/* Recipe tag filters */
.recipe-tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-width: 800px;
    margin: -2rem auto 2rem;
}

.tag-filter {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
    text-transform: capitalize;
}

.tag-filter:hover,
.tag-filter.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 159, 28, 0.1);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.recipe-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 143, 171, 0.15);
    color: var(--secondary);
    text-transform: capitalize;
}

/* LQIP blur placeholder */
.lqip-wrap {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(0);
}

.lqip-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.lqip-img:not([src]) {
    opacity: 0;
}

/* Preview mode banner */
.preview-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(90deg, #9146ff, #ff8fab);
    color: #fff;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.preview-banner + header,
body:has(.preview-banner) header {
    margin-top: 2.5rem;
}

.draft-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #9146ff;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
}

.recipe-card.is-draft {
    opacity: 0.85;
    outline: 2px dashed #9146ff;
}

.recipe-card {
    position: relative;
}

.fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s, background 0.2s;
    backdrop-filter: blur(4px);
}

.fav-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.75);
}

.fav-btn.active {
    color: #ff4d6d;
    background: rgba(0, 0, 0, 0.7);
}

.fav-btn.active i {
    animation: fav-pop 0.3s ease;
}

@keyframes fav-pop {
    50% { transform: scale(1.35); }
}

.tag-filter.fav-filter.active {
    border-color: #ff4d6d;
    color: #ff4d6d;
    background: rgba(255, 77, 109, 0.12);
}

.favorites-hint {
    text-align: center;
    color: #ff4d6d;
    font-size: 0.9rem;
    margin: -1rem auto 1.5rem;
}

/* Video lazy placeholder */
.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 200px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.video-placeholder i {
    font-size: 3rem;
    color: var(--primary);
}

.carousel-container {
    touch-action: pan-y pinch-zoom;
}

.carousel-swipe-hint {
    display: none;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.35rem 0 0;
}

@media (max-width: 768px) {
    .carousel-swipe-hint {
        display: block;
    }
}

/* Mango Corner widget */
.mango-corner {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 900;
    max-width: 260px;
}

.mango-corner-inner {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

.mango-corner-icon {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    flex-shrink: 0;
}

.mango-corner-icon-img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.mango-corner-emoji {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.mango-corner-bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px 12px 12px 4px;
    padding: 0.65rem 0.85rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.mango-corner-bubble strong {
    display: block;
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.mango-corner-text {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.35;
}

.mango-corner-hint {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.mango-corner.mango-bounce .mango-corner-icon,
.mango-corner.mango-bounce .mango-corner-emoji {
    animation: mango-bounce 0.4s ease;
}

@keyframes mango-bounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px) rotate(-8deg); }
}

@media (max-width: 600px) {
    .mango-corner {
        bottom: 0.75rem;
        right: 0.75rem;
        max-width: 200px;
    }
    .mango-corner-emoji { font-size: 2rem; }
    .modal-top-row { flex-wrap: wrap; }
    .share-btn { width: 100%; justify-content: center; }
}

.card-image {
    position: relative;
}

/* --- 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-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.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%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

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

.card-image video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    transition: transform 0.5s ease;
}

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

.no-image-placeholder {
    width: 100%;
    height: 100%;
    background: #252525;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 0.5rem;
    font-size: 0.9rem;
}

.no-image-placeholder i {
    font-size: 2rem;
    opacity: 0.3;
}

.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: 1rem;
}

.card-content h3 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    color: var(--secondary);
}

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

/* --- 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;
}

@media print {
    body * {
        visibility: hidden;
    }

    #recipe-modal,
    #recipe-modal * {
        visibility: visible;
    }

    #recipe-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .close-modal,
    .modal-toolbar,
    .share-btn,
    .modal-controls-bar,
    .carousel-control,
    .carousel-dots,
    .print-btn,
    .modal-gallery-item {
        display: none !important;
    }

    .modal-content {
        max-width: 100%;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 0;
        overflow: visible;
        height: auto;
    }
}

.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 {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    backdrop-filter: blur(8px);
    font-size: 1.2rem;
}

.close-modal:hover {
    background: var(--primary);
    color: var(--dark);
    transform: rotate(90deg) scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 159, 28, 0.4);
}

.close-modal i {
    transition: transform 0.3s ease;
}

.modal-body {
    padding: 1rem 0 0;
}

/* Print Button in modal */
.print-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.2s;
}

.print-btn:hover {
    background: var(--primary);
    color: var(--dark);
    border-color: var(--primary);
}

.video-container {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    max-height: 70vh;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-container video,
.video-container iframe {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: none;
}

/* 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;
}

.meta-left {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

@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,
.feed-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.social-feed {
    flex: 1;
    min-width: min(400px, 100%);
    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);
}

.behold-feed-wrapper {
    min-height: 300px;
    border-radius: 12px;
    overflow: hidden;
}

.behold-feed-wrapper behold-widget {
    width: 100%;
}

.twitter-feed-wrapper {
    min-height: 300px;
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

/* Mango Hero Section */
.mango-hero {
    width: 100%;
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.mango-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin: 0 0 1.5rem;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
}

.mango-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: block;
    margin: 0 auto;
}

/* 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;
}

.gallery-expand-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.gallery-item:hover .gallery-expand-hint,
.gallery-item:focus-visible .gallery-expand-hint {
    opacity: 1;
}

/* Full cosplay page — layout driven by CSS vars (set from admin) */
.cosplay-page {
    padding: 1rem 2% 3rem;
    width: 100%;
    max-width: min(var(--cosplay-max-w, 1100px), 100%);
    margin: 0 auto;
}

.cosplay-page-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.cosplay-page-header h1 {
    font-size: clamp(1.6rem, 5vw, 2.25rem);
    color: var(--highlight);
    margin-bottom: 0.5rem;
}

.cosplay-page-hint {
    color: var(--text-muted);
    font-size: clamp(0.82rem, 2.5vw, 0.95rem);
    line-height: 1.45;
    max-width: 36rem;
    margin: 0 auto;
}

.cosplay-tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.gallery-cosplay-full {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    gap: var(--cosplay-gap, 1.25rem);
}

.gallery-cosplay-full.cosplay-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-cosplay-full.cosplay-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-cosplay-full .gallery-item {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: var(--cosplay-aspect, 5/6);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
    min-height: 280px;
}

.gallery-cosplay-full .gallery-item .overlay {
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    padding: 2.5rem 0.85rem 0.85rem;
    text-align: left;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
    opacity: 1;
    font-size: 0.95rem;
}

.gallery-cosplay-full .gallery-expand-hint {
    opacity: 0.85;
}

.gallery-cosplay-full .gallery-item:hover img {
    transform: scale(1.03);
}

@media (max-width: 539px) {
    .cosplay-page {
        max-width: 100%;
        padding: 0.75rem 0.5rem 2.5rem;
    }

    .gallery-cosplay-full,
    .gallery-cosplay-full.cosplay-cols-2,
    .gallery-cosplay-full.cosplay-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-cosplay-full .gallery-item {
        min-height: 320px;
        border-radius: 10px;
    }

    .cosplay-tag-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.35rem;
    }

    .cosplay-tag-filters::-webkit-scrollbar {
        display: none;
    }

    .cosplay-tag-filters .tag-filter {
        flex-shrink: 0;
    }
}

.cosplay-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.cosplay-card-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 140, 66, 0.85);
    color: #1a1a1a;
    font-weight: 600;
}

.cosplay-social-link {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 3;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 1.05rem;
    transition: transform 0.2s, background 0.2s;
}

.cosplay-social-link:hover {
    transform: scale(1.08);
    background: var(--primary);
    color: #1a1a1a;
}

.lightbox-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--primary);
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
}

.lightbox-social-link:hover {
    filter: brightness(1.08);
}

.cosplay-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
    grid-column: 1 / -1;
}

@media (max-width: 767px) {
    .lightbox-modal {
        padding: 0.5rem;
        padding-top: max(0.5rem, env(safe-area-inset-top));
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }

    .lightbox-close {
        top: max(12px, env(safe-area-inset-top));
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 1.35rem;
    }

    .lightbox-prev {
        left: 8px;
        width: 44px;
        height: 56px;
        font-size: 1.5rem;
    }

    .lightbox-next {
        right: 8px;
        width: 44px;
        height: 56px;
        font-size: 1.5rem;
    }

    .lightbox-content img {
        max-height: 72vh;
    }

    .lightbox-caption {
        font-size: 0.9rem;
    }

    .lightbox-social-link {
        font-size: 0.85rem;
        padding: 0.45rem 0.85rem;
    }
}

/* --- Legal Pages --- */
.legal-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.legal-main h1 {
    font-size: 2.5rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.legal-main h1 i {
    margin-right: 0.5rem;
}

.legal-updated {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
    font-style: italic;
}

.legal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
}

.legal-content h3 {
    font-size: 1.3rem;
    color: var(--secondary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.legal-content h3:first-child {
    margin-top: 0;
}

.legal-content h4 {
    font-size: 1.05rem;
    color: var(--accent);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.legal-content p {
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.legal-content ul {
    list-style: none;
    margin: 0.5rem 0 1rem 0;
    padding: 0;
}

.legal-content ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.4rem;
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text);
}

.legal-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.legal-content a {
    color: var(--secondary);
    text-decoration: underline;
    text-decoration-color: rgba(46, 196, 182, 0.3);
    text-underline-offset: 2px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.legal-content a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.legal-content code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary);
}

@media (max-width: 600px) {
    .legal-main {
        padding: 2rem 1rem 3rem;
    }

    .legal-main h1 {
        font-size: 1.8rem;
    }

    .legal-content {
        padding: 1.5rem 1.25rem;
    }

    .legal-content h3 {
        font-size: 1.15rem;
    }
}

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

.site-version {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.75;
    letter-spacing: 0.02em;
}

.site-version:hover {
    opacity: 1;
}

/* --- Mobile --- */
@media (max-width: 768px) {
    header {
        position: sticky;
        padding: 0.75rem 4%;
        padding-top: max(0.75rem, env(safe-area-inset-top));
        gap: 0.75rem;
    }

    .logo {
        font-size: 1.25rem;
        letter-spacing: 1px;
        min-width: 0;
        flex: 1;
    }

    .logo img {
        height: 36px !important;
        width: 36px !important;
        margin-right: 8px !important;
        flex-shrink: 0;
    }

    .nav-links {
        display: none;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100dvh;
        background: rgba(8, 8, 8, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.35rem;
        padding: max(5rem, calc(env(safe-area-inset-top) + 3rem)) 1.25rem 2rem;
        text-align: center;
        border: none;
        box-shadow: none;
        z-index: 1050;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        animation: navFadeIn 0.25s ease-out;
    }

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

    .nav-links a {
        display: block;
        width: 100%;
        max-width: 300px;
        padding: 1rem 1.5rem;
        font-size: 1.2rem;
        color: var(--text);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--border);
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--dark);
        background: var(--primary);
        border-color: var(--primary);
    }

    .nav-links a::after {
        display: none;
    }

    @keyframes navFadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .menu-btn {
        display: flex;
    }

    body.nav-open {
        overflow: hidden;
    }

    .hero {
        padding: 1rem 3%;
    }

    .stream-container {
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    }

    .stream-tags {
        gap: 0.45rem;
        margin-top: 1rem;
        padding: 0 0.25rem;
    }

    .tag-pill {
        font-size: 0.72rem;
        padding: 0.35rem 0.65rem;
    }

    .recipes {
        padding: 2.5rem 4%;
        padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
    }

    h2 {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }

    .search-container {
        margin-bottom: 1rem;
    }

    #recipe-search {
        font-size: 16px;
        padding: 0.85rem 1rem;
        min-height: 48px;
    }

    .recipe-tag-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: 100%;
        margin: 0 0 1.25rem;
        padding: 0.25rem 0 0.5rem;
        gap: 0.45rem;
    }

    .recipe-tag-filters::-webkit-scrollbar {
        display: none;
    }

    .tag-filter {
        flex-shrink: 0;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .card-info {
        padding: 1rem;
    }

    .card-info h3 {
        font-size: 1.05rem;
    }

    .social-links {
        padding: 1.75rem 4%;
        gap: 0.65rem;
    }

    .social-btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        font-size: 1rem;
    }

    .feed-container {
        padding: 0 4%;
    }

    .mango-hero {
        padding: 1.25rem;
    }

    .mango-image {
        max-width: 100%;
        height: auto;
    }

    .anonymous-section {
        padding: 0 4% 2rem;
    }

    .anonymous-message-form textarea {
        font-size: 16px;
        min-height: 120px;
    }

    .submit-btn {
        width: 100%;
        min-height: 48px;
    }

    .mango-corner {
        bottom: max(0.75rem, env(safe-area-inset-bottom));
        left: 0.75rem;
        right: auto;
        max-width: min(220px, calc(100vw - 1.5rem));
    }

    .scroll-top-btn {
        bottom: max(5rem, calc(env(safe-area-inset-bottom) + 4.5rem));
        right: max(1rem, env(safe-area-inset-right));
    }

    .modal-top-row {
        flex-direction: column;
        align-items: stretch;
        padding-right: 2.75rem;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .share-btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    .close-modal {
        top: 0.85rem;
        right: 0.85rem;
    }

    .carousel-control {
        width: 44px;
        height: 44px;
    }

    .fav-btn {
        width: 44px;
        height: 44px;
    }

    .gallery:not(.gallery-cosplay-full) {
        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-main {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 4rem 2rem;
}

.faq-main h1 {
    font-size: 3rem;
    color: var(--highlight);
    text-align: center;
    margin-bottom: 3rem;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

#faq-cards-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.faq-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.faq-image-container {
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface);
}

.faq-image-container img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    object-position: center;
}

.faq-image-container.faq-img-full {
    flex: 1;
}

.faq-image-container.faq-img-full img {
    max-height: none;
    object-fit: cover;
}

.faq-image-container.faq-img-contain img {
    max-height: 600px;
}

.faq-image-container.faq-img-small img {
    max-height: 250px;
}

.faq-image-container.faq-img-medium img {
    max-height: 500px;
}

.faq-image-container.faq-img-large img {
    max-height: 600px;
}

/* Skeleton loader for FAQ cards */
.faq-skeleton {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.faq-skeleton .skeleton-img {
    width: 100%;
    height: 300px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.faq-skeleton .skeleton-text {
    padding: 1.25rem;
    flex: 1;
}

.faq-skeleton .skeleton-line {
    height: 0.9rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.faq-skeleton .skeleton-line:nth-child(1) { width: 60%; height: 1.2rem; }
.faq-skeleton .skeleton-line:nth-child(2) { width: 100%; }
.faq-skeleton .skeleton-line:nth-child(3) { width: 85%; }
.faq-skeleton .skeleton-line:nth-child(4) { width: 70%; }

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.faq-content {
    flex: 1;
    min-height: 0;
    padding: 1.25rem;
}

.turnstile-container {
    margin: 0.75rem 0;
}

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

.faq-content p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: var(--text);
    font-size: 0.9rem;
}

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

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

.faq-qa h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.faq-qa p {
    font-size: 0.85rem;
}

.faq-link {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}

.faq-link:hover {
    color: var(--accent);
}

.faq-clickable-image {
    display: block;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.faq-clickable-image:hover {
    opacity: 0.9;
}

.anonymous-message-form textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.anonymous-message-form .form-hint {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.anonymous-message-form .submit-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--secondary);
    background: var(--surface);
    color: var(--secondary);
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.anonymous-message-form .submit-btn:hover:not(:disabled) {
    background: var(--secondary);
    color: var(--dark);
}

.faq-feedback {
    margin-top: 1rem;
    font-size: 1rem;
}

.faq-feedback.success {
    color: var(--accent);
}

.faq-feedback.error {
    color: #e74c3c;
}

/* Anonymous message (Socials page) */
.anonymous-section {
    width: 100%;
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 0 2rem;
}

.faq-card-anonymous {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    min-height: auto;
}

.faq-anonymous-section {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 0 2rem;
}

.faq-anonymous-section .faq-content h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.anonymous-message-form textarea {
    width: 100%;
    font-size: 16px;
}

@media (max-width: 600px) {
    .anonymous-section {
        padding: 0 1rem;
    }
}

@media (max-width: 1200px) {
    #faq-cards-container {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
}

@media (max-width: 900px) {
    #faq-cards-container {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 600px) {
    #faq-cards-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .faq-main {
        padding: 2rem 1rem;
    }
}

/* --- Modal Header & Controls --- */
.modal-header {
    padding: 0 2.5rem 0.75rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-right: 3rem; /* clear absolute close button */
}

.modal-title {
    font-size: 1.5rem;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.share-btn {
    flex-shrink: 0;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--dark) !important;
    font-weight: 700;
}

.share-btn:hover {
    background: #ffb347 !important;
    color: var(--dark) !important;
    transform: translateY(-1px);
}

.modal-toolbar.servings-toolbar {
    display: flex;
    align-items: center;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.toolbar-btn:hover {
    background: var(--secondary);
    color: #fff;
}

/* Legacy — kept for print hide rule compatibility */
.modal-controls-bar {
    display: none;
}

.control-divider {
    display: none;
}

/* Servings Control */
.servings-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    padding: 0;
    border: none;
}

.servings-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.25rem;
}

.servings-label i {
    color: var(--primary);
    font-size: 1.1rem;
}

.serv-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: var(--surface);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: bold;
}

.serv-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

.serv-btn:active {
    transform: scale(0.95);
}

#serv-count {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    color: var(--primary);
}

/* Share Button */
.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    background: white;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.icon-btn:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 6px 16px rgba(255, 105, 180, 0.4);
}

.icon-btn:active {
    transform: translateY(-1px) rotate(0deg);
}

/* Unify content width with carousel */
.content-block {
    max-width: 600px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

/* --- Simple Post (Social Media Style) --- */
.simple-post-content {
    background: var(--surface);
    border-radius: 12px;
    padding: 0;
    /* Removed padding */
    margin-top: 1rem;
    /* Removed max-width/centering */
}

.simple-post-text {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
    text-align: left;
    margin-bottom: 2rem;
}

.recipe-intro {
    text-align: left;
    white-space: pre-wrap;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-size: 1.1rem;
    line-height: 1.6;
}

.ingredients-list li.checked {
    text-decoration: line-through;
    opacity: 0.5;
}

/* --- Twitter Embed Dark Mode / Size Fixes --- */
.twitter-feed-wrapper {
    min-height: 500px;
    background: var(--surface);
    border-radius: 12px;
    padding: 0;
    display: flex;
    justify-content: center;
    border: 1px solid var(--border);
    overflow: hidden;
}

/* --- Gallery Editor (Admin) --- */
.gallery-editor {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.gallery-editor .gallery-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #eee;
    transition: all 0.2s;
}

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

.gallery-editor .gallery-item.is-cover {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
}

.gallery-editor .gallery-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 10;
}

.gallery-editor .gallery-item .cover-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 159, 28, 0.9);
    color: white;
    font-size: 10px;
    text-align: center;
    padding: 2px;
    display: none;
    font-weight: bold;
}

.gallery-editor .gallery-item.is-cover .cover-badge {
    display: block;
}

.gallery-editor .gallery-item:hover .set-cover-btn {
    display: flex;
    /* Show overlay on hover */
}

/* Invisible overlay click target to set cover */
.set-cover-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.modal-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin: 1.5rem 0;
}

.modal-gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid transparent;
}

.modal-gallery-item:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

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

/* --- Modal Carousel --- */
.modal-carousel {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 4/3;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-img,
.carousel-slide iframe,
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #111;
    border: none;
}

.media-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.carousel-control:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: 0.3s;
}

.carousel-dots .dot.active {
    background: var(--primary);
    width: 25px;
    border-radius: 10px;
}

@media (max-width: 600px) {
    .modal-carousel {
        aspect-ratio: 1;
    }
}

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface);
    color: var(--text);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left-color: #2ecc71;
}

.toast-error {
    border-left-color: #e74c3c;
}

.toast-info {
    border-left-color: var(--primary);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.toast-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: background 0.2s, color 0.2s;
}

.toast-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
}

/* --- Lightbox --- */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 2rem;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-height: 85vh;
    border-radius: 8px;
}

.lightbox-caption {
    margin: 0.75rem 0 0;
    color: #fff;
    text-align: center;
    font-size: 1rem;
    max-width: 90vw;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    width: 60px;
    height: 80px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: 0.3s;
    border-radius: 4px;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    display: none;
}

@media (max-width: 600px) {
    .modal-content {
        width: 95% !important;
        padding: 1.5rem 1rem !important;
        max-height: 95vh !important;
        border-radius: 12px;
    }

    .modal-body {
        padding: 1rem 0.5rem !important;
    }

    .content-block {
        padding: 0 0.5rem;
    }

    .recipe-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .meta-left {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .print-btn {
        width: 100%;
        justify-content: center;
    }

    .ingredients-list,
    .instructions-list {
        padding: 1.2rem 1rem;
    }

    .carousel-control {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* --- Unified Admin Gallery --- */
.media-actions-bar .add-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.2s;
}

.media-actions-bar .add-btn:hover {
    background: var(--primary);
    color: var(--dark);
    border-color: var(--primary);
}

.gallery-editor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

@media (max-width: 480px) {
    .gallery-editor {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.8rem;
    }
}

.gallery-editor .gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a;
    border: 2px solid transparent;
}

.gallery-editor .gallery-item.is-cover {
    border-color: var(--primary);
}

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

.video-preview-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
    background: #000;
}

.media-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 34px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
    opacity: 0;
    transition: 0.2s;
}

.gallery-editor .gallery-item:hover .media-controls {
    opacity: 1;
}

.ctrl-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
}

.ctrl-btn:hover {
    color: var(--primary);
}

.ctrl-btn.remove-btn:hover {
    color: #ff4444;
}

.media-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.cover-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--primary);
    color: var(--dark);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    display: none;
}

.gallery-editor .gallery-item.is-cover .cover-badge {
    display: block;
}

/* Minimum touch target size (44x44px) */
.carousel-control,
.lightbox-nav,
.lightbox-close {
    min-width: 44px;
    min-height: 44px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}