/*
Theme Name: SwipeTheme
Theme URI: https://swipetheme.com
Author: SwipeTheme Team
Author URI: https://swipetheme.com
Description: A TikTok-style WordPress theme with vertical video feed, engagement system, and optimized video delivery
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swipetheme
Tags: video, social, mobile-first, responsive, tiktok-style
*/

/* Safe area CSS variables for iOS notch and modern mobile viewports */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #000;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
}

/* Allow scrolling for add content page */
body.page-template-page-add-content,
body.page-id-* .add-content-container,
.add-content-container {
    overflow: auto !important;
    height: auto !important;
}

/* Allow scrolling on single posts */
body.single-post {
    overflow: auto !important;
    height: auto !important;
}
body.single-post #page,
body.single-post .site {
    height: auto !important;
    overflow: visible !important;
}

/* Ensure body can scroll when add content page is loaded */
body:has(.add-content-container) {
    overflow: auto !important;
    height: auto !important;
}

/* Video Feed Container */
.swipe-feed-container {
    position: relative;
    width: 100%;
    /* Use dynamic viewport units for mobile browser chrome */
    height: 100dvh;
    min-height: -webkit-fill-available;
    overflow-y: scroll;
    touch-action: pan-y; /* allow smooth native vertical scroll handling */
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: calc(80px + var(--safe-bottom)); /* Space for bottom nav */
}

.swipe-feed-container::-webkit-scrollbar {
    display: none;
}

/* Media Item (Video or Image) */
.video-item, .media-item {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: -webkit-fill-available;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden; /* keep overlays and media bounded on mobile */
}

.video-player {
    position: relative;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* preserve full video inside viewport */
    object-position: center center;
    background: #000;
    display: block;
}

/* Image Container */
.image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.media-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* No Media Placeholder */
.no-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

.placeholder {
    color: #666;
    font-size: 18px;
    text-align: center;
}

/* Video Overlay - only background behind text, not covering video */
.video-overlay {
    position: absolute;
    bottom: 80px; /* Move above navigation bar */
    left: 0;
    right: 0;
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-bottom));
    background: none; /* Remove darkening gradient */
    z-index: 5;
    pointer-events: none; /* Allow video interaction */
}

/* Clean video overlay without any backgrounds */
.video-overlay * {
    background: none;
    pointer-events: auto;
}

.video-info {
    margin-bottom: 15px;
}

