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

:root {
    --bg: #ffffff;
    --fg: hsl(265, 4%, 12.9%);
    --muted: hsl(257, 4.6%, 55.4%);
    --border: hsl(256, 1.3%, 92.9%);
    --card: #ffffff;
    --secondary: hsl(248, 0.7%, 96.8%);

    --primary: hsl(213, 56%, 24%);
    --primary-mid: hsl(220, 60%, 35%);
    --primary-lt: hsl(213, 56%, 95%);

    --gradient-hero: linear-gradient(135deg, hsl(213, 56%, 24%) 0%, hsl(220, 60%, 35%) 50%, hsl(213, 56%, 24%) 100%);
    --gradient-accent: linear-gradient(135deg, hsl(0, 84%, 70%) 0%, hsl(15, 90%, 65%) 100%);

    --success: hsl(142, 71%, 45%);
    --warning: hsl(38, 92%, 50%);
    --danger: hsl(0, 72%, 51%);

    --shadow-card: 0 2px 12px -2px hsl(213 56% 24% / .08);
    --shadow-elevated: 0 8px 30px -6px hsl(213 56% 24% / .14);

    --sidebar-w: 260px;
    --radius: 12px;
}



/*main styles*/
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    background: var(--secondary);
    color: var(--fg);
    min-height: 100vh;
    line-height: 1.6;
}

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

a:hover {
    text-decoration: underline;
}



/*main layoiut styling*/
.dashboard-layout {
    display: flex;
}

.dashboard-layout main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    background: var(--secondary);
}



/*sidebar*/
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--card);
    border-right: 1px solid var(--border);
    box-shadow: 2px 0 12px hsl(213 56% 24% / .06);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-logo {
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
}

.logo-link:hover {
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-hero);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.logo-text {
    font-size: 17px;
    font-weight: 700;
    font-family: Georgia, serif;
    color: var(--fg);
}

.sidebar-user {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
    margin-bottom: 20px;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--secondary);
    color: var(--muted);
    text-transform: capitalize;
    font-weight: 600;
    margin-top: 3px;
}

.role-badge.premium {
    background: var(--gradient-accent);
    color: #fff;
}

.role-badge.category-admin {
    background: #d1fae5;
    color: #065f46;
}

.role-badge.category-name {
    background: #ede9fe;
    color: #7c3aed;
    display: inline-block;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 15px;
    font-weight: bold;
    transition: all .15s;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
}

.nav-link:hover {
    background: var(--secondary);
    color: var(--fg);
    text-decoration: none;
}

.nav-link.active {
    background: var(--gradient-hero);
    color: #fff;
}

.nav-link.logout {
    color: var(--muted);
}

.nav-link.logout:hover {
    color: var(--danger);
    background: hsl(0 72% 51% / .08);
}

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--border);
}



/*header style*/
.dash-header {
    padding: 28px 32px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
}

.dash-title {
    font-size: 22px;
    font-weight: 700;
    font-family: Georgia, serif;
    color: var(--fg);
}

.dash-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}



/*alert style*/
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 32px 0;
    font-size: 14px;
}

.alert-error {
    background: hsl(0 72% 51% / .08);
    border: 1px solid hsl(0 72% 51% / .25);
    color: hsl(0 60% 38%);
}

.alert-success {
    background: hsl(142 71% 45% / .08);
    border: 1px solid hsl(142 71% 45% / .25);
    color: hsl(142 55% 28%);
}



/*btns*/
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    font-family: inherit;
}


.btn-primary:hover {
    opacity: .88;
    text-decoration: none;
    color: #fff;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--fg);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    text-decoration: none;
    color: var(--fg);
}

.btn-hero {
    background: var(--gradient-hero);
    color: #fff;
}

.btn-hero:hover {
    opacity: .88;
    text-decoration: none;
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    opacity: .88;
    text-decoration: none;
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--secondary);
    color: var(--fg);
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Higher specificity override so .btn-sm always wins over variant rules (e.g. .btn-secondary) defined later in the file */
.btn.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.auth-alt-link{
    margin-top:24px;
    text-align:center;
}

.back-link{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:14px;
    text-decoration:none;
}

.back-link:hover{
text-decoration:underline;
}

.back-icon{
width:14px;
height:14px;
object-fit:contain;
opacity: 0.7;
}


