/* ============================================
   HaberAnime - Ana CSS
   Dark Anime Theme
   ============================================ */

/* --- Değişkenler --- */
:root {
    --bg-primary:    #0d0d14;
    --bg-secondary:  #13131e;
    --bg-card:       #1a1a28;
    --bg-hover:      #22223a;
    --accent:        #e63946;
    --accent-dark:   #c1121f;
    --accent-glow:   rgba(230,57,70,0.25);
    --blue:          #457b9d;
    --teal:          #2a9d8f;
    --gold:          #e9c46a;
    --text-primary:  #f0f0f8;
    --text-secondary:#a0a0c0;
    --text-muted:    #606080;
    --border:        rgba(255,255,255,0.07);
    --border-hover:  rgba(255,255,255,0.15);
    --radius:        10px;
    --radius-lg:     16px;
    --radius-xl:     24px;
    --shadow:        0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg:     0 8px 48px rgba(0,0,0,0.6);
    --font-main:     'Inter', sans-serif;
    --font-display:  'Space Grotesk', sans-serif;
    --transition:    0.2s ease;
    --navbar-h:      64px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

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

img { max-width: 100%; height: auto; display: block; }

h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-display);
    line-height: 1.3;
    color: var(--text-primary);
}

ul { list-style: none; }

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Butonlar --- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius);
    font-family: var(--font-main); font-weight: 600; font-size: 0.875rem;
    border: none; cursor: pointer; transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-hover); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { background: none; border: none; cursor: pointer; color: var(--text-secondary); padding: 8px; border-radius: 8px; transition: all var(--transition); display: inline-flex; align-items: center; justify-content: center; }
.btn-icon:hover { color: var(--text-primary); background: var(--bg-hover); }

/* --- Navbar --- */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(13,13,20,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    height: var(--navbar-h);
}
.navbar-inner {
    display: flex; align-items: center; gap: 24px;
    height: var(--navbar-h);
}
.navbar-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-size: 1.25rem;
    color: var(--text-primary) !important; flex-shrink: 0;
}
.logo-icon {
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem; color: #fff;
}
.logo-text strong { color: var(--accent); }

.navbar-nav { flex: 1; }
.navbar-nav ul { display: flex; align-items: center; gap: 4px; }
.navbar-nav a {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 8px;
    font-size: 0.875rem; font-weight: 500;
    color: var(--text-secondary); transition: all var(--transition);
}
.navbar-nav a:hover, .navbar-nav a.active { color: var(--text-primary); background: var(--bg-hover); }
.navbar-nav .cat-link { border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; }
.navbar-nav .cat-link:hover, .navbar-nav .cat-link.active { color: var(--cat-color, var(--accent)); border-bottom-color: var(--cat-color, var(--accent)); }

.navbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Arama Barı */
.search-bar {
    background: var(--bg-secondary); border-top: 1px solid var(--border);
    padding: 12px 0; display: none;
    animation: slideDown 0.2s ease;
}
.search-bar.open { display: block; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.search-input-wrap {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border-hover);
    border-radius: var(--radius); padding: 8px 16px;
}
.search-input-wrap i { color: var(--text-muted); }
.search-input-wrap input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text-primary); font-size: 1rem; font-family: var(--font-main);
}
.search-input-wrap input::placeholder { color: var(--text-muted); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s; display: block; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* User Dropdown */
.user-dropdown { position: relative; }
.btn-avatar {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 50px; padding: 4px 10px 4px 4px;
    cursor: pointer; transition: all var(--transition); color: var(--text-secondary);
}
.btn-avatar:hover { border-color: var(--accent); }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar-initial {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent); color: #fff; display: flex;
    align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem;
}
.dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); min-width: 180px;
    box-shadow: var(--shadow-lg); display: none; overflow: hidden; z-index: 999;
}
.dropdown-menu.open { display: block; animation: fadeIn 0.15s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
.dropdown-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.dropdown-header strong { display: block; font-size: 0.875rem; }
.dropdown-header small { color: var(--text-muted); font-size: 0.75rem; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 0.875rem; color: var(--text-secondary); transition: all var(--transition); }
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--border); }
.text-danger { color: #e63946 !important; }

/* Flash Mesaj */
.flash-message {
    padding: 14px 0; font-size: 0.9rem; font-weight: 500;
    border-bottom: 1px solid var(--border);
}
.flash-message .container { display: flex; align-items: center; gap: 10px; }
.flash-success { background: rgba(42,157,143,0.15); color: #2a9d8f; }
.flash-error   { background: rgba(230,57,70,0.15); color: var(--accent); }
.flash-close { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: 0.7; }
.flash-close:hover { opacity: 1; }

/* --- Kart --- */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: all var(--transition);
}
.card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 16/9; overflow: hidden; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 16px; }
.card-category {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 3px 8px; border-radius: 4px; margin-bottom: 8px;
    background: rgba(255,255,255,0.06); color: var(--cat-color, var(--accent));
}
.card-title { font-size: 1rem; font-weight: 700; line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-excerpt { font-size: 0.875rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.card-meta { display: flex; align-items: center; gap: 12px; font-size: 0.78rem; color: var(--text-muted); }
.card-meta i { font-size: 0.7rem; }

/* Featured Card */
.card-featured { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius-xl); }
.card-featured .card-img { aspect-ratio: auto; }
.card-featured .card-body { padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; }
.card-featured .card-title { font-size: 1.5rem; -webkit-line-clamp: 3; }

/* --- Grid Layouts --- */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.posts-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- Section --- */
.section { padding: 48px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.section-title {
    font-size: 1.25rem; font-weight: 800;
    display: flex; align-items: center; gap: 10px;
}
.section-title::before {
    content: ''; display: block;
    width: 4px; height: 22px; border-radius: 2px;
    background: var(--accent);
}
.section-link { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.section-link:hover { color: var(--accent); }

/* --- Sidebar --- */
.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 24px; }
.widget-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.widget-title i { color: var(--accent); }

/* Post List (sidebar) */
.post-list-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.post-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.post-list-thumb { width: 72px; height: 54px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.post-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list-info { flex: 1; min-width: 0; }
.post-list-title { font-size: 0.83rem; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.post-list-meta { font-size: 0.75rem; color: var(--text-muted); }

/* Category Tags */
.cat-tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tag {
    padding: 5px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 500;
    background: var(--bg-hover); border: 1px solid var(--border);
    color: var(--text-secondary); transition: all var(--transition);
}
.cat-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* --- Sayfalama --- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 40px 0; }
.page-btn {
    width: 40px; height: 40px; border-radius: 10px; display: flex;
    align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-secondary); transition: all var(--transition); cursor: pointer;
}
.page-btn:hover, .page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* --- Breadcrumb --- */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.4; }

/* --- Badge --- */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.badge-featured { background: var(--accent); color: #fff; }
.badge-new { background: var(--teal); color: #fff; }

/* --- Form Elements --- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.form-control {
    width: 100%; padding: 10px 14px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-primary);
    font-family: var(--font-main); font-size: 0.9375rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.78rem; color: var(--accent); margin-top: 4px; }

/* Auth Pages */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px; width: 100%; max-width: 440px; }
.auth-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); margin-bottom: 32px; font-size: 0.9rem; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.875rem; color: var(--text-muted); }
.auth-footer a { color: var(--accent); font-weight: 600; }

