/* ==========================================
   AI PULSE HUB - PREMIUM LIGHT DESIGN SYSTEM
   ========================================== */

/* Custom Variables */
:root {
    --bg-dark: #f8fafc; /* Slate 50 */
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --border-color: rgba(15, 23, 42, 0.08); /* Slate 900 at 8% */
    --border-hover: rgba(79, 70, 229, 0.4); /* Indigo border glow */
    
    --primary: #4f46e5; /* Premium Indigo */
    --primary-glow: rgba(79, 70, 229, 0.15);
    --secondary: #0891b2; /* Premium Teal/Cyan */
    --secondary-glow: rgba(8, 145, 178, 0.15);
    
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    --text-inverse: #ffffff;
    
    --success: #059669; /* Emerald 600 */
    --warning: #d97706; /* Amber 600 */
    --danger: #dc2626; /* Red 600 */
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --glass-blur: blur(16px);
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: transparent;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
}

#global-bg-canvas {
    background-color: var(--bg-dark);
}

/* Typography Defaults */
strong, b {
    font-weight: 700;
    color: var(--text-main);
}

em, i {
    font-style: italic;
}

s, strike, del {
    text-decoration: line-through;
}

u {
    text-decoration: underline;
}

/* Subtle background glows for Light Theme */
body::before, body::after {
    content: '';
    position: absolute;
    width: 35vw;
    height: 35vw;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
}

body::before {
    top: 5%;
    left: -10%;
    background: var(--primary);
}

body::after {
    top: 50%;
    right: -10%;
    background: var(--secondary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--text-main);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--text-muted);
}

.btn-accent {
    background: linear-gradient(135deg, var(--secondary), #06b6d4);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--secondary-glow);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.35);
}

.btn-danger {
    background: rgba(220, 38, 38, 0.08);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

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

/* Glassmorphism Navbar (Light Theme) */
.glass-navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 80px;
    width: auto;
    max-height: 100%;
    display: block;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.site-logo:hover {
    transform: scale(1.03);
}

.footer-logo .site-logo {
    height: 84px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.6rem;
}

.nav-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.4rem;
    cursor: pointer;
    display: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link.active {
    position: relative;
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.nav-auth-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-login-nav {
    color: var(--text-main);
    font-weight: 600;
    padding: 8px 16px;
}

.btn-login-nav:hover {
    color: var(--primary);
}

.btn-register-nav {
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.15);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-register-nav:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    border-color: transparent;
}

/* User Badge in Nav */
.nav-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
}

.user-role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.admin-dot { background-color: var(--secondary); box-shadow: 0 0 6px var(--secondary); }
.intern-dot { background-color: var(--warning); box-shadow: 0 0 6px var(--warning); }

.user-name {
    color: var(--text-main);
    font-weight: 600;
}

.user-role-label {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-logout {
    color: var(--danger);
    margin-left: 5px;
    font-size: 0.95rem;
    opacity: 0.7;
}

.btn-logout:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    padding: 100px 0 80px 0;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.15);
    padding: 6px 16px;
    border-radius: 30px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    animation: float 4s ease-in-out infinite;
}

.hero h1 {
    font-size: 3.8rem;
    max-width: 850px;
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, var(--text-main) 40%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 36px auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Cards & Grids */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.section-title p {
    color: var(--text-muted);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Glass Card - Light Theme */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
}

.glass-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.08);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.glass-card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-title a {
    color: var(--text-main);
}

.card-title a:hover {
    color: var(--primary);
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: auto;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.author-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
}

.read-more {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
}

.read-more:hover {
    color: var(--secondary);
}

/* Authentication Pages */
.auth-wrapper {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.auth-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    display: inline-block;
}

.auth-header p {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle i {
    position: static !important;
    transform: none !important;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.password-toggle:hover i {
    color: var(--primary);
}

.form-control.password-input {
    padding-right: 42px;
}


.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.15);
    color: var(--text-main);
    padding: 12px 16px 12px 42px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.15);
}

.select-control {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.auth-actions {
    margin-top: 28px;
}

.auth-actions .btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    font-weight: 600;
    color: var(--primary);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.06);
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.15);
}

