/**
 * FlavaFlix Header & Footer 2026
 */

:root {
    --header-bg: #0a0a0a;
    --header-bg-glass: rgba(10, 10, 10, 0.95);
    --accent-red: #e50914;
    --accent-red-hover: #f40d17;
    --accent-red-dark: #b20710;
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --text-muted: #666666;
    --border-subtle: rgba(255, 255, 255, 0.1);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   HEADER STYLES
   ============================================ */
.ff-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.ff-header-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
}

.ff-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 32px;
}

.ff-logo { flex-shrink: 0; }
.ff-logo a { display: block; text-decoration: none; }
.ff-logo img { height: 36px; width: auto; display: block; transition: transform var(--transition-fast); }
.ff-logo a:hover img { transform: scale(1.02); }

.ff-nav-primary {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-start;
    margin-left: 40px;
}

.ff-nav-item { position: relative; }

.ff-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
}

.ff-nav-link:hover, .ff-nav-link.active { color: var(--text-white); background: rgba(255, 255, 255, 0.08); }
.ff-nav-link.active { color: var(--accent-red); }
.ff-nav-link .ff-icon-chevron { width: 12px; height: 12px; transition: transform var(--transition-fast); }
.ff-nav-item:hover .ff-icon-chevron { transform: rotate(180deg); }

.ff-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    padding: 8px 0;
    background: #1a1a1a;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-smooth);
}

.ff-nav-item:hover .ff-dropdown { opacity: 1; visibility: visible; transform: translateY(4px); }

.ff-dropdown-label {
    display: block;
    padding: 8px 20px 4px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ff-dropdown-link {
    display: block;
    padding: 10px 20px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.ff-dropdown-link:hover { color: var(--text-white); background: rgba(255, 255, 255, 0.05); padding-left: 24px; }
.ff-dropdown-divider { height: 1px; background: var(--border-subtle); margin: 8px 16px; }

.ff-nav-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

.ff-search { position: relative; display: flex; align-items: center; }

.ff-search-container {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    overflow: hidden;
    width: 40px;
    transition: all var(--transition-smooth);
}

.ff-search-container.expanded { width: 300px; border-color: var(--accent-red); box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15); }

.ff-search-input {
    flex: 1;
    width: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-smooth);
}

.ff-search-container.expanded .ff-search-input { width: 100%; padding: 10px 16px 10px 0; }

.ff-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    flex-shrink: 0;
}

.ff-search-btn:hover { color: var(--text-white); }
.ff-search-btn svg { width: 18px; height: 18px; }

.ff-user-menu { position: relative; }

.ff-user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    color: var(--text-white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ff-user-toggle:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }

.ff-user-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.ff-user-name { font-size: 13px; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-user-chevron { width: 14px; height: 14px; color: var(--text-muted); transition: transform var(--transition-fast); }
.ff-user-menu:hover .ff-user-chevron { transform: rotate(180deg); }

.ff-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    padding: 8px 0;
    margin-top: 8px;
    background: #1a1a1a;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-smooth);
}

.ff-user-menu:hover .ff-user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.ff-user-dropdown-header { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); }
.ff-user-dropdown-email { font-size: 12px; color: var(--text-muted); }
.ff-user-dropdown-points { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--accent-red); }

.ff-user-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.ff-user-dropdown-link:hover { color: var(--text-white); background: rgba(255, 255, 255, 0.05); }
.ff-user-dropdown-link svg { width: 18px; height: 18px; opacity: 0.7; }
.ff-user-dropdown-link.logout { color: var(--accent-red); border-top: 1px solid var(--border-subtle); margin-top: 8px; }

.ff-user-dropdown-verify {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(229, 9, 20, 0.1);
    border-bottom: 1px solid rgba(229, 9, 20, 0.3);
    color: #e50914;
    text-decoration: none;
    transition: all 0.2s;
}

.ff-user-dropdown-verify:hover {
    background: rgba(229, 9, 20, 0.2);
    color: #e50914;
}