.video-author {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.follow-btn {
    background: #fe2c55;
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.follow-btn:hover {
    opacity: 0.9;
}

.video-description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-music {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    opacity: 0.9;
}

/* Engagement Actions */
.engagement-actions {
    position: absolute;
    right: 15px;
    bottom: calc(100px + var(--safe-bottom)); /* More space above nav */
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    z-index: 30;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.action-button:active {
    transform: scale(0.9);
}

.action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 22px;
}

.action-button.liked .action-icon {
    background: #fe2c55;
}

.action-count {
    font-size: 12px;
    font-weight: 500;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Comments Panel */
.comments-panel {
    position: fixed;
    bottom: var(--safe-bottom);
    left: 0;
    right: 0;
    background: #fff;
    color: #000;
    border-radius: 20px 20px 0 0;
    transform: translateY(calc(100% + var(--safe-bottom)));
    transition: transform 0.3s ease;
    z-index: 100;
    max-height: 70vh;
    overflow-y: auto;
}

.comments-panel.active {
    transform: translateY(0);
}

.comments-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    text-align: center;
    position: sticky;
    top: 0;
    background: #fff;
}

.comments-list {
    padding: 20px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.comment-text {
    font-size: 14px;
    line-height: 1.4;
}

.comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* Comment Input */
.comment-input-wrapper {
    position: sticky;
    bottom: 0;
    padding: 15px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.comment-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.comment-submit {
    background: #fe2c55;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .video-overlay {
        bottom: 70px; /* Above mobile nav bar */
        padding: 16px;
        padding-bottom: calc(16px + var(--safe-bottom));
    }
    
    .engagement-actions {
        right: 10px;
        bottom: calc(85px + var(--safe-bottom)); /* More space above mobile nav */
        gap: 14px;
    }
    
    .action-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* Desktop Optimization */
@media (min-width: 769px) {
    .swipe-feed-container {
        max-width: 500px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.5);
    }
    
    .video-item {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Single Post Layout Overrides (avoid boxed feed width on singles) */
body.single .video-item,
body.single .media-item,
body.single-post .video-item,
body.single-post .media-item {
    max-width: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    scroll-snap-align: unset !important;
    display: block !important;
}

body.single .video-overlay,
body.single-post .video-overlay {
    bottom: 20px; /* less offset since no full feed nav */
}

/* On single pages, render engagement actions inline under content for better mobile UX */
body.single .engagement-actions,
body.single-post .engagement-actions {
    position: static !important;
    right: auto;
    bottom: auto;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    margin: 12px 0 0 0;
}

/* Single title sizing */
body.single .single-title,
body.single-post .single-title {
    font-size: 22px;
    line-height: 1.25;
}
@media (min-width: 769px) {
    body.single .single-title,
    body.single-post .single-title { font-size: 28px; }
}

/* Ensure title/content are not covered by brand logo overlay */
body.single .single-header,
body.single-post .single-header {
    padding-top: calc(var(--safe-top) + 56px);
}
@media (min-width: 769px) {
    body.single .single-header,
    body.single-post .single-header { padding-top: calc(var(--safe-top) + 40px); }
}

/* Share Modal */
.share-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    color: #000;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 100;
}

/* Ad spot styles */
.ad-spot {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px auto 0 auto;
}
.ad-spot-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.ad-spot-300x250 {
    max-width: 300px;
    max-height: 250px;
    width: 100%;
}
.ad-spot-300x250 iframe,
.ad-spot-300x250 img,
.ad-spot-300x250 div {
    max-width: 300px !important;
    max-height: 250px !important;
}

/* Feed between-item ad: tall, narrower */
.ad-spot-250x600 {
    max-width: 250px;
    max-height: 600px;
    width: 100%;
}
.ad-spot-250x600 iframe,
.ad-spot-250x600 img,
.ad-spot-250x600 div {
    max-width: 250px !important;
    max-height: 600px !important;
}

.share-modal.active {
    transform: translateY(0);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.share-icon {
    width: 50px;
    height: 50px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Brand Logo Overlay */
.brand-logo-overlay {
    position: fixed;
    /* top/left offsets are provided inline from options and include safe-area */
    z-index: 60; /* above engagement (30) and overlay (5) */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    pointer-events: none; /* do not block swipes/taps on content */
}

.brand-logo-overlay .brand-logo-image {
    max-height: 32px;
    width: auto;
    height: auto;
    display: block;
    pointer-events: none;
}

.brand-logo-overlay .brand-logo-text,
.brand-logo-overlay .brand-logo-tube {
    line-height: 1;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    pointer-events: none;
}
/* ================================
   SwipeTheme Auth + Explore + Creators
   ================================ */

/* Auth Container/Card */
.st-auth-container {
    width: 100%;
    min-height: 100dvh;
    padding: 24px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.st-auth-card {
    width: 100%;
    max-width: 420px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
    padding: 20px 18px;
    color: #fff;
}

.st-auth-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
}

.st-auth-errors {
    background: rgba(254,44,85,0.15);
    border: 1px solid rgba(254,44,85,0.5);
    color: #ffd6de;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.st-auth-error-item + .st-auth-error-item {
    margin-top: 6px;
}

.st-auth-form {
    display: grid;
    gap: 12px;
}

.st-field label {
    display: block;
    font-size: 13px;
    color: #ddd;
    margin-bottom: 6px;
}

.st-field input[type="text"],
.st-field input[type="email"],
.st-field input[type="password"] {
    width: 100%;
    background: #0b0b0b;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.st-field input:focus {
    border-color: #fe2c55;
    box-shadow: 0 0 0 2px rgba(254,44,85,0.25);
}

.st-field-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.st-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #ccc;
}

.st-forgot a {
    color: #9ad;
    text-decoration: none;
}

.st-forgot a:hover {
    text-decoration: underline;
}

.st-auth-submit {
    background: #fe2c55;
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.02s;
}

.st-auth-submit:active {
    transform: translateY(1px);
}

.st-auth-submit:hover {
    opacity: 0.92;
}

.st-auth-alt {
    margin-top: 10px;
    font-size: 14px;
    color: #bbb;
}

.st-auth-alt a {
    color: #fff;
    text-decoration: underline;
}

/* Cloudflare Turnstile widget spacing */
.cf-turnstile {
    margin: 6px 0 2px;
}

/* Explore Grid */
.st-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.st-card {
    display: block;
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.st-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.st-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: var(--video-ar, 9 / 16);
    background: #000;
}

.st-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.st-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    position: absolute;
    inset: 0;
}

.st-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.6;
    backdrop-filter: blur(2px);
}

.st-card-meta {
    padding: 10px 10px 12px;
}

.st-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.st-card-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #bbb;
    font-size: 12px;
}

.st-card-author {
    color: #ddd;
}

/* Creators Grid */
.st-grid-creators {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.st-creator-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.st-creator-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.st-creator-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
    border: 1px solid rgba(255,255,255,0.12);
}

.st-creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.st-creator-meta {
    min-width: 0;
}

.st-creator-name {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.15;
}

.st-creator-handle {
    font-size: 12px;
    color: #bbb;
    margin-top: 2px;
}

.st-creator-stats {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #bbb;
    margin-top: 6px;
}

/* Page header */
.st-page-header h1 {
    line-height: 1.2;
}

/* Pagination list normalization inside .st-pagination */
.st-pagination ul {
    list-style: none;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.st-pagination li a,
.st-pagination li span {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
}

.st-pagination li .current {
    background: #fe2c55;
    border-color: #fe2c55;
}

/* Instagram-like Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
    padding-bottom: var(--safe-bottom);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.bottom-nav.hidden,
body:has(.comments-panel.active) .bottom-nav,
body:has(.share-modal.active) .bottom-nav {
    transform: translateY(100%);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 12px;
    min-width: 50px;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #fe2c55;
    border-radius: 1px;
}

.nav-icon {
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.nav-item.active .nav-icon {
    color: #fe2c55;
}

.nav-item:hover .nav-icon {
    color: rgba(255, 255, 255, 0.9);
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.nav-item.active .nav-label {
    color: #fe2c55;
}

.nav-item:hover .nav-label {
    color: rgba(255, 255, 255, 0.9);
}

.profile-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.nav-item.active .profile-avatar {
    border-color: #fe2c55;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bottom navigation animations */
@keyframes navBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-3px) scale(1.1);
    }
    60% {
        transform: translateY(-1px) scale(1.05);
    }
}