/* --- Footer --- */
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); margin-top: 80px; }
.footer-top { padding: 60px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 12px; }
.footer-about p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }
.social-links { display: flex; gap: 10px; }
.social-links a {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--bg-hover); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1rem; transition: all var(--transition);
}
.social-links a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-heading { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 0.875rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.footer-links a:hover { color: var(--text-primary); }
.footer-links i { font-size: 0.65rem; color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; }
.footer-bottom-inner { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-muted); flex-wrap: wrap; }
.footer-sep { opacity: 0.4; }
.footer-bottom a:hover { color: var(--accent); }

/* --- Yazar Kutusu --- */
.author-box { display: flex; gap: 20px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin: 40px 0; }
.author-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; color: #fff; }
.author-info h4 { font-size: 1rem; margin-bottom: 4px; }
.author-info p { font-size: 0.875rem; color: var(--text-muted); }

/* --- Yorum Bölümü --- */
.comments-section { margin-top: 48px; }
.comment-item { display: flex; gap: 14px; margin-bottom: 24px; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-hover); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; color: var(--text-muted); }
.comment-body { flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 18px; }
.comment-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }
.comment-meta strong { color: var(--text-primary); }
.comment-content { font-size: 0.9rem; line-height: 1.6; }

/* --- İçerik Stili (post.php içeriği) --- */
.post-content { font-size: 1rem; line-height: 1.85; color: var(--text-secondary); }
.post-content h2 { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); margin: 32px 0 16px; }
.post-content h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin: 24px 0 12px; }
.post-content p { margin-bottom: 18px; }
.post-content img { border-radius: var(--radius); margin: 24px 0; }
.post-content a { color: var(--accent); text-decoration: underline; }
.post-content blockquote { border-left: 3px solid var(--accent); padding: 12px 20px; background: var(--bg-card); border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; font-style: italic; color: var(--text-muted); }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 18px; }
.post-content li { margin-bottom: 6px; }

/* --- Video Embed --- */
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-lg); margin: 24px 0; background: #000; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* --- Tag List --- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.tag-item { padding: 4px 12px; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 50px; font-size: 0.78rem; color: var(--text-muted); transition: all var(--transition); }
.tag-item:hover { border-color: var(--accent); color: var(--accent); }

/* --- Hero Bölümü --- */
.hero { background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary)); padding: 32px 0 48px; border-bottom: 1px solid var(--border); margin-bottom: 48px; }

/* --- Utility --- */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0 !important; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* --- Loading Skeleton --- */
.skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .card-featured { grid-template-columns: 1fr; }
    .card-featured .card-img { aspect-ratio: 16/9; }
}

@media (max-width: 768px) {
    :root { --navbar-h: 56px; }
    .navbar-nav { display: none; position: fixed; top: var(--navbar-h); left: 0; right: 0; bottom: 0; background: var(--bg-secondary); padding: 24px 20px; flex-direction: column; overflow-y: auto; }
    .navbar-nav.open { display: flex; }
    .navbar-nav ul { flex-direction: column; gap: 4px; }
    .navbar-nav a { padding: 12px 16px; font-size: 1rem; }
    .hamburger { display: flex; }
    .btn-ghost { display: none; }
    .posts-grid { grid-template-columns: 1fr; gap: 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .auth-card { padding: 28px 20px; }
    .section { padding: 32px 0; }
    .hero { padding: 24px 0 36px; }
}

@media (max-width: 480px) {
    .posts-grid-4 { grid-template-columns: 1fr; }
    .container { padding: 0 16px; }
}
