/* ============================================
   Modern Blog System - Ultra-Responsive Design
   Vibrant Purple & Orange Theme
   ============================================ */

/* CSS Variables - Vibrant Color Palette */
:root {
    --primary: #a855f7;
    --primary-light: #c084fc;
    --primary-dark: #9333ea;
    --accent: #fb923c;
    --accent-light: #fdba74;
    --accent-dark: #f97316;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #eab308;
    --dark: #18181b;
    --dark-surface: #27272a;
    --light: #fafaf9;
    --light-surface: #ffffff;
    --border: #e7e5e4;
    --text: #1c1917;
    --text-light: #78716c;
    --text-muted: #a8a29e;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    --gradient-accent: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    --gradient-success: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-dark: linear-gradient(135deg, #18181b 0%, #3f3f46 100%);
    --gradient-hero: linear-gradient(135deg, #a855f7 0%, #fb923c 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.4);
    --shadow-accent: 0 0 20px rgba(251, 146, 60, 0.4);
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
    overflow-x: hidden;
}

::selection {
    background-color: var(--primary);
    color: white;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
}

.container-small {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
}

/* ============================================
   HEADER - Glassmorphism
   ============================================ */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(231, 229, 228, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.75rem, 2vw, 1.25rem) 0;
    gap: var(--spacing-md, 1.5rem);
    position: relative;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: all var(--transition-base);
    z-index: 1001;
}

.menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.logo {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

.nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.nav-link {
    padding: 0.65rem 1rem;
    color: var(--text);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    white-space: nowrap;
    flex: 0 1 auto;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
}

.nav-link:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-link.admin-link {
    background: var(--gradient-dark);
    color: white;
}

.nav-link.admin-link:hover {
    background: var(--gradient-accent);
    transform: translateY(-2px) scale(1.05);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: clamp(3rem, 10vw, 6rem) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10%, 10%) scale(1.1); }
}

.hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
    padding: clamp(2rem, 6vw, 4rem) 0;
    min-height: 60vh;
}

/* ============================================
   POSTS GRID
   ============================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(1.5rem, 4vw, 2.5rem);
    margin-top: 2rem;
}

/* Better mobile posts grid - Horizontal layout on mobile */
@media (max-width: 640px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Horizontal card layout for mobile */
    .post-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch;
        min-height: 140px;
        overflow: visible;
    }
    
    .post-card:hover {
        transform: translateY(0) !important;
    }
    
    .post-image {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
        height: 100% !important;
        flex-shrink: 0 !important;
        border-radius: var(--radius-lg) 0 0 var(--radius-lg) !important;
    }
    
    .post-image::after {
        display: none;
    }
    
    .post-image img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
    }
    
    .post-card:hover .post-image img {
        transform: scale(1) !important;
    }
    
    .post-content {
        padding: 0.9rem !important;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
    
    .post-category {
        font-size: 0.65rem !important;
        padding: 0.25rem 0.6rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .post-title {
        font-size: 0.95rem !important;
        margin-bottom: 0.4rem !important;
        line-height: 1.3 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    .post-excerpt {
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.5rem !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    .post-meta {
        font-size: 0.7rem !important;
        gap: 0.5rem !important;
        padding-top: 0.5rem !important;
        margin-top: auto !important;
        flex-wrap: wrap;
    }
}

/* Mobile Horizontal Card Layout - Extra Small Screens */
@media (max-width: 480px) {
    .post-card {
        min-height: 130px;
    }
    
    .post-image {
        width: 110px !important;
        min-width: 110px !important;
        max-width: 110px !important;
    }
    
    .post-content {
        padding: 0.75rem !important;
    }
    
    .post-category {
        font-size: 0.6rem !important;
        padding: 0.2rem 0.5rem !important;
    }
    
    .post-title {
        font-size: 0.9rem !important;
    }
    
    .post-excerpt {
        font-size: 0.75rem !important;
    }
    
    .post-meta {
        font-size: 0.65rem !important;
    }
}

.post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
    animation: fadeIn 0.6s ease-out backwards;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.post-image {
    width: 100%;
    height: clamp(180px, 30vw, 240px);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(251, 146, 60, 0.1) 100%);
    position: relative;
    flex-shrink: 0;
}

.post-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.post-card:hover .post-image::after {
    opacity: 1;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    display: block;
}

.post-card:hover .post-image img {
    transform: scale(1.1);
}

.post-content {
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.post-category {
    display: inline-block;
    background: var(--gradient-accent);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-base);
}

.post-category:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-accent);
}

