/*
Theme Name: FlameFans
Theme URI: https://example.com/flamefans
Author: FlameFans
Author URI: https://example.com
Description: A premium dark WordPress theme for content creators. Upload creator photos, videos, and share external links (Terabox, Telegram, OnlyFans, Instagram). Features gallery lightbox, video embedding, and a stunning dark design with pink accents.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flamefans
Tags: dark, gallery, adult, content-creator, custom-post-type, grid-layout
*/

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #151515;
    --bg-card-hover: #1c1c1c;
    --bg-surface: #1a1a1a;
    --bg-header: rgba(10, 10, 10, 0.96);
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #5a5a5a;
    --accent: #ff2d7b;
    --accent-hover: #ff4d93;
    --accent-deep: #e91e63;
    --accent-glow: rgba(255, 45, 123, 0.35);
    --accent-gradient: linear-gradient(135deg, #ff2d7b, #e91e63);
    --accent-gradient-2: linear-gradient(135deg, #ff2d7b, #c2185b);
    --border-color: #1e1e1e;
    --border-light: #2a2a2a;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 30px rgba(255, 45, 123, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --content-max-width: 1500px;
    --header-height: 68px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-header);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    transition: all var(--transition-normal);
}

.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
    border-bottom-color: rgba(255, 45, 123, 0.1);
}

.header-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 28px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity var(--transition-fast);
}

.site-logo:hover {
    opacity: 0.85;
}

.site-logo span {
    -webkit-text-fill-color: var(--text-primary);
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu li a {
    display: block;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a,
.nav-menu li.current_page_item a {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
    transition: width var(--transition-normal);
}

.nav-menu li a:hover::after,
.nav-menu li.current-menu-item a::after {
    width: 20px;
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== MAIN CONTENT ===== */
.site-main {
    min-height: calc(100vh - var(--header-height) - 80px);
    padding-top: calc(var(--header-height) + 30px);
}

.content-wrapper {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 28px;
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title .icon {
    font-size: 1.4rem;
}

.page-description {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* ===== POST GRID ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 40px;
}

.post-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    z-index: 2;
}

.post-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Square Thumbnail */
.post-thumb {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 square */
    overflow: hidden;
    background: var(--bg-surface);
}

.post-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.post-card:hover .post-thumb img {
    transform: scale(1.08);
}

/* Overlay */
.post-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.post-card:hover .post-thumb::after {
    opacity: 1;
}

.no-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 2.5rem;
}

/* Media Indicators */
.post-media-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 3;
}

.media-badge {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 7px;
    border-radius: 4px;
}

/* Category Badge */
.post-category-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

/* Card Info */
.post-info {
    padding: 10px 12px 12px;
}

.post-title {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No Results */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-posts h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* ===== PAGINATION ===== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 60px;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.pagination-wrapper .page-numbers:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.pagination-wrapper .page-numbers.current {
    background: var(--accent-gradient);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}

.pagination-wrapper .page-numbers.prev,
.pagination-wrapper .page-numbers.next {
    font-weight: 600;
    padding: 0 18px;
}

.pagination-wrapper .page-numbers.dots {
    border: none;
    background: none;
    color: var(--text-muted);
}

/* ===== SINGLE POST PAGE ===== */
.single-post-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Post Header */
.post-header {
    margin-bottom: 30px;
}

.post-detail-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.post-detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    background: rgba(255, 45, 123, 0.1);
    color: var(--accent);
    border: 1px solid rgba(255, 45, 123, 0.15);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* Description */
.post-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.post-description p {
    margin-bottom: 12px;
}

.post-description p:last-child {
    margin-bottom: 0;
}

/* ===== GALLERY ===== */
.gallery-section {
    margin-bottom: 35px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: var(--bg-surface);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Single main image (featured) */
.featured-image-wrap {
    margin-bottom: 30px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.featured-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== VIDEO SECTION ===== */
.video-section {
    margin-bottom: 35px;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 */
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== EXTERNAL LINKS ===== */
.links-section {
    margin-bottom: 35px;
}

.links-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-normal);
    text-align: left;
}

.link-btn .link-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.link-btn .link-text {
    flex: 1;
}

.link-btn .link-arrow {
    font-size: 1.1rem;
    opacity: 0.5;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.link-btn:hover .link-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Terabox */
.link-btn-terabox {
    background: linear-gradient(135deg, #1a6fdf, #1557b0);
    color: #fff;
}

.link-btn-terabox:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 111, 223, 0.3);
}

/* Telegram */
.link-btn-telegram {
    background: linear-gradient(135deg, #0088cc, #006fa3);
    color: #fff;
}

.link-btn-telegram:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.3);
}

/* OnlyFans */
.link-btn-onlyfans {
    background: linear-gradient(135deg, #00aff0, #008dc7);
    color: #fff;
}

.link-btn-onlyfans:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 175, 240, 0.3);
}

/* Instagram */
.link-btn-instagram {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
}

.link-btn-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.3);
}

