@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --bg: #0f172a;
    --surface: #1e293b;
    --card: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #475569;
    --success: #10b981;
    --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
.loading { text-align: center; padding: 3rem; color: var(--text-muted); }

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}
.logo span { color: var(--text); }
.nav {
    display: flex;
    gap: 2rem;
}
.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.nav a:hover,
.nav a.active {
    color: var(--primary);
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    z-index: 999;
}
.mobile-menu.active { display: block; }
.mobile-menu a {
    display: block;
    padding: 1rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border: none; }
.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Hero */
.hero {
    padding: 10rem 0 5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), transparent);
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 1rem;
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}
.search-box i {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Ads */
.ad-container {
    text-align: center;
    padding: 2rem 0;
}
.ad-banner p,
.ad-widget p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.ad-placeholder {
    background: var(--surface);
    border: 2px dashed var(--border);
    padding: 2rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Sections */
.featured-section,
.posts-section {
    padding: 4rem 0;
}
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text);
}

/* Featured Grid */
.featured-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Posts Layout */
.posts-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}
.posts-main { min-width: 0; }
.posts-grid {
    display: grid;
    gap: 2rem;
}

/* Post Card */
.post-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
    cursor: pointer;
}
.post-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}
.post-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.post-content {
    padding: 1.5rem;
}
.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.post-category {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
}
.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text);
}
.post-excerpt {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Sidebar */
.sidebar { position: sticky; top: 100px; height: fit-content; }
.sidebar-widget {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}
.sidebar-widget h3 {
    margin-bottom: 1rem;
    color: var(--text);
}
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.categories-list a {
    padding: 0.8rem 1rem;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}
.categories-list a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateX(5px);
}

/* Admin FAB */
.admin-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    z-index: 100;
    transition: all 0.3s;
}
.admin-fab:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--surface);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}
.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.footer-brand span { color: var(--primary); }
.footer-links,
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.footer-links h4,
.footer-social h4 {
    margin-bottom: 0.5rem;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links a:hover { color: var(--primary); }
.social-links {
    display: flex;
    gap: 1rem;
}
.social-links a {
    width: 40px;
    height: 40px;
    background: var(--card);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}
.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 992px) {
    .nav { display: none; }
    .mobile-toggle { display: block; }
    .posts-layout {
        grid-template-columns: 1fr;
    }
    .sidebar { position: static; }
}
@media (max-width: 600px) {
    .hero { padding: 8rem 0 4rem; }
    .featured-grid,
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
}