.alert-success {
    background: rgba(5, 150, 105, 0.06);
    color: var(--success);
    border-color: rgba(5, 150, 105, 0.15);
}

/* Dashboard Styles */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    padding: 40px 0;
    min-height: 80vh;
}

.dashboard-sidebar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    height: fit-content;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    position: sticky;
    top: 100px;
    align-self: start;
}

@media (min-width: 992px) {
    .dashboard-sidebar {
        height: calc(100vh - 160px);
        overflow-y: auto;
        top: 130px;
    }
    
    /* Premium Thin Scrollbar for the Sidebar */
    .dashboard-sidebar::-webkit-scrollbar {
        width: 5px;
    }
    .dashboard-sidebar::-webkit-scrollbar-track {
        background: transparent;
    }
    .dashboard-sidebar::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.08);
        border-radius: 10px;
    }
    .dashboard-sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.16);
    }
}

.sidebar-user {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.sidebar-user .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.sidebar-user h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

.sidebar-user span {
    font-size: 0.8rem;
    padding: 2px 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition-smooth);
}

.sidebar-link:hover, .sidebar-link.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.sidebar-link.active {
    border-left: 3px solid var(--primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: 13px;
    color: var(--primary);
    font-weight: 600;
}

.dashboard-main {
    flex-grow: 1;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon.primary { background: rgba(79, 70, 229, 0.08); color: var(--primary); }
.stat-icon.secondary { background: rgba(8, 145, 178, 0.08); color: var(--secondary); }
.stat-icon.warning { background: rgba(217, 119, 6, 0.08); color: var(--warning); }

.stat-info h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-info span {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-main);
}

/* Dashboard Table */
.dashboard-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.table-wrapper {
    overflow-x: auto;
}

table.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table.dashboard-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

table.dashboard-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-main);
}

table.dashboard-table tr:last-child td {
    border-bottom: none;
}

.badge-status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-status.published {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success);
}

.badge-status.draft {
    background: rgba(217, 119, 6, 0.08);
    color: var(--warning);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.btn-action-icon:hover {
    color: var(--text-main);
    background: #f8fafc;
}

.btn-action-icon.edit:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-action-icon.delete:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-action-icon.view:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Blog Editor Page */
.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    padding: 40px 0;
}

.user-management-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 30px;
    padding: 0;
}

.editor-main-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    min-width: 0;
}

.editor-sidebar-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

/* Custom Rich Text Area (Light theme Quill) */
.quill-editor-wrapper {
    margin-bottom: 24px;
}

#editor-container {
    height: 380px;
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.15) !important;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
}

.ql-toolbar {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.15) !important;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.ql-toolbar .ql-stroke {
    stroke: var(--text-muted) !important;
}

.ql-toolbar .ql-fill {
    fill: var(--text-muted) !important;
}

.ql-toolbar .ql-picker {
    color: var(--text-muted) !important;
}

.ql-toolbar .ql-active .ql-stroke, 
.ql-toolbar .ql-picker-label.ql-active {
    stroke: var(--primary) !important;
    color: var(--primary) !important;
}

