/* --- MASTER GLOBAL CORE (MERGED & OPTIMIZED) --- */

:root {
    /* Primary Core Variables (Priority 1) */
    --bg: #050505;
    --accent: #9b59b6;
    --accent-bright: #bf81d6;
    --neon-glow: rgba(155, 89, 182, 0.6);
    --glass: rgba(255, 255, 255, 0.04);
    --glass-heavy: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --text-dim: #94a3b8;
    --red: #ff2e63;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    
    /* Supplemental Variables (Merged from Priority 2) */
    --card: rgba(22, 25, 30, 0.6); 
    --gold: #f7e000;
    --red-pro: #ff0000;
}

/* 1. GLOBAL RESET & PERFORMANCE FIXES */
*, *::before, *::after {
    margin: 0; 
    padding: 0;
    box-sizing: border-box;
    /* Prevents layout shifting during load */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden !important; /* 🔥 ENFORCED: Prevents horizontal scroll breaking gaps */
    width: 100% !important;
}

body { 
    background-color: var(--bg);
    /* Premium ambient glow effect */
    background-image: radial-gradient(circle at 50% 0%, #1a1c29 0%, var(--bg) 70%);
    background-attachment: fixed;
    color: var(--text); 
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.5;
    position: relative;
}

/* 2. GLOBAL ELEMENTS */
a { 
    text-decoration: none; 
    color: inherit; 
    transition: var(--transition); 
}

/* 3. CUSTOM SCROLLBAR */
::-webkit-scrollbar { 
    width: 6px; 
}
::-webkit-scrollbar-track { 
    background: var(--bg); 
}
::-webkit-scrollbar-thumb { 
    background: #333; 
    border-radius: 10px; 
}
::-webkit-scrollbar-thumb:hover { 
    background: var(--accent); 
}

/* 2. THE MASTER CONTAINER WITH RESPONSIVE GAPS */
.landing-master-container {
    max-width: 900px;
    margin: 0 auto;
    /* Professional side gaps: 25px for mobile - 🔥 FORCED !important to block external resets */
    padding: 0 25px !important; 
    display: flex;
    flex-direction: column;
    align-items: center; 
    width: 100%;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    .landing-master-container {
        padding: 0 40px !important; /* Larger premium gaps for PC */
    }
}

/* 3. BACKGROUND & WRAPPERS */
.landing-body {
    position: relative;
    z-index: 2;
    width: 100%;
    display: block;
}

.glass-bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 0%, #1a1025 0%, #050505 100%);
    overflow: hidden; 
    pointer-events: none !important; 
}

/* 4. CYBER-PUNK TOP NAV */
.landing-top-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 15px 15px;
    perspective: 1000px;
}