/*forms*/
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

label {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
}

input[type=text],
input[type=email],
input[type=password],
select,
textarea {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--fg);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: border .15s, box-shadow .15s;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsl(213 56% 24% / .10);
}

textarea {
    resize: vertical;
    min-height: 200px;
}

.input-icon {
    position: relative;
}

.input-icon input {
    padding-left: 38px;
}

.input-icon .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}



/*cards*/
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: hsl(213 56% 24% / .08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-val {
    font-size: 26px;
    font-weight: 700;
    color: var(--fg);
}

.stat-lbl {
    font-size: 13px;
    color: var(--muted);
}



/*article carf*/
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.article-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    display: flex;
    /* gap: 5px; */
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    box-shadow: var(--shadow-card);
    height: 430px;
}

.article-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.article-card.locked {
    opacity: .85;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-tag {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    /* letter-spacing: .06em; */
    color: var(--primary);
}

.card-title {
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    padding-top: 12px;
}


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

.card-excerpt {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
    margin-top: 2px;
    overflow: hidden;

}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: var(--muted);
}

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

.author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.locked-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 20px;
    background: linear-gradient(to top, rgba(255, 255, 255, .97), transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}



/*trust score shit*/
.trust-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
}

.trust-high {
    background: hsl(142 71% 45% / .12);
    color: hsl(142 55% 28%);
}

.trust-mid {
    background: hsl(38 92% 50% / .12);
    color: hsl(38 65% 32%);
}

.trust-low {
    background: hsl(0 72% 51% / .12);
    color: hsl(0 60% 38%);
}


.page-content {
    padding: 32px;
}



/*grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}



/*filter bar style*/
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 6px 16px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.filter-btn.active {
    background: var(--gradient-hero);
    color: #fff;
    border-color: transparent;
}



/*authentication*/
.auth-wrap {
    display: flex;
    min-height: 100vh;
}

.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--bg);
}

.auth-brand-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: var(--gradient-hero);
}
.brand-center{
    text-align:center;
    max-width:420px;
}

.brand-icon{
    width:70px;
    height:70px;
    margin:0 auto 30px;
    background:rgba(255,255,255,0.12);
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
}

.brand-center h2{
    font-family:Georgia,serif;
    font-size:34px;
    margin-bottom:16px;
}

.brand-center p{
    color:rgba(255,255,255,0.8);
    line-height:1.6;
}

@media (max-width: 800px) {
    .auth-brand-side {
        display: none;
    }
}

.auth-box {
    width: 100%;
    max-width: 420px;
}

.auth-box h1 {
    font-size: 28px;
    font-weight: 700;
    font-family: Georgia, serif;
    color: var(--fg);
    margin-bottom: 8px;
}

.auth-box p.sub {
    color: var(--muted);
    margin-bottom: 32px;
    font-size: 14px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    color: var(--fg);
}

.auth-logo span:last-child {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 700;
}



/*article detils*/
.article-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
}

.article-body {
    font-size: 16px;
    line-height: 1.9;
    color: var(--fg);
}

.article-body h2 {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    margin: 36px 0 16px;
}

.article-body h3 {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    margin: 28px 0 12px;
}

.article-body p {
    margin-bottom: 18px;
    color: hsl(265 4% 20% / .85);
}

.article-body ul,
.article-body ol {
    margin: 16px 0 16px 24px;
}

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


/*write article*/
.write-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .write-grid {
        grid-template-columns: 1fr;
    }
}
    .write-layout {
        display: flex;
        gap: 24px;
        align-items: flex-start;
    }

    /* LEFT SIDE (MAIN FORM) */
    .write-layout form {
        flex: 3;
        max-width: 900px;
    }

    /* RIGHT SIDE (AI PANEL) */
    .write-layout .card {
        flex: 1;
        max-width: 320px; /* 🔥 KEY FIX */
        position: sticky;
        top: 20px;
    }

.write-layout {
    display: flex;
    gap: 32px;
    align-items: stretch; /* 🔥 KEY FIX */
}

/* LEFT SIDE */
.write-layout form {
    flex: 3;
    max-width: 800px;
}

/* RIGHT SIDE (AI PANEL) */
.ai-panel {
    flex: 1;
    max-width: 400px;
    display: flex;
}