.nav-item.bounce {
    animation: navBounce 0.6s ease;
}

/* Hide navigation on scroll (optional) */
.nav-auto-hide {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-auto-hide.scrolling-down {
    transform: translateY(100%);
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .st-card-meta { padding: 8px 8px 10px; }
    .st-card-title { font-size: 13px; -webkit-line-clamp: 2; }
    .st-grid { gap: 10px; }
    .st-grid-creators { gap: 10px; }
    .st-creator-card { padding: 10px; gap: 10px; }
    .st-creator-avatar { width: 48px; height: 48px; }
    .st-auth-card { padding: 18px 16px; }
    
    .bottom-nav {
        height: 70px;
        padding: 0 16px;
    }
    
    .nav-item {
        padding: 6px 8px;
        gap: 2px;
    }
    
    .nav-icon {
        width: 22px;
        height: 22px;
    }
    
    .nav-label {
        font-size: 9px;
    }
    
    .profile-avatar {
        width: 22px;
        height: 22px;
    }
}

/* Explore Page Styles */
.explore-container {
    padding: calc(var(--safe-top) + 20px) 0 calc(var(--safe-bottom) + 80px) 0;
    min-height: 100vh;
    background: #000;
}

.explore-header {
    padding: calc(var(--safe-top) + 60px) 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.explore-header h1 {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.explore-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.explore-filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn.active,
.filter-btn:hover {
    background: #fe2c55;
    border-color: #fe2c55;
    color: #fff;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 0 2px;
}

.explore-item {
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: #111;
}

.explore-item-media {
    width: 100%;
    height: 100%;
    position: relative;
}

.explore-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.explore-item:hover img {
    transform: scale(1.05);
}

.video-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    color: #fff;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

.explore-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px 8px 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.explore-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.stat-item svg {
    width: 14px;
    height: 14px;
}

.no-content {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.6);
}

.no-content svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.no-content h3 {
    font-size: 18px;
    margin: 0 0 8px 0;
    color: rgba(255,255,255,0.8);
}

.load-more-container {
    padding: 20px;
    text-align: center;
}

.load-more-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background: #fe2c55;
    border-color: #fe2c55;
}

/* Responsive */
@media (min-width: 768px) {
    .explore-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        padding: 0 4px;
    }
    
    .explore-header {
        padding: calc(var(--safe-top) + 60px) 24px 20px;
    }
}

