/* ===========================
   PREMIUM BLOG CSS - 2026
   Dark/Light Mode & Glassmorphism
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@700;800&family=Poppins:wght@400;600;700&family=Roboto:wght@400;700&family=JetBrains+Mono:wght@400;700&family=Outfit:wght@400;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --bg: #0f0f13;
    --bg2: #16161d;
    --bg3: #1e1e2a;
    --card: rgba(255, 255, 255, 0.04);
    --card-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --text: #e8e8f0;
    --text-muted: #8888a8;
    --accent: #7c6dfa;
    --accent-rgb: 124, 109, 250;
    --accent2: #fa6d9a;
    --accent-grad: linear-gradient(135deg, var(--accent), var(--accent2));
    --glass-opacity: 0.05;
    --glass: rgba(255, 255, 255, var(--glass-opacity));
    --glass-border: rgba(255, 255, 255, 0.12);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --radius-sm: 8px;
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: var(--font-body);
    --font-body: 'Inter', system-ui, sans-serif;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInPage 0.6s ease-out forwards;
}

[data-theme="light"] {
    --bg: #f4f4f8;
    --bg2: #ffffff;
    --bg3: #ebebf5;
    --card: rgba(255, 255, 255, 0.8);
    --card-hover: rgba(255, 255, 255, 1);
    --border: rgba(0, 0, 0, 0.08);
    --text: #1a1a2e;
    --text-muted: #6666a0;
    --glass: rgba(255, 255, 255, calc(var(--glass-opacity) * 10));
    --glass-border: rgba(255, 255, 255, 0.9);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===== BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    line-height: 1.7;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(15, 15, 19, 0.85);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    transition: background var(--transition);
}

[data-theme="light"] .navbar {
    background: rgba(244, 244, 248, 0.85);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.nav-search {
    flex: 1;
    max-width: 380px;
    position: relative;
}

.nav-search input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition);
    outline: none;
}

.nav-search input:focus {
    border-color: var(--accent);
    background: var(--card-hover);
    box-shadow: 0 0 0 3px rgba(124, 109, 250, 0.15);
}

.nav-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-btn:hover {
    background: var(--card-hover);
    border-color: var(--accent);
}

.admin-link {
    padding: 8px 18px;
    background: var(--accent-grad);
    color: white !important;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity var(--transition), transform var(--transition);
    -webkit-text-fill-color: white;
}

.admin-link:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px);
}

/* ===== SEARCH RESULTS DROPDOWN ===== */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: none;
    z-index: 200;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: block;
    padding: 12px 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--card);
}

.search-result-item .result-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.search-result-item .result-cat {
    font-size: 0.75rem;
    color: var(--accent);
}

/* ===== HERO ===== */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 109, 250, 0.15) 0%, transparent 70%);
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.hero-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--accent-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    position: relative;
}

.hero-avatar::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--accent-grad);
    z-index: -1;
    opacity: 0.4;
    animation: pulse 3s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}

.hero-name {
    font-family: var(--font-display);
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 12px;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-bio {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 24px;
}

.hero-social {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.hero-social a {
    padding: 8px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
}

.hero-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    opacity: 1;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin-top: 36px;
    padding-top: 36px;
    border-top: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== CATEGORY FILTER ===== */
.category-section {
    padding: 32px 0 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.filter-tab {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-1px);
}

/* ===== POSTS GRID ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 0 0 60px;
}

/* ===== POST CARD ===== */
.post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 0 1px var(--accent);
    background: var(--card-hover);
}

.post-card:nth-child(2) {
    animation-delay: 0.1s;
}

.post-card:nth-child(3) {
    animation-delay: 0.2s;
}

.post-card:nth-child(4) {
    animation-delay: 0.15s;
}

.post-card:nth-child(5) {
    animation-delay: 0.25s;
}

.post-card:nth-child(6) {
    animation-delay: 0.3s;
}

.card-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--bg3), var(--bg2));
}

.card-cover-placeholder {
    height: 180px;
    background: linear-gradient(135deg, #7c6dfa22, #fa6d9a22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent);
}

.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.card-category {
    background: rgba(124, 109, 250, 0.15);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.card-readtime {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--text);
    transition: color var(--transition);
}

.post-card:hover .card-title {
    color: var(--accent);
}

.card-excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.card-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    background: var(--bg3);
    border-radius: 4px;
    color: var(--text-muted);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.read-more-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition);
}

