@import url('https://fonts.googleapis.com/css2?family=Anek+Bangla:wght@100..800&family=Inter:wght@100..900&display=swap');

:root {
    --primary: #020617;
    --primary-light: #1e293b;
    --accent: #00aeef;
    /* Brand Cyan */
    --accent-glow: rgba(0, 174, 239, 0.2);
    --bg-main: #ffffff;
    --bg-soft: #ffffff;
    --text-main: #020617;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-premium: 0 60px 100px -20px rgba(0, 174, 239, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Anek Bangla', 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Ensure Tailwind's `font-sans` never falls back to a non-Bangla face */
.font-sans {
    font-family: 'Anek Bangla', 'Inter', sans-serif !important;
}

/* Headline / ticker bar should use the same Bangla font everywhere */
.header-ticker,
.header-ticker * {
    font-family: 'Anek Bangla', 'Inter', sans-serif !important;
}

/* -----------------------------
   Google AdSense placements
   - Desktop: optional left/right rails (only on very wide screens)
   - All: one inline banner above footer
------------------------------ */
.gai-ad-label {
    font-family: 'Anek Bangla', 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 10px;
}

.gai-ad-inline {
    width: min(100% - 2rem, 900px);
    margin: 2rem auto;
    padding: 1rem 1rem 0.75rem;
    border: 1px solid #f1f5f9;
    border-radius: 1.5rem;
    background: #ffffff;
}

.gai-ad-rail {
    display: none;
    position: fixed;
    top: 120px;
    width: 160px;
    z-index: 90;
    padding: 0.75rem;
    border: 1px solid #f1f5f9;
    border-radius: 1.25rem;
    background: #ffffff;
}

.gai-ad-rail-left {
    left: 12px;
}

.gai-ad-rail-right {
    right: 12px;
}

/* Show rails only when there's real space (avoid covering content) */
@media (min-width: 1700px) {
    .gai-ad-rail {
        display: block;
    }
}

img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

pre,
code {
    word-break: break-word;
}

.logo-spin {
    animation: spin 30s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 5s ease-in-out infinite;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 174, 239, 0.4);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-soft);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 3px solid var(--bg-soft);
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations using Framer Motion classes or custom */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Glassmorphism */
.glass {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, #0f172a 0%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Premium Card */
.premium-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 32px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-premium);
}

.premium-card:hover {
    transform: translateY(-10px);
    border-color: #e2e8f0;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.08);
}

/* Button UI */
.btn-premium {
    position: relative;
    padding: 16px 32px;
    border-radius: 20px;
    font-weight: 700;
    transition: all 0.3s ease;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-premium-primary {
    background: var(--primary);
    color: white;
}

.btn-premium-primary:hover {
    background: var(--accent);
    transform: scale(1.02);
    box-shadow: 0 10px 30px var(--accent-glow);
}

/* Section Background Blobs */
.bg-blob-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

/* Responsive Containers */
.container-custom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container-custom {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .container-custom {
        padding: 0 1rem;
    }

    .btn-premium {
        padding: 14px 22px;
        border-radius: 16px;
    }
}

/* Custom Select Dropdown UI */
.custom-select-container {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 2.25rem;
    padding: 1.5rem 1.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    gap: 1rem;
}

.custom-select-trigger:hover {
    border-color: #00aeef;
    background: #f8fafc;
}

.custom-select-container.opened .custom-select-trigger {
    border-color: #00aeef;
    box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.1);
    background: white;
}

.custom-select-trigger .selected-text {
    font-size: 1rem;
    font-weight: 800;
    color: #020617;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-trigger i,
.custom-select-trigger svg {
    color: #94a3b8;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    flex: 0 0 auto;
}

/* Lucide replaces <i> with <svg>; keep size consistent to avoid overflow */
.custom-select-trigger svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.custom-select-container.opened .custom-select-trigger i,
.custom-select-container.opened .custom-select-trigger svg {
    transform: rotate(180deg);
    color: #00aeef;
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select-container.opened .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.option-item {
    padding: 1.25rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #020617;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8fafc;
}

.option-item:last-child {
    border-bottom: none;
}

.option-item:hover {
    background: #f0faff;
    color: #00aeef;
}

.option-item.selected {
    background: #f8fafc;
    color: #00aeef;
}

.option-item.selected::after {
    content: '✓';
    float: right;
    font-weight: 900;
}

/* Specific to Admin Panel (Thicker borders, larger radius) */
.admin-mode .custom-select-trigger {
    border-radius: 2.5rem;
    padding: 1.75rem;
}

.admin-mode .custom-select-options {
    border-radius: 2.5rem;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Security & Protection Styles */
html,
body {
    /* Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow selection in input fields and textareas (crucial for usability) */
input,
textarea,
[contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Disable image dragging */
img {
    pointer-events: none;
    -webkit-user-drag: none;
}