@media (min-width: 1024px) {
    .explore-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .explore-container {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Search Results Styles */
.search-loading,
.search-error {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 20px;
}

.search-results-header h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 16px;
    padding: 0 20px;
}

.search-results-list {
    max-height: 60vh;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.result-content h5 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.result-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.result-type {
    color: #fe2c55;
    font-size: 11px;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.no-results h4 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 8px;
}

.suggestion-category {
    margin-bottom: 24px;
}

.suggestion-category:last-child {
    margin-bottom: 0;
}

/* Profile Page Styles */
body.page-template-page-profile,
body.page-template-page-edit-profile {
    overflow: auto !important;
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--safe-top) + 60px) 16px calc(var(--safe-bottom) + 80px);
    min-height: 100vh;
    background: #000;
    overflow: visible;
}

.profile-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 30px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fe2c55;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details {
    text-align: center;
}

.profile-name {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.profile-username {
    color: #8a8a8a;
    font-size: 16px;
    margin: 0 0 12px 0;
}

.profile-bio {
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 20px 0;
    max-width: 300px;
}

.profile-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.stat-label {
    color: #8a8a8a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-actions {
    display: flex;
    gap: 12px;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: #8a8a8a;
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn.active {
    color: #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #fe2c55;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.user-content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.content-grid-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
}

.content-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    z-index: 2;
    text-transform: uppercase;
    font-weight: 600;
}

.status-pending {
    background: rgba(255, 165, 0, 0.9);
}

.status-draft {
    background: rgba(108, 117, 125, 0.9);
}

.content-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
}

.content-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    color: #fff;
    z-index: 2;
}

.content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: flex-end;
    padding: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-grid-item:hover .content-overlay {
    opacity: 1;
}

.content-stats {
    display: flex;
    gap: 12px;
    width: 100%;
}

.content-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.content-stats .stat svg {
    width: 14px;
    height: 14px;
}

.no-content, .coming-soon {
    text-align: center;
    padding: 60px 20px;
    color: #8a8a8a;
}

.no-content svg, .coming-soon svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: #fe2c55;
}

.no-content h3, .coming-soon h3 {
    color: #fff;
    margin: 0 0 8px 0;
    font-size: 18px;
}