.read-more-btn:hover {
    gap: 8px;
    opacity: 1;
}

.card-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.card-stat {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 0;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 20px;
    text-align: center;
}

.footer-content {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    opacity: 1;
}

/* ===== POST DETAIL ===== */
.post-hero {
    min-height: 400px;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.post-hero-cover {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 15, 19, 0.95) 0%, rgba(15, 15, 19, 0.3) 100%);
}

.post-hero-content {
    position: relative;
    padding: 48px 0;
    width: 100%;
}

.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.post-category-badge {
    background: var(--accent-grad);
    color: white;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.post-date,
.post-readtime,
.post-views {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-title-big {
    font-family: var(--font-display);
    font-size: 2.6rem;
    line-height: 1.15;
    color: white;
    max-width: 800px;
    margin-bottom: 16px;
}

.post-tags-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-tag {
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== POST CONTENT ===== */
.post-layout {
    max-width: 790px;
    margin: 0 auto;
    padding: 48px 24px 60px;
}

.post-content {
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--text);
}

.post-content h1,
.post-content h2,
.post-content h3 {
    font-family: var(--font-display);
    margin: 36px 0 16px;
    color: var(--text);
}

.post-content h2 {
    font-size: 1.7rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.post-content h3 {
    font-size: 1.3rem;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 16px 20px;
    margin: 24px 0;
    background: var(--bg3);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-content pre {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    background: var(--bg3);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent2);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: #e8e8f0;
}

.post-content ul,
.post-content ol {
    margin: 16px 0 20px 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content img {
    border-radius: var(--radius);
    margin: 24px 0;
}

/* ===== LIKE BUTTON ===== */
.like-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 36px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 36px 0;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-body);
}

.like-btn:hover,
.like-btn.liked {
    background: rgba(250, 109, 154, 0.15);
    border-color: var(--accent2);
    color: var(--accent2);
    transform: scale(1.05);
}

.like-btn .heart {
    font-size: 1.2rem;
    transition: transform var(--transition);
}

.like-btn:hover .heart {
    transform: scale(1.3);
}

.like-btn.liked .heart {
    animation: heartBeat 0.4s ease;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.5);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== REACTIONS ===== */
.reactions-container {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.reaction-btn {
    background: var(--bg3);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reaction-btn:hover {
    transform: scale(1.1);
    background: var(--bg2);
    border-color: var(--accent);
}

.reaction-btn.active {
    background: rgba(124, 109, 250, 0.1);
    border-color: var(--accent);
}

.reaction-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.share-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.share-btn {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.share-btn.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}

.share-btn.copy:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ===== COMMENTS ===== */
.comments-section {
    margin-top: 48px;
}

.comments-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input,
.form-textarea {
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 109, 250, 0.12);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.submit-btn {
    padding: 10px 28px;
    background: var(--accent-grad);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition);
}

.submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    animation: fadeUp 0.3s ease;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.comment-text {
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ===== LOGIN ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(124, 109, 250, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(250, 109, 154, 0.12) 0%, transparent 60%);
}

.login-card {
    position: relative;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-grad);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 12px;
}

.login-logo h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.login-input {
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition);
}

.login-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 109, 250, 0.12);
}

.login-btn {
    padding: 13px;
    background: var(--accent-grad);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition);
    margin-top: 8px;
}

.login-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.login-error {
    background: rgba(250, 100, 100, 0.12);
    border: 1px solid rgba(250, 100, 100, 0.3);
    color: #fa6464;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 8px;
}

/* ===== ADMIN ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 0 20px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.sidebar-logo h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-logo p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-label {
    display: block;
    padding: 20px 24px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    opacity: 0.6;
}

.sidebar-nav {
    list-style: none;
    padding: 0 10px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 2px;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: var(--card);
    color: var(--text);
    opacity: 1;
}

.sidebar-nav li a.active {
    color: var(--accent);
}

.sidebar-nav li a .nav-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.admin-content {
    flex: 1;
    padding: 32px;
    overflow: hidden;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.admin-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: var(--accent-grad);
    opacity: 0.07;
    border-radius: 50%;
    transform: translate(20px, -20px);
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.stat-card .sc-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.stat-card .sc-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .sc-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== ADMIN TABLE ===== */
.admin-table-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.admin-table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg2);
    font-weight: 600;
}