.ai-panel .card {
    width: 100%;
    height: 100%; /* 🔥 MAKES IT TALL */
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.ai-panel .card h3 {
    margin-bottom: 12px;
}

.ai-panel .card p {
    margin-bottom: 12px;
}

.ai-panel .card .progress-bar {
    margin-bottom: 16px;
}
.ai-success-box {
    margin-top: 30px;
    padding: 14px 16px;
    background: #22c55e; /* green */
    color: black;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
}
.score-big {
    font-size: 48px;
    font-weight: 800;
    text-align: center;
}

.score-high {
    color: var(--success);
}

.score-mid {
    color: var(--warning);
}

.score-low {
    color: var(--danger);
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin: 4px 0;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--gradient-hero);
}

.dim-row {
    margin-bottom: 14px;
}

.dim-row .dim-head {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--fg);
}

.flagged-claim {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--fg);
}

.flag-high {
    border-color: hsl(0 72% 51% / .35);
    background: hsl(0 72% 51% / .06);
}

.flag-medium {
    border-color: hsl(38 92% 50% / .35);
    background: hsl(38 92% 50% / .06);
}

.flag-low {
    border-color: var(--border);
    background: var(--secondary);
}



/*data table*/
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    border-bottom: 2px solid var(--border);
    padding: 10px 16px;
    background: var(--secondary);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--fg);
    background: var(--card);
}

.data-table tr:hover td {
    background: var(--secondary);
}



/*upgrade*/
.upgrade-banner {
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    background: var(--gradient-hero);
    color: #fff;
}

.upgrade-banner h3 {
    font-size: 24px;
    font-weight: 700;
    font-family: Georgia, serif;
    margin-bottom: 10px;
    color: #fff;
}

.upgrade-banner p {
    opacity: .85;
    margin-bottom: 24px;
}



/*price*/
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 760px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-card);
}

.pricing-card.popular {
    border-color: hsl(0 84% 70%);
}

.plan-name {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: 12px;
}

.plan-price {
    font-size: 48px;
    font-weight: 800;
    font-family: Georgia, serif;
    color: var(--fg);
}

.plan-price span {
    font-size: 18px;
    font-weight: 400;
    color: var(--muted);
}

.plan-features {
    list-style: none;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-features li {
    font-size: 14px;
    display: flex;
    gap: 8px;
    color: var(--fg);
}

.plan-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}



/*random shit*/
.spacer {
    height: 24px;
}

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

.text-sm {
    font-size: 13px;
}

.flex {
    display: flex;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}
.mb-10 {
    font-family: Georgia, serif;
    margin: 30px 0 16px 0;
    padding-left: 12px;
    border-left: 4px solid #2b6de0;
    color: #1f2937;
    margin-bottom:40px;
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

.role-badge.premium {
    background: #ff6b6b;
    color: white;
}

.role-badge.category-admin {
    background: #d1fae5;
    color: #065f46;
}

.role-badge.free {
    background: #e5e7eb;
    color: #333;
}

.image-upload-container{
    margin-bottom:20px;
}

.image-preview{
    width:80%;
    height:240px;        
    background:#e5e5e5;
    border-radius:10px;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:12px;
}

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

.image-buttons{
    display:flex;
    gap:10px;
}

.btn-dark{
    background:#333;
    color:white;
    padding:8px 14px;
    border:none;
    border-radius:6px;
}

.btn-light{
    background:#ddd;
    padding:8px 14px;
    border:none;
    border-radius:6px;
}
.article-banner{
    margin:20px 0;
}

.article-banner img{
    width:100%;
    height:260px;
    object-fit:cover;
    border-radius:10px;
}

 .filter-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:20px;
}

.category-filters{
    display:flex;
    gap:8px;
    flex-wrap:nowrap;
    flex:1;
}

.category-filters a{
    padding:6px 14px;
    border-radius:8px;
    background:#f3f3f3;
    font-size:14px;
    text-decoration:none;
}

.category-filters a:hover{
    background:#333;
    color: white;
}

.search-bar{
    display:flex;
    align-items:center;

}

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

.search-input-wrapper input{
    padding:8px 28px 8px 12px;
    border-radius:8px;
    border:1px solid #ddd;
    width:200px;
}