/* Meta Preview Section */
.seo-preview {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.seo-preview h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.seo-preview h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.google-preview {
    background: #ffffff;
    color: #1a0dab;
    padding: 16px;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.google-url {
    color: #202124;
    font-size: 12px;
    margin-bottom: 2px;
}

.google-title {
    font-size: 19px;
    font-weight: normal;
    margin-bottom: 3px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.google-desc {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.58;
}

/* Post Reader View */
.post-header {
    padding: 140px 0 40px 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .post-header {
        padding: 110px 0 30px 0;
    }
}

@media (max-width: 576px) {
    .post-header {
        padding: 90px 0 20px 0;
    }
}

.post-category {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.post-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.post-meta-details {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-featured-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-body {
    max-width: 800px;
    margin: 0 auto 60px auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155; /* slate 700 for reading comfort */
}

.post-body p {
    margin-bottom: 24px;
}

.post-body h2, .post-body h3 {
    margin: 40px 0 20px 0;
    color: var(--text-main);
}

/* Rich Text Formatting Styles */
.post-body strong, .post-body b {
    font-weight: 700;
    color: var(--text-main);
}

.post-body em, .post-body i {
    font-style: italic;
}

.post-body s, .post-body strike, .post-body del {
    text-decoration: line-through;
}

.post-body u {
    text-decoration: underline;
}

.post-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-muted);
}

.post-body ul, .post-body ol {
    padding-left: 24px;
    margin-bottom: 24px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body pre, .post-body code {
    font-family: monospace;
    background: rgba(15, 23, 42, 0.04);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--text-main);
}

.post-body pre {
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.tag-badge {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

/* AI News Specifics */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.news-source {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-weight: 600;
}

.pulse-icon {
    color: var(--danger);
}

/* Site Footer (Premium Dark Theme) */
.site-footer {
    background: linear-gradient(180deg, #0b0f19 0%, #030712 100%);
    position: relative;
    padding: 80px 0 40px 0;
    margin-top: 100px;
    box-shadow: 0 -15px 35px rgba(2, 6, 23, 0.4);
    color: #94a3b8; /* Slate 400 for general text */
}

/* Premium gradient top-glow line */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.footer-tagline {
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 320px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.social-link:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.4);
}

.social-link[aria-label="Facebook"]:hover {
    background: #1877F2;
    border-color: #1877F2;
    box-shadow: 0 8px 16px rgba(24, 119, 242, 0.4);
}

.social-link[aria-label="Twitter"]:hover {
    background: #000000;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.15);
}

.social-link[aria-label="Instagram"]:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(220, 39, 67, 0.4);
}

.social-link[aria-label="LinkedIn"]:hover {
    background: #0A66C2;
    border-color: #0A66C2;
    box-shadow: 0 8px 16px rgba(10, 102, 194, 0.4);
}

.social-link[aria-label="YouTube"]:hover {
    background: #FF0000;
    border-color: #FF0000;
    box-shadow: 0 8px 16px rgba(255, 0, 0, 0.4);
}

.social-link[aria-label="Pinterest"]:hover {
    background: #BD081C;
    border-color: #BD081C;
    box-shadow: 0 8px 16px rgba(189, 8, 28, 0.4);
}

.footer-column h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
    color: #ffffff;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

/* Beautiful Accent Underline for Column Headers */
.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #94a3b8;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

/* Subtle sliding Chevron on hover */
.footer-column ul li a .footer-icon {
    font-size: 0.65rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: var(--transition-smooth);
}

.footer-column ul li a:hover {
    color: var(--secondary);
    transform: translateX(6px);
}

.footer-column ul li a:hover .footer-icon {
    opacity: 1;
    transform: translateX(0);
}

.tech-stack-desc {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* Modern Tech Tags Styles */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tech-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.tech-badge.php-badge, .tech-badge.quill-badge {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #a5b4fc; /* light indigo */
}

.tech-badge.mysql-badge {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: #67e8f9; /* light cyan */
}

.tech-badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 24px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: #64748b;
}

.footer-bottom-flex {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-legal-links {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: #64748b;
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.footer-legal-links a:hover {
    color: #ffffff;
}

.footer-legal-divider {
    color: rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    user-select: none;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}



/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Search bar styling */
.search-box-wrapper {
    position: relative;
    max-width: 400px;
    margin-bottom: 30px;
}

.search-box-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.12);
}

/* Responsive Styles */
@media (max-width: 991px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .editor-layout {
        grid-template-columns: 1fr;
    }
    .user-management-layout {
        grid-template-columns: 1fr;
    }
    .site-logo {
        height: 60px;
    }
    .footer-logo .site-logo {
        height: 68px;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        padding: 24px;
        gap: 16px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom-flex {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .site-logo {
        height: 44px;
    }
    .footer-logo .site-logo {
        height: 52px;
    }
    .hero h1 {
        font-size: 2.0rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }
    .section-title h2 {
        font-size: 1.8rem;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Rich Text Content Table Styles (Quill & Frontend Outputs) */
.ql-editor table,
.post-body table,
.news-detail-body table,
.tool-detail-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow-x: auto;
}

.ql-editor table th,
.post-body table th,
.news-detail-body table th,
.tool-detail-body table th {
    background: rgba(79, 70, 229, 0.08); /* light primary tint */
    color: var(--text-main);
    font-weight: 700;
    text-align: left;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
}

.ql-editor table td,
.post-body table td,
.news-detail-body table td,
.tool-detail-body table td {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.ql-editor table tr:nth-child(even),
.post-body table tr:nth-child(even),
.news-detail-body table tr:nth-child(even),
.tool-detail-body table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.ql-editor table tr:hover,
.post-body table tr:hover,
.news-detail-body table tr:hover,
.tool-detail-body table tr:hover {
    background: rgba(8, 145, 178, 0.02); /* light secondary tint */
}

/* Floating table controls styling */
.quill-table-controls {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
}

.quill-table-controls button {
    font-size: 0.8rem !important;
    padding: 8px 12px !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Media Selector Modal */
.media-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mediaFadeIn 0.2s ease-out;
}

.media-modal-content {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.media-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.media-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.media-modal-close:hover {
    color: var(--danger);
}

.media-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.media-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}

.media-modal-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease-in-out;
    position: relative;
    display: flex;
    flex-direction: column;
}

.media-modal-item:hover {
    transform: translateY(-3px);
    border-color: var(--secondary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.media-modal-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.media-modal-item-name {
    font-size: 0.72rem;
    padding: 6px 8px;
    color: var(--text-muted);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    background: #f8fafc;
}

@keyframes mediaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================
   AI TOOLS MULTI-COLUMN LIST LAYOUT STYLE
   ========================================== */

.category-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--text-muted);
}
.category-section-title::before,
.category-section-title::after {
    content: "";
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: var(--border-color);
    margin: 0 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.category-list-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 20px 20px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    height: 520px; /* Fixed height for clean grid layout */
    transition: var(--transition-smooth);
}

.category-list-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

/* Accent top borders */
.category-list-card.card-accent-1 { border-top: 3px solid #3b82f6; } /* Latest AI - Blue */
.category-list-card.card-accent-2 { border-top: 3px solid #f97316; } /* Editors Selection - Orange */
.category-list-card.card-accent-3 { border-top: 3px solid #1e293b; } /* SuperTools - Dark Slate */
.category-list-card.card-accent-4 { border-top: 3px solid #06b6d4; } /* Chat & Assistant - Cyan */

.card-list-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.card-list-header i {
    font-size: 1rem;
}
.card-list-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.card-items-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-right: 4px;
}

/* Custom Scrollbar for list cards */
.card-items-list::-webkit-scrollbar {
    width: 4px;
}
.card-items-list::-webkit-scrollbar-track {
    background: transparent;
}
.card-items-list::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.06);
    border-radius: 10px;
}
.card-items-list::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.15);
}

.list-item-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.04);
    gap: 10px;
    transition: var(--transition-smooth);
}
.list-item-row:hover {
    background: rgba(79, 70, 229, 0.02);
    padding-left: 4px;
}
.list-item-row:last-child {
    border-bottom: none;
}

.item-number {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    width: 18px;
    text-align: right;
    flex-shrink: 0;
}

.item-logo {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.item-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    transition: var(--transition-smooth);
}
.item-name:hover {
    color: var(--primary);
}

.item-external-link {
    color: rgba(15, 23, 42, 0.25);
    font-size: 0.75rem;
    transition: var(--transition-smooth);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}
.item-external-link:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.card-list-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}
.category-footer-btn {
    display: block;
    width: 100%;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.02);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: var(--transition-smooth);
}
.category-footer-btn:hover {
    background: rgba(79, 70, 229, 0.05);
    color: var(--primary);
}

/* Responsiveness overrides for the categories layout */
@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .category-list-card {
        height: 480px;
    }
}

/* Page container padding adjustments to clear the sticky navbar (112px on desktop) */
.main-page-container {
    padding-top: 140px !important;
}

@media (max-width: 991px) {
    .main-page-container {
        padding-top: 110px !important;
    }
}

@media (max-width: 576px) {
    .main-page-container {
        padding-top: 90px !important;
    }
}