.admin-table td {
    padding: 14px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--card-hover);
}

.admin-table .badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-pub {
    background: rgba(110, 230, 130, 0.15);
    color: #6ee682;
}

.badge-draft {
    background: rgba(250, 200, 60, 0.15);
    color: #fac83c;
}

.action-btns {
    display: flex;
    gap: 6px;
}

.action-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--transition);
}

.action-btn.edit:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.action-btn.delete:hover {
    background: rgba(250, 100, 100, 0.2);
    border-color: rgba(250, 100, 100, 0.5);
    color: #fa6464;
}

/* ===== EDITOR ===== */
.editor-wrapper {
    max-width: 900px;
}

.editor-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-field {
    padding: 12px 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    transition: all var(--transition);
}

.input-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 109, 250, 0.12);
}

.editor-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cover-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--card);
}

.cover-upload-area:hover {
    border-color: var(--accent);
    background: var(--card-hover);
}

.cover-upload-area .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.cover-upload-area p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cover-preview {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    display: none;
}

.editor-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-primary {
    padding: 11px 28px;
    background: var(--accent-grad);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 11px 28px;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.draft-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.draft-toggle input {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* EasyMDE overrides */
.EasyMDEContainer .CodeMirror {
    background: var(--bg2) !important;
    color: var(--text) !important;
    border: none !important;
    font-family: 'Courier New', monospace !important;
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
}

.editor-toolbar {
    background: var(--bg3) !important;
    border-color: var(--border) !important;
}

.editor-toolbar button {
    color: var(--text-muted) !important;
}

.editor-toolbar button:hover,
.editor-toolbar button.active {
    background: var(--card) !important;
    border-color: var(--border) !important;
    color: var(--accent) !important;
}

.EasyMDEContainer .editor-preview {
    background: var(--bg2) !important;
    color: var(--text) !important;
}

.EasyMDEContainer {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    overflow: hidden !important;
}

/* Tags input */
.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-height: 44px;
    align-items: center;
    cursor: text;
    transition: all var(--transition);
}

.tags-input-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 109, 250, 0.12);
}

.tag-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(124, 109, 250, 0.18);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-chip button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1;
    opacity: 0.7;
}

.tag-chip button:hover {
    opacity: 1;
}

.tags-raw-input {
    border: none;
    background: none;
    color: var(--text);
    outline: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    min-width: 100px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    z-index: 999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: rgba(110, 230, 130, 0.4);
}

.toast.error {
    border-color: rgba(250, 100, 100, 0.4);
}

.toast-icon {
    font-size: 1.2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-search {
        display: none;
    }

    .hero-name {
        font-size: 1.8rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .editor-row {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
    }

    .post-title-big {
        font-size: 1.6rem;
    }

    .login-card {
        padding: 32px 24px;
    }
}

/* Switch Toggle UI */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Dropdown Nav */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 180px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: flex;
}

.nav-dropdown-content a {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text);
    text-decoration: none;
    transition: 0.2s;
}

.nav-dropdown-content a:hover {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
}

/* ===== BLUR-UP IMAGE LOADING ===== */
.blur-load {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    filter: blur(8px);
    transition: filter 0.8s ease-out;
}

.blur-load.loaded {
    filter: blur(0);
}

.blur-load img {
    opacity: 1;
    /* Orijinal görsel her zaman 1 olabilir, blur-load konteyneri bulanıklığı yönetiyor */
}

/* Shimmer Effect for Placeholders */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

.shimmer {
    animation: shimmer 1.5s infinite linear;
    background: linear-gradient(to right, var(--bg2) 8%, var(--bg3) 18%, var(--bg2) 33%);
    background-size: 800px 104px;
}

/* ===========================
   RESPONSIVE / MOBILE STYLES
   =========================== */

/* Mobil elementler masaüstünde gizli */
.mobile-nav-menu {
    display: none !important;
}

.hamburger-btn {
    display: none !important;
}

