:root {
    --bg-color: #070913;
    --card-bg: rgba(13, 17, 33, 0.85);
    --border-color: rgba(147, 51, 234, 0.25);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* --- Simple Sharp 18+ Modal Styles --- */
.age-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.age-modal-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.age-modal-box {
    background: #111; border: 2px solid #a855f7; border-radius: 0; padding: 30px; text-align: center; max-width: 400px; width: 100%;
}
.modal-title { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.modal-desc { font-size: 0.95rem; color: #ccc; margin-bottom: 25px; line-height: 1.5; }
.modal-buttons { display: flex; gap: 15px; justify-content: center; }
.modal-buttons .btn { flex: 1; padding: 12px 0; width: 100%; font-size: 0.9rem; text-align: center; border-radius: 0; cursor: pointer; font-weight: 700; border: 1px solid transparent; }
.exit-btn { background: #333; color: #fff; }
.exit-btn:hover { background: #444; }
.enter-btn { background: #a855f7; color: #fff; }
.enter-btn:hover { background: #8b3dce; }

/* --- Menu Overlay --- */
.menu-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px); z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
.menu-overlay.active { opacity: 1; visibility: visible; }

/* --- Hamburger Menu & Side Nav --- */
.hamburger { width: 32px; height: 24px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; position: relative; z-index: 1005; }
.hamburger span { display: block; width: 100%; height: 3px; background-color: #fff; border-radius: 3px; transition: all 0.3s ease-in-out; }
.hamburger.open span:nth-child(1) { transform: translateY(10.5px) rotate(45deg); background-color: #a855f7; }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); background-color: #a855f7; }

.side-menu { position: fixed; top: 0; right: -100%; width: 250px; height: 100vh; background: rgba(13, 17, 33, 0.98); backdrop-filter: blur(15px); z-index: 1001; display: flex; flex-direction: column; padding-top: 80px; transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1); border-left: 1px solid var(--border-color); box-shadow: -10px 0 30px rgba(0,0,0,0.5); }
.side-menu.active { right: 0; }
.menu-links { display: flex; flex-direction: column; }
.menu-item { padding: 16px 25px; color: #fff; text-decoration: none; font-size: 1.05rem; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.3s, color 0.3s; }
.menu-item:hover { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

/* --- Video Background Setting --- */
.hero-bg-container { position: absolute; top: 0; left: 0; width: 100%; height: 500px; z-index: -2; -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%); mask-image: linear-gradient(to bottom, black 60%, transparent 100%); overflow: hidden; }
.hero-bg-video { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.hero-bg-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 9, 19, 0.95) 40%, rgba(7, 9, 19, 0.4) 100%); z-index: -1; }

.page-wrapper { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 20px; padding: 15px 20px; z-index: 10; }
.header { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.logo-area { display: flex; align-items: center; gap: 8px; }
.header-crown { width: 24px; height: 24px; object-fit: contain; }
.logo-text { font-size: 1.5rem; font-weight: 800; background: linear-gradient(to right, #fff, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.hero-text-section { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 30px 0; border: none; background: transparent; }
.welcome-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.welcome-text { font-size: 1.25rem; font-weight: 800; background: linear-gradient(to right, #ffffff, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

@keyframes floatCrown { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-5px); } }
.floating-crown { width: 26px; height: 26px; object-fit: contain; animation: floatCrown 2s ease-in-out infinite; }

.brand-title { font-size: 3.5rem; font-weight: 800; margin-bottom: 15px; background: linear-gradient(to right, #ffffff, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -1px; line-height: 1.1; display: inline-block; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 28px; border-radius: 14px; font-size: 0.95rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary-btn { background: var(--accent-gradient); color: #fff; margin-bottom: 16px; box-shadow: 0 10px 25px rgba(168, 85, 247, 0.35); border: none; width: max-content !important; align-self: flex-start; }
.description { font-size: 0.85rem; line-height: 1.5; color: var(--text-secondary); max-width: 300px; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

/* ==================================================== */
/* --- IMPROVED TELEGRAM BANNER (Premium Glow UI) --- */
/* ==================================================== */
.main-tg-banner {
    position: relative;
    background: radial-gradient(circle at top right, rgba(40, 20, 70, 0.95) 0%, rgba(13, 10, 25, 0.98) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(168, 85, 247, 0.6);
    border-radius: 22px;
    padding: 35px 20px; 
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 35px rgba(168, 85, 247, 0.25), inset 0 0 25px rgba(56, 189, 248, 0.15);
    margin-top: 15px;
    margin-bottom: 10px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden; 
}

.main-tg-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.4), inset 0 0 30px rgba(56, 189, 248, 0.25);
}

@keyframes floatDynamic { 0%, 100% { transform: translateY(0) rotate(0deg) scale(1); } 50% { transform: translateY(-8px) rotate(12deg) scale(1.05); } }

/* Hardware Acceleration added here to stop jitter */
.tg-bg-icon { 
    position: absolute; 
    object-fit: contain; 
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.7)); 
    animation: floatDynamic 4s ease-in-out infinite; 
    z-index: 1; 
    will-change: transform;
    transform: translateZ(0);
}

.tg-bg-4 { width: 48px; bottom: 20%; right: 4%; opacity: 0.95; animation-delay: 0.8s; } 
.tg-bg-2 { width: 30px; bottom: 25%; left: 8%; opacity: 0.7; animation-delay: 1.2s; filter: blur(0.5px); } 
.tg-bg-6 { width: 18px; top: 12%; right: 20%; opacity: 0.4; animation-delay: 3s; filter: blur(1.5px); } 

.tg-center-info { text-align: center; position: relative; z-index: 2; flex: 1; padding: 0 10px; }
.tg-badge-row { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.75rem; font-weight: 800; color: #fff; background: linear-gradient(90deg, #38bdf8, #a855f7); padding: 6px 14px; border-radius: 20px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4); text-transform: uppercase; letter-spacing: 0.5px; }
.small-crown { width: 16px; height: 16px; }

.tg-main-heading {
    font-size: 1.35rem;
    font-weight: 900;
    background: linear-gradient(to right, #ffffff, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(244, 114, 182, 0.3);
    letter-spacing: -0.5px;
}

.tg-short-desc {
    font-size: 0.85rem;
    color: #e2e8f0;
    margin-bottom: 18px;
    line-height: 1.5;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.tg-divider { font-size: 0.7rem; color: #94a3b8; border-top: 1px dashed rgba(255,255,255,0.15); padding-top: 8px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1.5px; }
.tg-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tg-tag { font-size: 0.7rem; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); padding: 5px 12px; border-radius: 20px; color: #f8fafc; font-weight: 600; backdrop-filter: blur(5px); transition: all 0.3s ease; }
.tg-tag:hover { background: rgba(168, 85, 247, 0.25); border-color: rgba(168, 85, 247, 0.6); color: #fff; transform: scale(1.05); }

/* ==================================================== */
/* --- NEW SPLIT CARD LAYOUT (Jitter Fixed) --- */
/* ==================================================== */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px; 
}

.channel-card {
    border-radius: 18px;
    overflow: hidden;
    background: #0d1121; 
    border: 1px solid rgba(147, 51, 234, 0.25);
    display: flex;
    flex-direction: column;
    /* Continuous float removed for performance */
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border-color 0.3s ease-out;
    transform: translateZ(0); /* Hardware acceleration */
}

/* Hover/Touch animation is intact and smooth */
.channel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(168, 85, 247, 0.4);
    border-color: rgba(168, 85, 247, 0.8);
    z-index: 5;
}

/* Top: Video Container */
.card-video-wrapper {
    width: 100%;
    aspect-ratio: 4 / 5; 
    position: relative;
    background: #000;
}

.card-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bottom: Text & Button Box */
.card-content-bottom {
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, rgba(28, 16, 51, 0.8) 0%, rgba(13, 17, 33, 1) 100%);
    border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.card-header-row { display: flex; align-items: center; gap: 8px; }
.card-titles h3 { font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.2; }
.card-titles p { font-size: 0.75rem; color: #94a3b8; }

.join-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--accent-gradient);
    color: #fff;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.btn-tg-ico { width: 16px; height: 16px; object-fit: contain; }

/* --- Footer --- */
.footer-badges { background: rgba(13, 17, 33, 0.5); border: 1px solid var(--border-color); border-radius: 16px; padding: 14px; display: flex; justify-content: space-around; align-items: center; margin-bottom: 10px; margin-top: 10px; }
.badge-item { font-size: 0.7rem; color: var(--text-secondary); text-align: center; }

.support-footer { text-align: center; padding: 15px 0; margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.support-footer p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 5px; }
.support-footer a { color: #c084fc; text-decoration: none; font-weight: 600; transition: color 0.3s; }
.support-footer a:hover { color: #fff; }
.copyright { font-size: 0.75rem !important; color: rgba(148, 163, 184, 0.6) !important; letter-spacing: 0.5px; }