/* Faktonauts — Base Styles */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent: #ffcc00;
    --accent-hover: #ffd633;
    --border: #2a2a2a;
    --max-width: 1200px;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Header */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.logo { display: flex; flex-direction: column; }
.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: 3px;
}
.logo-tagline { font-size: 0.7rem; color: var(--text-secondary); }

.main-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}
.nav-link {
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

/* Search */
.search-box { position: relative; }
.search-box input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 200px;
    transition: width 0.3s;
}
.search-box input:focus { width: 280px; outline: none; border-color: var(--accent); }
.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 0.5rem;
    overflow: hidden;
}
.search-results.hidden { display: none; }
.search-result {
    display: block;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.search-result:hover { background: var(--bg-card); }
.search-result strong { display: block; }
.search-result span { font-size: 0.8rem; color: var(--text-secondary); }

/* Article */
.article-page {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.category-badge {
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}
.article-page h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}
.article-content p {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 1.5rem 0;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 8px;
}
.video-thumbnail {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.video-thumbnail img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.video-thumbnail .play-button {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.video-thumbnail:hover .play-button {
    background: rgba(255, 0, 0, 0.8);
}
.article-tags {
    margin-top: 2rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.tag {
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Ad */
.ad-container { margin: 2rem 0; text-align: center; }

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 3rem 1.5rem 1rem;
}
.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.footer-section h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom {
    max-width: var(--max-width);
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Cards (home/category pages) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 1.5rem;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card-body h3 a { color: var(--text-primary); }
.card-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    padding: 5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 3rem; font-weight: 900; margin-bottom: 1rem; }
.hero .highlight { color: var(--accent); }
.hero p { color: var(--text-secondary); font-size: 1.2rem; }

/* Sections */
.section {
    max-width: var(--max-width);
    margin: 3rem auto;
    padding: 0 1.5rem;
}
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    border-left: 4px solid var(--accent);
    padding-left: 0.8rem;
}

/* Featured */
.featured-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.featured-video {
    position: relative;
    padding-bottom: 56.25%;
    background: var(--bg-secondary);
}
.featured-video iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.featured-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}
.placeholder-text {
    position: absolute;
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-style: italic;
}
.featured-info {
    padding: 2rem 2rem 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
}
.featured-info h2 { font-size: 1.6rem; line-height: 1.2; }
.featured-info h2 a { color: var(--text-primary); }
.featured-info h2 a:hover { color: var(--accent); }
.featured-info p { color: var(--text-secondary); font-size: 0.95rem; }
.read-more {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Card thumb placeholder */
.card-thumb {
    height: 180px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 0.8rem;
}
.card-category {
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.card-body time {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-align: center;
}
.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}
.category-icon { font-size: 2.5rem; }
.category-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container { flex-wrap: wrap; }
    .main-nav { order: 3; width: 100%; }
    .article-page h1 { font-size: 1.6rem; }
    .search-box input { width: 150px; }
    .search-box input:focus { width: 200px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .featured-card { grid-template-columns: 1fr; }
    .featured-info { padding: 1.5rem; }
}