.clear-btn{
    position:absolute;
    right:8px;
    top:50%;
    transform:translateY(-50%);
    border:none;
    background:none;
    cursor:pointer;
    display:none;

    display:flex;
    align-items:center;
    justify-content:center;
}
.clear-btn img{
    width:20px;
    height:20px;
}

.search-btn{
    border:1px solid #ddd;
    background: grey;
    padding:4px 10px;
    border-radius:6px;
    cursor:pointer;
}

.sort-filters{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:24px;
}

.sort-btn{
    padding:6px 14px;
    border-radius:8px;
    background:#f3f3f3;
    font-size:14px;
    text-decoration:none;
    color:#333;
}

.sort-btn:hover{
    background:#333;
    color: white;
    text-decoration:none;
}
.active-filter{
    background:#333;
    color:white !important;
    border-radius:8px;
}
.category-filters a.active-filter{
    background:#333;
    color:white !important;
}


 /* card display css*/
.card-image{
    position:relative;
    width:100%;
    height:150px;
    overflow:hidden;
    border-radius:10px 10px 0 0;
    flex-shrink: 0;
    padding-top: 12px;
}

.card-image img{
    width:100%;
    height: 100%;
    object-fit:cover;
    display:block;
}

.premium-locked{
    background:#e6e6e6;
    display:flex;
    align-items:center;
    justify-content:center;
}

.premium-overlay{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    color:#777;
    font-size:14px;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
    z-index:1;
    
}

.premium-overlay p{
    margin-top:10px;
    color: white;
    font-weight: bold;
    letter-spacing: 0.5px;
    
}

.premium-badge{
    position:absolute;
    top:10px;
    right:10px;
    background:#ff6b6b;
    color:white;
    padding:4px 10px;
    font-size:12px;
    border-radius:6px;
    z-index: 2;
}

.premium-overlay .premium-lock-icon{
    width:50px;
    height:50px;
    margin-top:15px;
}
.suspended-badge {
    display: inline-block;
    background: transparent;
    color: #dc3545;
    font-size: 11px;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 6px;
}

.article-card-link{
    text-decoration:none;
    color:inherit;
    display:block;
}
.article-card-link:hover{
    text-decoration:none;
}
.card-footer{
display:flex;
justify-content:space-between;
align-items:center;
margin-top:15px;
}

.footer-left{
display:flex;
align-items:center;
gap:10px;
}

.author-info{
display:flex;
flex-direction:column;
font-size:14px;
}

.card-time{
font-size:12px;
color:#777;
}

.footer-actions{
display:flex;
gap:18px;
align-items:center;
}

.action-btn{
cursor:pointer;
font-size:16px;
}
.article-summary{
margin-top:20px;
padding:16px 18px;
background:#f7f9fc;
border-left:4px solid #4a6cf7;
border-radius:8px;
}

.summary-title{
font-size:16px;
font-weight:600;
margin-bottom:6px;
color:#333;
}

.summary-text{
font-size:15px;
line-height:1.6;
color:#555;
}
.article-content-title{
margin-top:30px;
margin-bottom:18px;
font-size:18px;
font-weight:bold;
color:#333;
border-bottom: 1px solid #333;
padding-bottom:6px;

}

.article-content{
line-height:1.8;
font-size:16px;
color:black;
}
.comments-container{
max-width:1000px;
margin:0 auto;
}

/* ===== Verify Notice Page ===== */
.page-container{
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
    background:#f5f6fa;
    padding:20px;
}

.verify-card{
    background:white;
    padding:40px 50px;
    border-radius:10px;
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
    text-align:center;
    width:100%;
    max-width:520px;
    line-height:1.6;
}

.verify-card h2{
    margin-bottom:15px;
}

.verify-card p{
    margin:10px 0;
}
.success-msg{
    background:#e9f9ee;
    color:#2e7d32;
    padding:10px 14px;
    border-radius:6px;
    margin-bottom:15px;
    font-size:14px;
}

.error-msg{
    background:#fdecea;
    color:#c62828;
    padding:10px 14px;
    border-radius:6px;
    margin-bottom:15px;
    font-size:14px;
}

.button-group{
    display:flex;
    justify-content:center;
    gap:16px;
    margin-top:25px;
}

.btn-primary{
    background:#2d5be3;
    color:white;
    padding:10px 18px;
    border-radius:6px;
    text-decoration:none;
    border:none;
    margin-top: 20px;
}