.ff-user-dropdown-verify svg {
    flex-shrink: 0;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ff-user-dropdown-verify .verify-title {
    display: block;
    font-weight: 600;
    font-size: 13px;
}

.ff-user-dropdown-verify .verify-subtitle {
    display: block;
    font-size: 11px;
    color: #f97316;
}

.ff-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-red);
    border: none;
    border-radius: 6px;
    color: var(--text-white);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ff-login-btn:hover { background: var(--accent-red-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3); color: var(--text-white); }

.ff-signup-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background: transparent;
    border: 2px solid var(--accent-red);
    border-radius: 6px;
    color: var(--accent-red);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
    margin-right: 8px;
}

.ff-signup-btn:hover {
    background: var(--accent-red);
    color: var(--text-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.ff-announcement {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 24px;
    background: linear-gradient(90deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
    position: relative;
}

.ff-announcement-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.ff-announcement-text { color: var(--text-gray); }
.ff-announcement-text a { color: var(--accent-red); text-decoration: none; font-weight: 500; }
.ff-announcement-text a:hover { text-decoration: underline; }

.ff-announcement-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--accent-red);
    color: var(--text-white);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    transition: all var(--transition-fast);
}

.ff-announcement-cta:hover { background: var(--accent-red-hover); transform: translateY(-1px); color: var(--text-white); }

.ff-announcement-close {
    position: absolute;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.ff-announcement-close:hover { color: var(--text-white); background: rgba(255, 255, 255, 0.1); }

.ff-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--text-white);
    cursor: pointer;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.ff-mobile-toggle:hover { background: rgba(255, 255, 255, 0.08); }
.ff-mobile-toggle svg { width: 24px; height: 24px; }

/* ============================================
   FOOTER STYLES
   ============================================ */
.ff-footer {
    background: #0d0d0d;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.ff-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.ff-footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding: 48px 0;
}

.ff-footer-col {
    display: flex;
    flex-direction: column;
}

.ff-footer-logo { margin-bottom: 16px; }
.ff-footer-logo img { height: 40px; width: auto; }

.ff-footer-tagline {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.ff-footer-social { display: flex; gap: 12px; }

.ff-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-gray);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.ff-footer-social a:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
    transform: translateY(-2px);
}

.ff-footer-social svg { width: 18px; height: 18px; }

.ff-footer-heading {
    color: var(--text-white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.ff-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ff-footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ff-footer-links a:hover { color: var(--text-white); padding-left: 4px; }
.ff-footer-links .external::after { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E"); margin-left: 4px; opacity: 0.5; }

.ff-footer-newsletter p {
    color: var(--text-gray);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.ff-newsletter-form { display: flex; gap: 8px; }

.ff-newsletter-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-white);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-fast);
}

.ff-newsletter-input::placeholder { color: var(--text-muted); }
.ff-newsletter-input:focus { border-color: var(--accent-red); box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15); }

.ff-newsletter-btn {
    padding: 12px 20px;
    background: var(--accent-red);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.ff-newsletter-btn:hover { background: var(--accent-red-hover); transform: translateY(-1px); }

.ff-footer-reviews {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    width: fit-content;
}

.ff-footer-stars { display: flex; gap: 2px; color: #fbbf24; }
.ff-footer-stars svg { width: 14px; height: 14px; fill: currentColor; }
.ff-footer-rating { color: var(--text-white); font-size: 13px; font-weight: 600; }
.ff-footer-review-count { color: var(--text-muted); font-size: 12px; }

.ff-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--border-subtle);
    gap: 20px;
    flex-wrap: wrap;
}

.ff-footer-copyright { color: var(--text-muted); font-size: 12px; margin: 0; }
.ff-footer-copyright a { color: var(--accent-red); text-decoration: none; }
.ff-footer-copyright a:hover { text-decoration: underline; }

