/* Reset & Variables */
:root {
    --bg-color: #0f172a; /* Deep elegant dark */
    --surface-color: #1e293b;
    --surface-lighter: #2dd4bf; /* Vibrant teal */
    --primary: #6366f1; /* Vibrant indigo */
    --primary-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius-soft: 16px;
    --radius-pill: 50px;
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.5);
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 { color: #fff; margin-top: 0; }
a { color: var(--primary); text-decoration: none; transition: 0.3s ease; }
a:hover { color: var(--surface-lighter); }

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 15px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-inner {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid transparent;
    border-bottom-color: var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

/* When scrolled down */
.header-wrapper.scrolled .header-inner {
    border-radius: var(--radius-pill);
    border: 1px solid var(--glass-border);
    padding: 12px 25px;
    margin: 0 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: rgba(30, 41, 59, 0.85);
}

.hamburger, .search-icon {
    width: 44px; height: 44px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255,255,255,0.05);
    transition: 0.3s ease;
}
.hamburger:hover, .search-icon:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.05);
}
.hamburger svg, .search-icon svg { width: 24px; height: 24px; stroke: #fff; stroke-width: 2; fill: none; }

.header-logo {
    font-size: 22px; font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #6366f1, #2dd4bf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex; align-items: center; gap: 10px;
}
.header-logo img { height: 32px; border-radius: 8px; }

/* Hero Info Board */
.hero-board {
    margin: 40px auto;
    padding: 40px;
    background: linear-gradient(145deg, var(--surface-color), rgba(15, 23, 42, 0));
    border: 1px solid var(--border);
    border-radius: var(--radius-soft);
    text-align: center;
    box-shadow: var(--shadow-soft);
}
.hero-board h1 { font-size: 36px; margin-bottom: 10px; }
.hero-board p { color: var(--text-muted); font-size: 18px; max-width: 600px; margin: 0 auto; }

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}
@media (max-width: 768px) {
    .article-grid { grid-template-columns: 1fr; gap: 20px; }
}

.article-card {
    background: var(--surface-color);
    border: 1px solid var(--border);
    border-radius: 12px; /* Soft rounded, not fully circular */
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(99, 102, 241, 0.5); /* subtle glow */
}

/* We use a gradient box for video thumbnail placeholder */
.article-thumb {
    height: 220px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.article-thumb::after {
    content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.5) 100%);
}
.play-btn {
    width: 60px; height: 60px;
    background: rgba(99, 102, 241, 0.8);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
    z-index: 2;
    transition: 0.3s ease;
}
.article-card:hover .play-btn {
    transform: scale(1.1); background: var(--primary);
}
.play-btn svg { width: 30px; height: 30px; fill: #fff; margin-left: 5px; }

.article-content {
    padding: 20px;
    flex: 1; display: flex; flex-direction: column;
}
.article-title {
    font-size: 18px; font-weight: 600; margin-bottom: 10px;
    line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.article-meta {
    margin-top: auto;
    font-size: 13px; color: var(--text-muted);
    display: flex; justify-content: space-between; align-items: center;
}
.tag {
    background: rgba(45, 212, 191, 0.1); color: var(--surface-lighter);
    padding: 4px 12px; border-radius: 20px; font-weight: 500; font-size: 12px;
}

/* Pagination */
.pagination {
    display: flex; justify-content: center; gap: 10px; margin: 40px 0 60px;
}
.pagination a {
    width: 40px; height: 40px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%; background: var(--surface-color);
    border: 1px solid var(--border); color: #fff;
    font-weight: 600; transition: 0.3s;
}
.pagination a:hover, .pagination a.active {
    background: var(--primary); border-color: var(--primary);
}

/* Frontend Drawer Sidebar */
.drawer-overlay {
    position: fixed; top:0; left:0; width:100vw; height:100vh;
    background: rgba(0,0,0,0.7); z-index: 100;
    opacity: 0; visibility: hidden; transition: 0.3s;
    backdrop-filter: blur(4px);
}
.drawer {
    position: fixed; top:0; left:-300px; width:280px; height:100vh;
    background: var(--surface-color); border-right: 1px solid var(--border);
    z-index: 101; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    padding: 20px; box-sizing: border-box; overflow-y: auto;
}
.drawer.open { left: 0; }
.drawer-overlay.open { opacity: 1; visibility: visible; }

.drawer-title { font-size: 20px; font-weight: bold; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 15px; color: #fff; }
.drawer-link { display: block; padding: 12px 15px; color: var(--text-muted); border-radius: 8px; margin-bottom: 5px; transition: 0.2s; font-weight: 500;}
.drawer-link:hover { background: rgba(255,255,255,0.05); color: #fff; }

/* Ads */
.ad-slot { margin: 20px 0; text-align: center; }

/* Search Form Minimal */
.search-modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--glass-bg); backdrop-filter: blur(10px);
    z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding-top: 15vh;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.search-modal.open { opacity: 1; visibility: visible; }
.search-modal-inner { width: 100%; max-width: 600px; position: relative; }
.search-input { width: 100%; padding: 20px; font-size: 24px; background: transparent; border: none; border-bottom: 2px solid var(--primary); color: #fff; outline: none; }
.search-close { position: absolute; right: 0; top: -40px; color: #fff; font-size: 30px; cursor: pointer; background:none; border:none; }
