/* Fonts */
/* Sensitive Content Blur & Overlay */
.sensitive-blur {
    filter: blur(40px) brightness(0.7);
    transition: filter 0.5s ease, transform 0.3s ease;
    transform: scale(1.1);
    pointer-events: none;
}

.sensitive-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.sensitive-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    color: white;
    text-align: center;
    padding: 8px 10px 34px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.sensitive-overlay i {
    font-size: 2.2rem;
    margin-bottom: 8px;
    opacity: 0.9;
}

.sensitive-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.sensitive-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 90%;
    line-height: 1.3;
    margin-bottom: 12px;
}

.sensitive-btn {
    background: transparent;
    border: 1.5px solid white;
    color: white;
    padding: 5px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

/* Mobile Adjustments for Sensitive Content */
@media (max-width: 576px) {
    .sensitive-overlay {
        justify-content: flex-start;
        padding: 22px 6px 34px;
    }
    .sensitive-overlay i {
        font-size: 1.35rem;
        margin-bottom: 4px;
    }
    .sensitive-title {
        font-size: 0.78rem;
        margin-bottom: 2px;
        line-height: 1.1;
    }
    .sensitive-desc {
        display: none; /* Hide description on small mobile to save space */
    }
    .sensitive-btn {
        padding: 2px 8px;
        font-size: 0.68rem;
        line-height: 1.2;
    }
}


.revealed .sensitive-blur {
    filter: blur(0) brightness(1);
    transform: scale(1);
}

.revealed .sensitive-overlay {
    opacity: 0;
    pointer-events: none;
}

#lightboxOverlay > button,
#lightboxOverlay > .position-absolute.top-0.start-0,
#lightboxOverlay #quick-seek-container {
    transition: opacity 0.2s ease;
}

#lightboxOverlay.viewer-chrome-hidden > button,
#lightboxOverlay.viewer-chrome-hidden > .position-absolute.top-0.start-0,
#lightboxOverlay.viewer-chrome-hidden #quick-seek-container {
    opacity: 0;
    pointer-events: none;
}

.source-preview-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    height: 480px;
    overflow: hidden;
    position: relative;
}

.source-preview-frame .source-preview-video,
.source-preview-frame .source-preview-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

#lightboxMediaContainer .lb-image-wrap,
#lightboxMediaContainer .short-lb-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