/* ===== TABLET (768px - 1024px) ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-name {
        font-size: 2.2rem;
    }
}

/* ===== MOBILE (max 768px) ===== */
@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 0 16px;
    }

    /* ===== NAVBAR ===== */
    .navbar .container {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 16px;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-search {
        order: 3;
        max-width: 100%;
        width: 100%;
        flex: none;
    }

    #dynamicNav {
        display: none !important;
        /* Hamburger menü ile açılacak */
    }

    .nav-actions {
        gap: 8px;
        margin-left: auto;
    }

    .admin-link {
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    .theme-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* Hamburger Button */
    .hamburger-btn {
        display: flex !important;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text);
        font-size: 1.2rem;
        cursor: pointer;
        order: 2;
    }

    /* Mobile Nav Menu */
    .mobile-nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 15, 19, 0.97);
        backdrop-filter: blur(20px);
        z-index: 999;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        padding: 40px 20px;
    }

    .mobile-nav-menu.open {
        display: flex;
    }

    .mobile-nav-menu a {
        font-size: 1.4rem;
        font-weight: 600;
        color: var(--text);
        padding: 12px 24px;
        border-radius: 12px;
        width: 100%;
        text-align: center;
        border: 1px solid var(--border);
        transition: all 0.2s;
    }

    .mobile-nav-menu a:hover {
        background: var(--accent);
        color: white;
        border-color: var(--accent);
        opacity: 1;
    }

    .mobile-nav-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: var(--card);
        border: 1px solid var(--border);
        color: var(--text);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 1.4rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ===== HERO ===== */
    .hero {
        padding: 48px 0 36px;
    }

    .hero-name {
        font-size: 1.8rem;
    }

    .hero-bio {
        font-size: 0.92rem;
    }

    .hero-stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    .stat-num {
        font-size: 1.4rem;
    }

    .hero-social {
        flex-wrap: wrap;
        gap: 8px;
    }

    .hero-avatar {
        width: 72px;
        height: 72px;
        font-size: 2rem;
    }

    /* ===== POSTS GRID ===== */
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding-bottom: 40px;
    }

    /* ===== FILTER TABS ===== */
    .filter-tabs {
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tab {
        white-space: nowrap;
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    /* ===== FOOTER ===== */
    footer {
        padding: 28px 0;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 12px;
        font-size: 0.82rem;
    }

    .footer-credits {
        margin-top: 12px;
        font-size: 0.8rem;
    }

    /* ===== POST DETAIL (post.html) ===== */
    .post-layout {
        padding: 24px 16px 40px;
    }

    .post-title-big,
    #postTitle {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }

    .post-hero {
        min-height: 240px;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-content h2 {
        font-size: 1.3rem;
    }

    .post-content h3 {
        font-size: 1.1rem;
    }

    .post-content pre {
        padding: 12px;
        font-size: 0.85rem;
    }

    /* ===== PWA BANNER ===== */
    .pwa-banner {
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
        padding: 14px 16px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        font-size: 0.85rem !important;
    }

    .pwa-banner-text {
        flex: 1;
        font-size: 0.82rem;
    }

    .pwa-install-btn {
        padding: 8px 16px !important;
        font-size: 0.82rem !important;
        white-space: nowrap;
    }

    .pwa-dismiss {
        flex-shrink: 0;
    }

    /* ===== ADMIN PANEL ===== */
    .admin-sidebar {
        width: 100% !important;
        position: static !important;
        height: auto !important;
    }

    .admin-layout {
        flex-direction: column !important;
    }

    .admin-main {
        padding: 16px !important;
    }

    /* ===== NAV DROPDOWN ===== */
    .nav-dropdown-content {
        position: static !important;
        box-shadow: none !important;
        border-radius: 8px;
        margin-top: 4px;
    }

    /* ===== TTS CONTAINER ===== */
    .tts-container {
        flex-direction: column !important;
        text-align: center;
        gap: 8px !important;
        padding: 12px !important;
    }

    /* ===== COMMENTS ===== */
    .comments-section {
        padding: 0 !important;
    }
}

/* ===== SMALL MOBILE (max 480px) ===== */
@media (max-width: 480px) {
    .hero-name {
        font-size: 1.5rem;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat-num {
        font-size: 1.2rem;
    }

    .card-body {
        padding: 14px;
    }

    .card-title {
        font-size: 1rem;
    }

    .post-title-big,
    #postTitle {
        font-size: 1.3rem !important;
    }

    .nav-logo {
        font-size: 1.05rem;
    }
}