.btn-primary:hover{
    background:#1f47c5;
}

.btn-secondary{
    background:#f1f1f1;
    border:1px solid #ccc;
    padding:10px 18px;
    border-radius:6px;
    cursor:pointer;
}

.btn-secondary:disabled{
    background:#ddd;
    cursor:not-allowed;
}

.btn-primary,
.btn-secondary{
    padding:10px 18px;
    border-radius:6px;
    font-size:14px;
    white-space:nowrap;
}

/* Home page view more css */
 .view-more-card {
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px dashed grey;
    border-radius:12px;
    min-height:220px;
    text-decoration:none;
    outline:none;
}
.view-more-card:hover {
    background-color: #f5f8ff;
}

 .view-more-content {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    color:#2b6de0;
    font-weight:600;
    font-size:16px;
}

.view-more-content img {
    width:18px;
    height:18px;
    padding-top: 2px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 4px;
    margin-bottom: 12px;
}

.progress-bar div {
    height: 100%;
    background: #4CAF50;
    border-radius: 4px;
}
.article-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.toggle-btn {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    background: #eee;
    color: #333;
    font-weight: 500;
}

.toggle-btn.active {
    background: #111;
    color: white;
}

.confirm_password {
    margin-bottom: 20px;
}


/* 🔥 Paywall container */
.paywall-box {
    background: white; 
    border: 1px solid #e5e7eb; 
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.paywall-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 12px;
    font-size: 20px;
}

/* lock icon inside paywall title */
.paywall-title img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* description */
.paywall-box p {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 8px;
}

.paywall-price {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 4px;
}

 /* main price (big bold) */
.price-main {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    padding: 0;
}

/* suffix (smaller, lighter) */
.price-suffix {
    font-size: 14px;
    color: #6b7280; 
}


/* button spacing */
.paywall-box .btn {
    margin-top: 8px;
}


/* 🔥 BUTTON SECTION CONTAINER */
.write-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* second row */
.write-actions-row {
    display: flex;
    gap: 10px;
}

.btn-ai {
    width: 100%;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ai:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}
.btn-draft {
    flex: 1;
    background: #f1f5f9;
    color: #111;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
}
.btn-publish {
    flex: 1;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-publish:hover {
    background: #1d4ed8;
}


.icon-btn img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    opacity: 0.6;
    transition: 0.2s ease;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: 0.2s ease;
}

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

.icon-btn.active img {
    filter: 
        drop-shadow(0 0 1px black)
        drop-shadow(0 0 1px black);
}


.icon-btn.active img {
    opacity: 1;
}

.highlight-number {
    font-size: 15px;
    font-weight: 700;
    color: #111827; /* darker for emphasis */
}
/* PAYWALL CARD */
.paywall-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    background: linear-gradient(145deg, #f9fafb, #f1f5f9);
    border: 2px dashed #d1d5db;

    min-height: 260px;
}

.paywall-inner {
    padding: 24px 20px;
}

.paywall-icon {
    width: 40px;
    margin-bottom: 12px;
    opacity: 0.85;
}

.paywall-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.paywall-card p {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 12px;
}

.icon-btn.flagged {
    opacity: 0.2;
    cursor: not-allowed;
}

.modal.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 999;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    position: relative;
    max-width: 420px;
    margin: 10% auto;
    background: white;
    padding: 24px;
    border-radius: 12px;
    z-index: 10;
    animation: fadeUp 0.2s ease;
}

.modal-content h2 {
    font-size: 18px;
    margin-bottom: 6px;
}

.modal-sub {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.modal-content label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.modal-content textarea {
    width: 100%;
    resize: none;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.btn-danger {
    background: #ef4444;
    color: white;
}
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    justify-content: space-between;
}

.toast.hidden {
    display: none;
}

.toast button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}
/* category writers page */
.writers-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.writers-toolbar .article-count {
    margin-bottom: 0;
}

.writers-search-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 10px;
}

.writers-search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--fg);
    width: 220px;
}

.writers-search-input::placeholder {
    color: var(--muted);
}

.writers-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.writers-search-clear img {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

.writer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.writer-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: box-shadow .15s ease, transform .15s ease;
}