#lightboxMediaContainer .lb-image,
#lightboxMediaContainer .short-lb-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #121217;
    --primary: #f9004d;
    --text-main: #ffffff;
    --text-muted: #888899;
    --glass-bg: rgba(10, 10, 15, 0.85);
    --glass-border: rgba(255, 0, 77, 0.15);
    --border-radius: 4px; /* Sharper corners for Japanese style */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 20px;
    /* Subtle cyber grid background */
    background-image: 
        linear-gradient(rgba(249, 0, 77, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(249, 0, 77, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Bootstrap Overrides for Japanese Neon Theme */
.text-danger { color: var(--primary) !important; }
.bg-danger { background-color: var(--primary) !important; }
.btn-danger {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-danger:hover, .btn-danger:focus, .btn-danger:active {
    background-color: #d10041 !important;
    border-color: #d10041 !important;
    box-shadow: 0 0 15px rgba(249, 0, 77, 0.4);
}
.border-danger { border-color: var(--primary) !important; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Glassmorphism Navigation */
.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-links-container {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
}

@media (max-width: 767.98px) {
    .navbar .container-fluid {
        align-items: flex-start !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .navbar .container-fluid > .d-flex:first-child {
        flex: 1 1 100%;
        min-width: 0;
    }

    .top-nav-links {
        display: flex !important;
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        padding-left: 10px;
        padding-bottom: 2px;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .top-nav-links::-webkit-scrollbar {
        display: none;
    }

    .top-nav-links .nav-custom-link {
        flex: 0 0 auto;
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .top-nav-links .top-admin-link {
        min-width: 42px;
        height: 36px;
        margin-left: 2px;
        justify-content: center;
    }

    .navbar .container-fluid > .d-flex:last-child {
        flex: 1 1 100%;
        justify-content: center;
        min-width: 0;
        gap: 0 !important;
    }

    .navbar .search-label {
        width: min(calc(100vw - 56px), 360px);
        max-width: calc(100vw - 32px);
    }

    .navbar .search-label:focus-within {
        width: min(calc(100vw - 56px), 360px);
        max-width: calc(100vw - 32px);
    }

    .main-content-spacer {
        padding-top: 126px !important;
    }
}

.nav-custom-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
}

.nav-custom-link i {
    font-size: 1rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.nav-custom-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-custom-link:hover i {
    color: var(--primary);
}

.nav-custom-link.active {
    color: #fff;
    background: rgba(249, 0, 77, 0.1);
    border-color: rgba(249, 0, 77, 0.25);
    box-shadow: 0 0 15px rgba(249, 0, 77, 0.15);
}

.nav-custom-link.active i {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

.top-admin-link {
    flex: 0 0 auto;
    min-width: 44px;
    height: 38px;
    padding: 0 !important;
    justify-content: center;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 10px 0;
}

/* Privacy Mode: Hide Bottom Nav on Mobile */
body.hide-bottom-nav-mobile .bottom-nav {
    display: none !important;
}

.nav-item-custom {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: color 0.3s;
    text-decoration: none;
}

.nav-item-custom i {
    font-size: 1.25rem;
}

.nav-item-custom.active,
.nav-item-custom:hover {
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 60vh;
    width: 100%;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, var(--bg-dark), transparent);
}

.hero-tags span {
    font-size: 0.8rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-right: 5px;
    color: #ddd;
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-custom:hover {
    background-color: #f40612;
    color: white;
}

.btn-secondary-custom {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary-custom:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Explore Grid Layout */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 4px 80px 4px;
}

@media (min-width: 992px) {
    .explore-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

.explore-item {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #1a1b1e;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.explore-item img,
.explore-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.explore-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

/* Video Thumbnail Styling */
.video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #000;
}

.preview-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.video-thumbnail:hover .preview-video {
    opacity: 1;
}

.video-thumbnail img {
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover img {
    opacity: 0;
}

.video-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(249, 0, 77, 0.8);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(249, 0, 77, 0.4);
}


/* Carousel Indicator Icon */
.carousel-indicator-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 1.2rem;
    opacity: 0.9;
    z-index: 3;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.rating-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffd700;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 4px;
    backdrop-filter: blur(2px);
}

/* Stories */
.story-circle {
    transition: transform 0.2s, box-shadow 0.2s;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.story-item:hover .story-circle {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

button,
a,
.clickable {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

/* Quick Seek Buttons (Mobile) */
.seek-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.2s;
    outline: none;
    cursor: pointer;
    white-space: nowrap;
}

.seek-btn:active {
    background: rgba(255, 255, 255, 0.2);
}
.media-code-badge { position: absolute; bottom: 10px; left: 10px; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(4px); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; z-index: 20; border: 1px solid rgba(255, 255, 255, 0.1); letter-spacing: 0.5px; pointer-events: none; transition: transform 0.3s ease; } .explore-item:hover .media-code-badge { transform: translateY(-5px); background: var(--primary); }

@media (max-width: 576px) {
    .media-code-badge {
        bottom: 8px;
        left: 8px;
        max-width: calc(100% - 16px);
        font-size: 0.68rem;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Safe Override for active story circle */
.story-item.active .story-circle {
    border-color: var(--primary) !important;
    border-width: 3px !important;
    box-shadow: none !important;
    background-color: var(--bg-dark) !important;
    transform: scale(1.05);
}

.story-item.active span {
    color: var(--primary) !important;
    font-weight: 700;
}

/* --- MODERN SEARCH BAR UI --- */
.search-label {
    position: relative;
    display: flex;
    align-items: center;
    width: 180px;
    border-radius: 10px;
    border: 2px solid #333;
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(10px);
    padding: 3px 10px;
    transition: all 0.3s ease;
    cursor: text;
    box-shadow:
        0 8px 20px rgba(56, 83, 199, 0.15),
        0 -8px 20px rgba(25, 173, 136, 0.15);
}

.search-label:focus-within {
    border-color: #555;
    width: 210px;
    box-shadow:
        10px 10px 30px rgba(56, 83, 199, 0.2),
        -10px -10px 30px rgba(25, 173, 136, 0.2);
}

.search_bar {
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    font-size: 14px;
    color: #fff !important;
    width: 100%;
    margin-left: 8px;
    font-family: inherit;
    box-shadow: none !important;
}

.search_bar::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .search-label {
        width: 200px;
    }
}

/* Settings Gear Animation - Text Only Version */
.settings-anim {
    position: relative;
    color: #ffd700 !important;
    background: transparent !important;
    border: none !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* AV Text in Button */
.av-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    color: #ffffff !important;
    text-shadow: none;
    z-index: 2;
}

.settings-anim:hover {
    background: transparent !important;
}




.admin-quick-edit-btn:hover {
    background: #ff0055;
    color: #ffffff;
    border-color: #ff0055;
    transform: scale(1.15) rotate(12deg);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.8);
}


/* Admin Quick Edit Button on Card */
.admin-quick-edit-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 5 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    border: 2px solid #ff0055 !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7) !important;
    transition: all 0.2s ease-in-out !important;
}

.admin-quick-edit-btn:hover {
    background: #ff0055 !important;
    color: #ffffff !important;
    transform: scale(1.12) !important;
    box-shadow: 0 0 16px rgba(255, 0, 85, 0.9) !important;
}


/* ===================================================
   PREMIUM MODAL STYLING (High Contrast & Clean UI)
   =================================================== */
#uploadModal .modal-content {
    background-color: #14171f !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

#uploadModal label {
    color: #e2e8f0 !important;
}

#uploadModal .form-control,
#uploadModal .form-select {
    background-color: #1c2230 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

#uploadModal .form-control:focus,
#uploadModal .form-select:focus {
    background-color: #22293a !important;
    color: #ffffff !important;
    border-color: #ff0055 !important;
    box-shadow: 0 0 0 3px rgba(255, 0, 85, 0.25) !important;
}

#uploadModal input[type="file"]::file-selector-button {
    background: #2a3346 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px !important;
    padding: 2px 10px !important;
    margin-right: 10px !important;
    cursor: pointer !important;
    font-size: 0.75rem !important;
    transition: all 0.2s ease !important;
}

#uploadModal input[type="file"]::file-selector-button:hover {
    background: #ff0055 !important;
    color: #ffffff !important;
}

#uploadModal code {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ff77a9 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
}


/* Hide card edit buttons when any modal is open */
body.modal-open .admin-quick-edit-btn,
body:has(.modal.show) .admin-quick-edit-btn,
.modal.show ~ * .admin-quick-edit-btn,
.admin-quick-edit-btn.modal-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ensure modal dialog is always on top of everything */
.modal {
    z-index: 10600 !important;
}
.modal-backdrop {
    z-index: 10550 !important;
}


/* ===================================================
   MODAL SCROLLABLE & FOOTER FIT FIX (No Cutoff)
   =================================================== */
#uploadModal {
    overflow: hidden !important;
}

#uploadModal .modal-dialog {
    max-height: 90vh !important;
    margin: 1.5rem auto !important;
    display: flex !important;
    align-items: center !important;
}

#uploadModal .modal-content,
#uploadModal form#quickEditForm.modal-content {
    max-height: 90vh !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

#uploadModal .modal-header {
    flex: 0 0 auto !important;
    padding: 12px 20px !important;
}

#uploadModal .modal-body {
    flex: 1 1 auto !important;
    max-height: calc(90vh - 135px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 16px 20px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 0, 85, 0.4) #14171f;
}

#uploadModal .modal-body::-webkit-scrollbar {
    width: 6px;
}
#uploadModal .modal-body::-webkit-scrollbar-track {
    background: #14171f;
}
#uploadModal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 85, 0.4);
    border-radius: 3px;
}
#uploadModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #ff0055;
}

#uploadModal .modal-footer {
    flex: 0 0 auto !important;
    padding: 10px 20px !important;
    background: #10121a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 10 !important;
}