.post-title {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.post-title a {
    color: var(--dark);
    background: linear-gradient(to right, var(--primary), var(--accent));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size var(--transition-base);
}

.post-title a:hover {
    background-size: 100% 2px;
}

.post-excerpt {
    color: var(--text-light);
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    margin-bottom: 1rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
   SINGLE POST
   ============================================ */
.post-single {
    padding: clamp(1.5rem, 4vw, 3rem) 0;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
}

.post-title-single {
    font-size: clamp(1.75rem, 6vw, 3rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-meta-single {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--text-light);
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

.post-featured-image {
    margin: 2rem 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.post-featured-image img {
    width: 100%;
    height: auto;
}

.post-body {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    color: var(--text);
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2, 
.post-body h3 {
    margin: 2rem 0 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.post-body h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.post-body h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.post-body img {
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

/* ============================================
   RELATED POSTS
   ============================================ */
.related-posts {
    background: linear-gradient(180deg, transparent 0%, rgba(168, 85, 247, 0.03) 100%);
    padding: clamp(2rem, 6vw, 4rem) 0;
    margin-top: 3rem;
}

.section-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-info {
    color: var(--text-light);
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   NO POSTS
   ============================================ */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--dark);
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: clamp(0.65rem, 2vw, 0.85rem) clamp(1.25rem, 3vw, 1.75rem);
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width var(--transition-base), height var(--transition-base);
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
    background: var(--dark-surface);
    color: white;
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background: var(--dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: var(--shadow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.5rem;
    cursor: pointer;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    background: none;
    border: none;
    color: var(--text-light);
    transition: all var(--transition-base);
    border-radius: var(--radius-sm);
}

.btn-icon:hover {
    color: var(--primary);
    background: var(--light);
    transform: scale(1.1);
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */
.admin-body {
    background: linear-gradient(135deg, #fafaf9 0%, #fae8ff 100%);
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: clamp(240px, 20vw, 280px);
    background: var(--gradient-dark);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    z-index: 100;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    margin-bottom: 0.25rem;
    font-weight: 800;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

.sidebar-header p {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    opacity: 0.7;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: block;
    padding: clamp(0.65rem, 1.5vw, 0.85rem) 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--transition-base);
    border-left: 3px solid transparent;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--accent);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    border-left-color: var(--accent);
}

.admin-main {
    flex: 1;
    margin-left: clamp(240px, 20vw, 280px);
}

.admin-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.admin-header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.admin-user {
    color: var(--text-light);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    font-weight: 500;
}

.admin-content {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card h3 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-light);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    font-weight: 600;
}

/* ============================================
   ADMIN SECTIONS
   ============================================ */
.admin-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* ============================================
   TABLES
   ============================================ */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #fafaf9 0%, #fae8ff 100%);
}

.data-table th {
    padding: clamp(0.85rem, 2vw, 1.15rem);
    text-align: left;
    font-weight: 700;
    color: var(--text);
    border-bottom: 2px solid var(--primary);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: clamp(0.85rem, 2vw, 1.15rem);
    border-bottom: 1px solid var(--border);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.data-table tbody tr {
    transition: all var(--transition-fast);
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.05) 0%, transparent 100%);
    transform: scale(1.01);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-published {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.badge-draft {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.form-control {
    width: 100%;
    padding: clamp(0.75rem, 2vw, 0.95rem);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    transition: all var(--transition-base);
    background: white;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
    transform: translateY(-1px);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-col-4 {
    grid-column: span 1;
}

.form-col-8 {
    grid-column: span 2;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
    flex-wrap: wrap;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 20s ease-in-out infinite;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: clamp(2rem, 5vw, 3rem);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.login-footer a {
    color: var(--primary);
    font-weight: 600;
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   CATEGORY MANAGEMENT
   ============================================ */
.category-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.add-category-form {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.add-category-form h2 {
    margin-bottom: 1rem;
    font-weight: 800;
}

.inline-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.categories-list h2 {
    margin-bottom: 1.5rem;
    font-weight: 800;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet & Mobile Navigation */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 220px;
    }
    
    .admin-main {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    /* Mobile Sidebar - Collapsible */
    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
        width: 100%;
    }
    
    /* Mobile Menu Toggle - Show on mobile */
    .menu-toggle {
        display: block;
    }
    
    /* Mobile Navigation - Hidden by default */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        box-shadow: var(--shadow-xl);
        gap: 0.25rem;
        z-index: 999;
        overflow-y: auto;
        transition: right var(--transition-base);
    }
    
    /* Show menu when active - requires JS to add 'menu-open' class */
    .nav.menu-open {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.85rem 1.25rem;
        font-size: 1rem;
        border-radius: var(--radius);
    }
    
    /* Overlay backdrop */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        transition: opacity var(--transition-base);
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .post-title-single {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-col-4,
    .form-col-8 {
        grid-column: span 1;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .inline-form {
        flex-direction: column;
    }
    
    .pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Small Mobile - Single Column Posts */
@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    /* Single column stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Smaller padding on mobile */
    .admin-content {
        padding: 1rem;
    }
    
    .admin-section {
        padding: 1rem;
    }
    
    /* Even more compact mobile menu */
    .nav {
        width: 260px;
        padding: 4rem 1rem 2rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

/* ============================================
   SMOOTH SCROLL & ANIMATIONS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}