.writer-card:hover {
    box-shadow: 0 4px 20px -4px hsl(213 56% 24% / .14);
    transform: translateY(-2px);
}

.writer-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.writer-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.writer-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 6px;
    word-break: break-word;
}

.writer-article-count {
    font-size: 13px;
    color: var(--muted);
}

.writer-bio {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* writer card as clickable link */
.writer-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.writer-card-link:hover .writer-card {
    box-shadow: 0 4px 20px -4px hsl(213 56% 24% / .14);
    transform: translateY(-2px);
}

.writer-card-link:hover {
    text-decoration: none;
}

/* writer profile bar on writer-articles page */
.writer-profile-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
}

.writer-profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* AI Overview shit */
.ai-overview-panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    background: var(--secondary);
    margin-bottom: 8px;
}
.ai-overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ai-overview-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-overview-title h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}
.ai-icon {
    font-size: 16px;
    color: var(--primary);
}
.ai-overview-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}
.ai-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ai-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--primary);
    color: #fff;
}
.ai-badge-muted {
    background: var(--border);
    color: var(--muted);
}
.ai-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
}
.ai-section h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 8px;
}
.ai-section p {
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}
.ai-section ul {
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}
.ai-loading {
    font-size: 13px;
    color: var(--muted);
    margin-top: 12px;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0 80px;
}

.page-btn {
    padding: 10px 14px;
    background: #f3f4f6; 
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: #374151; 
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}
.page-btn:not(.disabled):hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}
.page-info {
    padding: 10px 20px;
    background: #b6d47a;
    border-radius: 6px;
    font-weight: bold;
}
.page-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9fafb;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.page-input {
    width: 60px;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}
.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}
.tts-bar {
    display: flex;
    gap: 8px;
    margin: 12px 0 20px;
}

.tts-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Play button (primary) */
.tts-btn.play {
    background: #2563eb;
    color: white;
    border: none;
}

.tts-btn.play:hover {
    background: #1d4ed8;
}

/* Stop button (secondary) */
.tts-btn.stop {
    color: #374151;
}

.tts-btn.stop:hover {
    background: #f3f4f6;
}

/* Paragraph highlight */
.highlight-reading {
    background: #fff3cd;
    border-left: 4px solid #f59e0b;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.highlight-reading {
    background: #fff3cd;
    border-left: 4px solid #f59e0b;
    padding-left: 10px;
    transition: all 0.3s ease;
}


/* subscription shit */
.sub-status-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border: 1px solid var(--border);
    border-radius: 12px; background: var(--secondary); margin-bottom: 16px;
}
.sub-status-left { display: flex; align-items: center; gap: 16px; }
.sub-status-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: #dcfce7; color: #16a34a;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
}
.sub-badge { font-size: 12px; font-weight: 600; padding: 4px 12px;
    border-radius: 99px; border: 1px solid; }
.sub-badge.active { color: #16a34a; border-color: #16a34a; background: #dcfce7; }

.sub-details-card {
    padding: 24px; border: 2px solid var(--primary);
    border-radius: 12px; margin-bottom: 16px;
}
.sub-details-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.sub-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.sub-label { font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.sub-value { font-size: 15px; font-weight: 600; }
.btn-manage { display: inline-flex; align-items: center; gap: 6px; }

.sub-features-card {
    padding: 24px; border: 1px solid var(--border);
    border-radius: 12px; background: var(--secondary);
}
.sub-features-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.sub-features-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.sub-features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sub-feature-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sub-check { color: #16a34a; font-weight: 700; }

/* Free user upgrade card */
.sub-upgrade-card {
    max-width: 480px; margin: 0 auto;
    padding: 40px 36px; border: 1px solid var(--border);
    border-radius: 16px; background: var(--bg); text-align: center;
}
.sub-upgrade-card h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.sub-price-row { display: flex; align-items: baseline;
    justify-content: center; gap: 4px; margin-bottom: 8px; }
.sub-price-main { font-size: 48px; font-weight: 800; }
.sub-price-suffix { font-size: 14px; color: var(--muted); }
.sub-price-desc { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.sub-features-list { text-align: left; margin-bottom: 32px;
    display: flex; flex-direction: column; gap: 12px; }
.btn-upgrade { width: 100%; padding: 14px; font-size: 15px; font-weight: 600; }