.glass-link {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
    backdrop-filter: blur(15px);
    text-transform: uppercase;
    transition: var(--transition);
    color: var(--text-dim);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.glass-link:hover {
    color: #fff;
    background: rgba(155, 89, 182, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 25px var(--neon-glow), inset 0 0 10px var(--neon-glow);
    transform: translateY(-3px) scale(1.05);
}

/* 5. LOGO SECTION - RESPONSIVE SIZE */
.landing-logo-wrap {
    margin-bottom: 20px; 
    animation: logoEntrance 1.2s ease-out;
    display: flex;
    justify-content: center;
    width: 100%;
}

.main-logo {
    max-width: 230px; /* Perfect for mobile */
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(155, 89, 182, 0.3));
}

@media (min-width: 768px) {
    .main-logo {
        max-width: 320px; /* Increased size for PC */
    }
    .landing-logo-wrap {
        margin-bottom: 22px; /* Maintain tight PC gap */
    }
}

@keyframes logoEntrance {
    from { opacity: 0; transform: scale(0.8) translateY(20px); filter: blur(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* 6. TITLE SECTION - FIXED CLIPPING */
.landing-title {
    font-size: clamp(22px, 7vw, 42px); 
    font-weight: 900;
    letter-spacing: -1.2px;
    margin-bottom: 8px;
    text-align: center;
    width: 100%;
    display: block;
    white-space: normal !important; 
    line-height: 1.2;
    overflow: visible !important;
}

@media (min-width: 768px) {
    .landing-title {
        letter-spacing: -2px;
        margin-bottom: 10px;
    }
}

.accent-text {
    background: linear-gradient(135deg, #fff 30%, var(--accent-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(155, 89, 182, 0.4));
    display: inline-block; /* Helps with gradient rendering */
}

/* 7. DESCRIPTION */
.landing-desc {
    color: var(--text-dim);
    font-size: 12px;
    max-width: 450px;
    margin: 0 auto 20px;
    text-align: center;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .landing-desc {
        font-size: 14px;
        max-width: 550px;
    }
}

/* 8. SEARCH AREA & FLICKER-FREE ICONS */
.landing-search-area {
    width: 100%;
    max-width: 650px;
    margin: 0 auto 25px;
}

.search-input-wrap-pro {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, var(--border), transparent);
}

.search-icon-pro {
    position: absolute;
    left: 25px;
    width: 22px;
    height: 22px;
    color: var(--accent);
    animation: iconPulse 3s infinite;
    z-index: 5;
    /* Flicker Prevention */
    backface-visibility: hidden;
    transform: translateZ(0);
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

#live-search-input {
    width: 100%;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    padding: 20px 30px 20px 65px;
    border-radius: 20px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    outline: none;
    transition: var(--transition);
}

#live-search-input:focus {
    border-color: var(--accent);
    background: rgba(155, 89, 182, 0.05);
    box-shadow: 0 0 50px rgba(155, 89, 182, 0.3), inset 0 0 20px rgba(0,0,0,0.5);
}

/* 9. TOP SEARCH TAGS */
.top-searches-wrap {
    width: 100% !important;
    text-align: center !important;
    margin: 15px 0 !important;
}

.top-searches-wrap .label {
    display: block !important;
    font-size: 10px !important;
    font-weight: 950 !important;
    color: #444 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    margin-bottom: 10px !important;
}

.tag-cloud {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 0 10px !important;
}

.top-search-tag {
    appearance: none !important;
    background: var(--glass) !important;
    border: 1px solid var(--border) !important;
    font-size: 13px !important;
    padding: 6px 14px !important;
    border-radius: 10px !important;
    color: var(--text-dim) !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: inline-block !important; /* Changed to inline-block for proper ellipsis */
    vertical-align: top !important;
    white-space: nowrap !important;
    
    /* 🔥 FIX: Force truncation for insanely long tags */
    max-width: 100% !important; 
    overflow: hidden !important; 
    text-overflow: ellipsis !important; 
}

.top-search-tag:hover {
    color: #ffffff !important;
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    transform: translateY(-2px) scale(1.05) !important;
}

/* 10. ENTER BUTTON - RESPONSIVE */
.landing-footer-actions { 
    margin: 35px 0; 
    display: flex; 
    justify-content: center; 
    width: 100%; 
}

/* --- ENTER SITE BUTTON SECTION --- */
.btn-enter-pro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #fff;
    color: #000;
    padding: 12px 45px; 
    border-radius: 100px;
    font-weight: 950;
    font-size: 15px;
    letter-spacing: 1px;
    /* Fast base transition for snappy feel */
    transition: all 0.15s ease;
    box-shadow: 0 15px 45px rgba(255,255,255,0.15);
    
    width: calc(100% - 30px) !important;
    margin: 0 15px !important;
    max-width: 650px; 
    text-decoration: none;
    /* Prevents flicker on load */
    backface-visibility: hidden;
    transform: translateZ(0);
}

@media (min-width: 768px) {
    .btn-enter-pro {
        width: 100% !important;
        max-width: 650px !important; 
        margin: 0 auto !important; 
        font-size: 18px; 
        padding: 14px 60px;
    }
}

.btn-enter-pro:hover {
    background: var(--accent);
    color: #fff;
    /* Slightly less lift for a faster visual pop */
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 20px 50px var(--neon-glow);
    /* Speeded up from 0.12s to 0.06s for instant reaction */
    transition: all 0.06s cubic-bezier(0.2, 0, 0, 1);
}

.btn-icon {
    width: 34px; height: 34px;
    background: #000;
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: all 0.2s ease;
    color: #fff; 
    transform: translateZ(0);
    backface-visibility: hidden;
}

@media (min-width: 768px) {
    .btn-icon {
        width: 38px; 
        height: 38px;
    }
}

.btn-icon svg { 
    width: 18px; 
    height: 18px; 
    stroke: currentColor; 
    stroke-width: 4px; 
    fill: none;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.btn-enter-pro:hover .btn-icon {
    background: #fff; 
    color: #000; 
    transform: translateX(5px);
    /* Instant icon transition */
    transition: all 0.06s cubic-bezier(0.2, 0, 0, 1);
}

/* 11. LANGUAGE GRID */
.landing-languages { margin-top: 60px; text-align: left; width: 100%; }
.lang-title { font-size: 22px; font-weight: 900; margin-bottom: 25px; letter-spacing: -1px; }
.lang-title span { color: var(--accent); text-shadow: 0 0 15px var(--neon-glow); }

.lang-grid-pro {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
}

@media (min-width: 650px) { .lang-grid-pro { grid-template-columns: repeat(2, 1fr); } }

/* --- PRO TOAST: SEXY PURPLE GLASS THEME --- */
#pro-toast {
    position: fixed;
    bottom: 40px; /* Positioned perfectly above mobile nav bars */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    
    /* Sexy Glassmorphism */
    background: rgba(22, 12, 35, 0.75); /* Deep purple tinted glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    /* Colors & Typography */
    color: #ffffff;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    
    /* Layout & Spacing */
    padding: 14px 28px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999999;
    
    /* Border & Glow Effects */
    border: 1px solid rgba(155, 89, 182, 0.4); /* Purple accent border */
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.5), 
        0 0 20px rgba(155, 89, 182, 0.2); /* Neon purple outer glow */
    
    /* Smooth Transitions */
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Add a checkmark icon via CSS before the text */
#pro-toast::before {
    content: '';
    width: 18px;
    height: 18px;
    background: #9b59b6;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E") no-repeat center;
}

/* Mobile Responsive Optimization */
@media (max-width: 768px) {
    #pro-toast {
        bottom: 30px;
        font-size: 13px;
        padding: 12px 22px;
        width: max-content;
        max-width: 90%;
    }
}