.no-content p, .coming-soon p {
    margin: 0 0 20px 0;
    font-size: 14px;
}

/* Edit Profile Styles */
.edit-profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: calc(var(--safe-top) + 60px) 16px calc(var(--safe-bottom) + 80px);
    min-height: 100vh;
    background: #000;
}

.edit-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fe2c55;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.edit-profile-header h1 {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.alert svg {
    width: 20px;
    height: 20px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.profile-section {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.profile-section h2 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.avatar-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.current-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
}

.current-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-info p {
    color: #fff;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.avatar-info small {
    color: #8a8a8a;
    font-size: 12px;
}

.avatar-info a {
    color: #fe2c55;
    text-decoration: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.required {
    color: #fe2c55;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #fe2c55;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #8a8a8a;
}

.form-group small {
    display: block;
    color: #8a8a8a;
    font-size: 12px;
    margin-top: 4px;
}

.char-count {
    text-align: right;
    color: #8a8a8a;
    font-size: 12px;
    margin-top: 4px;
}

.account-info {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.info-item {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    display: block;
    color: #8a8a8a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-item span {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.danger-zone {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 20px;
}

.danger-zone h3 {
    color: #ef4444;
    font-size: 16px;
    margin: 0 0 8px 0;
}

.danger-zone p {
    color: #8a8a8a;
    font-size: 14px;
    margin: 0 0 16px 0;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: #fe2c55;
    color: #fff;
}

.btn-primary:hover {
    background: #e5244a;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design for Profile Pages */
@media (max-width: 768px) {
    .profile-info {
        text-align: center;
    }
    
    .profile-stats {
        gap: 20px;
    }
    
    .profile-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .avatar-section {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 768px) {
    .profile-info {
        flex-direction: row;
        text-align: left;
    }
    
    .profile-details {
        text-align: left;
    }
    
    .user-content-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .user-content-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Media Method Selector */
.media-method-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.method-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.02);
}

.method-option:hover {
    border-color: rgba(254, 44, 85, 0.5);
    background: rgba(254, 44, 85, 0.05);
}

.method-option.active {
    border-color: #fe2c55;
    background: rgba(254, 44, 85, 0.1);
}

.method-option input[type="radio"] {
    display: none;
}

.method-icon {
    width: 32px;
    height: 32px;
    color: #8a8a8a;
    transition: color 0.3s ease;
}

.method-option.active .method-icon {
    color: #fe2c55;
}

.method-option span {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

/* Media Input Sections */
.media-input-section {
    margin-bottom: 24px;
}

.media-input {
    display: none;
}

.media-input.active {
    display: block;
}

/* File Upload Styles */
.file-upload-area {
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(255,255,255,0.02);
}

.file-upload-area:hover {
    border-color: rgba(254, 44, 85, 0.5);
    background: rgba(254, 44, 85, 0.05);
}

.file-upload-area.drag-over {
    border-color: #fe2c55;
    background: rgba(254, 44, 85, 0.1);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-placeholder svg {
    width: 48px;
    height: 48px;
    color: #fe2c55;
}

.upload-text {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.upload-placeholder small {
    color: #8a8a8a;
    font-size: 12px;
}

/* File Preview */
.file-preview {
    margin-top: 20px;
    padding: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    display: none;
}

.file-preview:not(:empty) {
    display: block;
}

.file-info {
    display: flex;
    gap: 16px;
    align-items: center;
}

.file-info img,
.file-info video {
    border-radius: 8px;
}

.file-details {
    color: #fff;
}

.file-details strong {
    display: block;
    margin-bottom: 4px;
}

.file-details small {
    color: #8a8a8a;
}

/* Responsive adjustments for upload */
@media (max-width: 768px) {
    .media-method-selector {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .method-option {
        padding: 16px;
    }
    
    .file-upload-area {
        padding: 30px 16px;
    }
    
    .file-info {
        flex-direction: column;
        text-align: center;
    }
}
