/* =========================================================
   GLOBAL RESET & FONTS
   ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-main: #08070a;
    --bg-card: #0f0d13;
    --primary-color: #d60036;
    --primary-deep: #8b0021;
    --primary-glow: #ff1a53;
    --accent-glow: #00f2fe;
    --text-primary: #ffffff;
    --text-secondary: #9ea3b5;
    --glass-bg: rgba(15, 13, 19, 0.85);
    --glass-border: rgba(255, 26, 83, 0.18);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* =========================================================
   HEADER & ULTRA-MODERN SEARCH BAR
   ========================================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 12px 18px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 30px rgba(139, 0, 33, 0.2);
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Logo Design */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo img {
    height: 34px;
    width: 34px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(214, 0, 54, 0.5);
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: rotate(-5deg) scale(1.05);
}

.logo span {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ff2a5f 0%, #b3002d 50%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(214, 0, 54, 0.3));
}

/* PREMIUM SEARCH BAR DESIGN */
.search-container {
    flex: 1;
    max-width: 250px;
}

.search-container form {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 7px 14px;
    border: 1px solid rgba(214, 0, 54, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container form:focus-within {
    background: rgba(214, 0, 54, 0.1);
    border-color: var(--primary-glow);
    box-shadow: 0 0 18px rgba(255, 26, 83, 0.4);
    transform: translateY(-1px);
}

.search-container input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    width: 100%;
    font-size: 0.88rem;
    font-weight: 400;
    padding-right: 8px;
}

.search-container input::placeholder {
    color: #8a8d9b;
    font-size: 0.82rem;
}

.search-container button {
    background: transparent;
    border: none;
    color: #8a8d9b;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.search-container form:focus-within button {
    color: var(--primary-glow);
}

.search-container button:hover {
    transform: scale(1.15);
}

/* =========================================================
   HORIZONTAL TAG BAR (DEEP RED CAPSULES)
   ========================================================= */
.tags-container {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.tags-container::-webkit-scrollbar {
    display: none;
}

.tag-list {
    display: flex;
    gap: 8px;
}

.tag-item {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tag-item:hover {
    background: rgba(214, 0, 54, 0.15);
    color: #ffffff;
    border-color: rgba(255, 26, 83, 0.4);
}

.tag-item.active {
    background: linear-gradient(135deg, #d60036 0%, #7a001e 100%);
    color: #ffffff;
    font-weight: 700;
    border-color: #ff1a53;
    box-shadow: 0 4px 15px rgba(214, 0, 54, 0.5);
}

/* =========================================================
   VIDEO FEED SYSTEM (SNAP SCROLLING)
   ========================================================= */
.video-feed {
    margin-top: 105px;
    height: calc(100vh - 105px);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* কাস্টম সূক্ষ্ম স্ক্রোলবার */
.video-feed::-webkit-scrollbar {
    width: 4px;
}
.video-feed::-webkit-scrollbar-thumb {
    background: var(--primary-deep);
    border-radius: 4px;
}

.video-card {
    width: 100%;
    max-width: 420px;
    height: calc(100vh - 105px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    background-color: #000000;
    flex-shrink: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 1px rgba(214, 0, 54, 0.3);
}

.video-card iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Placeholders Loading Animation */
.video-card.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(110deg, #0d0b12 8%, #1f0810 18%, #0d0b12 33%);
    background-size: 200% 100%;
    animation: shine 1.5s linear infinite;
    color: var(--text-secondary);
    font-weight: 600;
}

@keyframes shine {
    to { background-position-x: -200%; }
}

/* =========================================================
   ULTRA-MODERN VIDEO OVERLAY (DEEP RED ACCENT)
   ========================================================= */
.video-overlay {
    position: absolute;
    bottom: 20px;
    left: 12px;
    right: 75px;
    z-index: 10;
    
    background: linear-gradient(180deg, rgba(8, 7, 10, 0) 0%, rgba(20, 5, 10, 0.75) 30%, rgba(12, 4, 7, 0.96) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    padding: 16px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 26, 83, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(214, 0, 54, 0.05);
    
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.video-overlay:hover {
    border-color: rgba(255, 26, 83, 0.4);
}

.video-overlay h4 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
    letter-spacing: -0.2px;
    margin: 0;
    
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.video-overlay p {
    font-size: 0.8rem;
    font-weight: 400;
    color: #d1d5db;
    line-height: 1.4;
    margin: 0;
    
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-overlay small {
    font-size: 0.75rem !important;
    font-weight: 700;
    color: #ff3366 !important;
    letter-spacing: 0.3px;
    
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
    
    background: rgba(214, 0, 54, 0.12);
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 26, 83, 0.3);
    width: fit-content;
    max-width: 100%;
    
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   SIDEBAR ACTION CONTROLS
   ========================================================= */
.action-sidebar {
    position: absolute;
    right: 14px;
    bottom: 35px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 10;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.action-btn {
    background: rgba(20, 10, 15, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 26, 83, 0.25);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

.action-btn:hover {
    transform: scale(1.12);
    background: rgba(214, 0, 54, 0.25);
    border-color: var(--primary-glow);
    box-shadow: 0 0 15px rgba(255, 26, 83, 0.4);
}

.action-btn.liked {
    color: #ffffff;
    background: linear-gradient(135deg, #ff0044, #990022);
    border-color: #ff1a53;
    box-shadow: 0 0 20px rgba(255, 0, 68, 0.7);
    animation: heartPop 0.35s ease;
}

@keyframes heartPop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.action-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f1f5f9;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

/* =========================================================
   IN-FEED ADVERTISEMENT CARD
   ========================================================= */
.ad-container-card {
    width: 100%;
    max-width: 420px;
    height: calc(100vh - 105px);
    scroll-snap-align: start;
    background: radial-gradient(circle at center, #24050d 0%, #08070a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(255, 183, 3, 0.3);
    overflow: hidden;
}

.ad-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, #ffb703, #ff7700);
    color: #000000;
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(255, 183, 3, 0.5);
}

.ad-container-card img {
    max-width: 88%;
    max-height: 75%;
    border-radius: 14px;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease;
}

.ad-container-card img:hover {
    transform: scale(1.02);
}

/* =========================================================
   PWA FLOATING BUTTON (DEEP RED / NEON ACCENT)
   ========================================================= */
.pwa-install-bottom-right {
    position: fixed;
    bottom: 25px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff0044, #8b0021);
    color: #ffffff;
    border: 1px solid rgba(255, 26, 83, 0.5);
    padding: 12px 22px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 6px 22px rgba(214, 0, 54, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwa-install-bottom-right:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 30px rgba(255, 0, 68, 0.7);
    background: linear-gradient(135deg, #ff1a53, #b3002d);
}

.pwa-install-bottom-right i {
    font-size: 1rem;
}