/* Other */
.link-btn-other {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.link-btn-other:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ===== TAGS ===== */
.tags-section {
    margin-bottom: 35px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: rgba(255, 45, 123, 0.08);
    color: var(--accent);
    border: 1px solid rgba(255, 45, 123, 0.15);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tag-item:hover {
    background: rgba(255, 45, 123, 0.15);
    border-color: rgba(255, 45, 123, 0.3);
}

/* ===== LIGHTBOX ===== */
.ff-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.ff-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.ff-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.ff-lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.ff-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ff-lightbox-close:hover {
    opacity: 1;
}

.ff-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.ff-lightbox-nav:hover {
    background: rgba(255, 45, 123, 0.3);
    border-color: rgba(255, 45, 123, 0.4);
}

.ff-lightbox-prev {
    left: -60px;
}

.ff-lightbox-next {
    right: -60px;
}

.ff-lightbox-counter {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== SKELETON ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface) 25%, #222 50%, var(--bg-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 28px 0;
    margin-top: 50px;
}

.footer-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.83rem;
}

.footer-text a {
    color: var(--accent);
}

.footer-text a:hover {
    color: var(--accent-hover);
}

.footer-links {
    display: flex;
    gap: 18px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.83rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-social {
    display: flex;
    align-items: center;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 0.83rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-social-link:hover {
    color: #e1306c;
}

/* ===== RESPONSIVE ===== */

/* Keep 6 columns max on all screens */

/* 5 columns */
@media (max-width: 1280px) {
    .posts-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 14px;
    }
}

/* 4 columns */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .post-detail-title {
        font-size: 1.8rem;
    }
}

/* Tablet */
@media (max-width: 850px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        padding: 28px;
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        z-index: 999;
    }

    .main-navigation.active {
        transform: translateX(0);
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav-menu li a {
        padding: 14px 16px;
        font-size: 1.05rem;
        border-radius: var(--radius-sm);
    }

    .nav-menu li a:hover {
        background: rgba(255, 255, 255, 0.04);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ff-lightbox-prev {
        left: 10px;
    }

    .ff-lightbox-next {
        right: 10px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .content-wrapper,
    .single-post-wrapper {
        padding: 0 14px;
    }

    .header-inner {
        padding: 0 14px;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .post-detail-title {
        font-size: 1.5rem;
    }

    .post-info {
        padding: 8px 10px 10px;
    }

    .post-title {
        font-size: 0.8rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .link-btn {
        padding: 12px 16px;
        font-size: 0.88rem;
    }

    .ff-lightbox-content img {
        max-width: 95vw;
        max-height: 80vh;
    }

    .ff-lightbox-close {
        top: -35px;
    }

    .ff-lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

/* Small Mobile */
@media (max-width: 400px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .post-card {
        border-radius: var(--radius-sm);
    }

    .post-title {
        font-size: 0.75rem;
    }
}