.lang-card-pro {
    position: relative;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    background: #111;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.lang-card-pro img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.4); transition: 0.8s; }

.card-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 25px; background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, transparent 60%);
}

.card-overlay span { font-size: 20px; font-weight: 900; }

.arrow-box {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--glass-heavy); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
}

.arrow-box svg { 
    width: 18px; 
    height: 18px; 
    animation: arrowSlide 2s infinite; 
    backface-visibility: hidden;
}

@keyframes arrowSlide { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

.lang-card-pro:hover { transform: scale(1.02) translateY(-3px); border-color: var(--accent); }
.lang-card-pro:hover img { filter: brightness(0.6) scale(1.05); }

/* 12. SHARE SECTION */
.landing-share-section { width: 100%; text-align: left; margin-top: 50px; }
.share-head { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.share-accent { width: 4px; height: 40px; background: linear-gradient(to bottom, var(--red), var(--accent)); border-radius: 10px; }

.social-share-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    max-width: 400px;
    margin: 0 auto 15px 0;
}

.share-icon-btn {
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--glass); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: #fff; transition: var(--transition);
}

.share-icon-btn svg { width: 22px; height: 22px; backface-visibility: hidden; }
.share-icon-btn:hover { transform: scale(1.15) translateY(-5px); background: var(--glass-heavy); }

/* 13. EXTRA MOBILE OVERRIDES */
@media (max-width: 500px) {
    .landing-top-bar { padding: 15px 10px; gap: 6px; }
    .glass-link { padding: 6px 14px; font-size: 9px; }
    .main-logo { max-width: 200px; }
    #live-search-input { padding: 16px 20px 16px 55px; font-size: 15px; }
    .btn-enter-pro { padding: 14px 35px; font-size: 14px; }
}