.ff-footer-legal { display: flex; gap: 24px; }
.ff-footer-legal a { color: var(--text-muted); text-decoration: none; font-size: 12px; transition: color var(--transition-fast); }
.ff-footer-legal a:hover { color: var(--text-white); }

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .ff-nav-primary { gap: 2px; margin-left: 24px; }
    .ff-nav-link { padding: 8px 12px; font-size: 12px; }
    .ff-user-name { display: none; }
    .ff-user-toggle { padding: 6px; }
    .ff-footer-main { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .ff-header-inner { padding: 0 16px; }
    .ff-nav-row { height: 60px; gap: 12px; }
    .ff-logo { order: 1; }
    .ff-nav-actions { order: 2; flex: 1; justify-content: flex-end; gap: 8px; }
    .ff-mobile-toggle { display: flex; order: 3; }

    .ff-nav-primary {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--header-bg);
        flex-direction: column;
        padding: 0;
        margin-left: 0;
        overflow-y: auto;
        z-index: 999;
        gap: 0;
        border-top: 1px solid var(--border-subtle);
    }

    .ff-nav-primary.mobile-open { display: flex; }
    .ff-nav-item { width: 100%; border-bottom: 1px solid var(--border-subtle); }
    .ff-nav-link { width: 100%; padding: 18px 20px; font-size: 15px; justify-content: space-between; border-radius: 0; background: transparent; }
    .ff-nav-link:hover, .ff-nav-link.active { background: rgba(255, 255, 255, 0.05); }
    .ff-nav-link .ff-icon-chevron { width: 16px; height: 16px; }

    .ff-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(0, 0, 0, 0.4);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        min-width: 100%;
    }

    .ff-nav-item.mobile-dropdown-open .ff-dropdown { max-height: 600px; }
    .ff-dropdown-label { padding: 14px 20px 8px 28px; font-size: 11px; }
    .ff-dropdown-link { padding: 14px 20px 14px 28px; font-size: 14px; }
    .ff-dropdown-link:hover { padding-left: 32px; }
    .ff-dropdown-divider { margin: 8px 20px; }
    .ff-nav-item:hover .ff-icon-chevron { transform: none; }
    .ff-search-container.expanded { position: fixed; top: 70px; left: 16px; right: 16px; width: auto; border-radius: 8px; z-index: 1001; }
    .ff-announcement { flex-wrap: wrap; text-align: center; padding: 12px 40px 12px 16px; gap: 8px; }
    .ff-announcement-icon { display: none; }
    .ff-announcement-text { width: 100%; }
    .ff-login-btn { padding: 8px 14px; font-size: 12px; }
    .ff-login-btn svg { width: 16px; height: 16px; }

    .ff-footer-main { grid-template-columns: 1fr; gap: 32px; padding: 32px 0; }
    .ff-footer-col { text-align: center; align-items: center; }
    .ff-footer-social { justify-content: center; }
    .ff-footer-links { align-items: center; }
    .ff-newsletter-form { flex-direction: column; width: 100%; max-width: 320px; }
    .ff-footer-reviews { margin: 20px auto 0; }
    .ff-footer-bottom { flex-direction: column; text-align: center; gap: 16px; }
    .ff-footer-legal { flex-wrap: wrap; justify-content: center; gap: 16px; }
}

@media (max-width: 480px) {
    .ff-logo img { height: 28px; }
    .ff-nav-actions { gap: 6px; }
    .ff-search-btn { width: 36px; height: 36px; }
    .ff-search-container { width: 36px; }
    .ff-user-avatar { width: 32px; height: 32px; }
    .ff-login-btn span { display: none; }
    .ff-login-btn { padding: 10px; }
    .ff-signup-btn { display: none; }
    .ff-mobile-toggle { width: 40px; height: 40px; }
    .ff-footer-inner { padding: 0 16px; }
    .ff-footer-legal { gap: 12px; }
    .ff-footer-legal a { font-size: 11px; }
}

/* Hide old header/footer */
#wrapper > header:not(.ff-header),
#pageFooter,
.old-header,
.old-footer { display: none !important; }
