:root {
    --primary-color: #ff4fd8;
    --hover-color: #7cf8ff;
    --text-color: #f5eaff;
    --bg-color: #090312;
    --header-bg: #160824;
    --link-color: #ff89f1;
    --font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    --card: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.18);
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.8;
    max-width: 980px;
    margin: 0 auto;
    padding: 36px 18px 70px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 15%, rgba(255, 79, 216, 0.35), transparent 40%),
        radial-gradient(circle at 88% 8%, rgba(124, 248, 255, 0.3), transparent 35%),
        radial-gradient(circle at 50% 110%, rgba(186, 91, 255, 0.28), transparent 45%),
        linear-gradient(160deg, #07030f, #12061f 55%, #1b0a30 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

header,
main,
.site-footer {
    width: 100%;
}

header {
    position: relative;
    margin-bottom: 26px;
    padding: 28px;
    border-radius: 22px;
    border: 1px solid var(--card-border);
    background: linear-gradient(130deg, rgba(37, 12, 56, 0.9), rgba(15, 17, 59, 0.72));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45), inset 0 0 60px rgba(255, 79, 216, 0.15);
    overflow: hidden;
}

header::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -150px;
    top: -180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 248, 255, 0.38), transparent 72%);
}

header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

header h1 a {
    color: #fff;
    text-decoration: none;
    text-shadow: 0 0 12px rgba(255, 137, 241, 0.72);
}

header p {
    margin-top: 8px;
    opacity: 0.85;
    color: #e2c8ff;
    position: relative;
    z-index: 1;
}

header nav {
    margin-top: 14px;
    position: relative;
    z-index: 1;
}

header nav a {
    color: var(--hover-color);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(124, 248, 255, 0.45);
}

main {
    display: grid;
    gap: 18px;
}

.post {
    padding: 24px 24px;
    border-radius: 18px;
    border: 1px solid var(--card-border);
    background: var(--card);
    backdrop-filter: blur(9px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: floatIn 0.7s ease both;
}

.post:hover {
    transform: translateY(-5px);
    border-color: rgba(124, 248, 255, 0.52);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.42), 0 0 22px rgba(255, 79, 216, 0.3);
}

.post h2 {
    margin-bottom: 10px;
    font-size: clamp(1.25rem, 2.2vw, 1.8rem);
    line-height: 1.28;
}

.post h2 a {
    text-decoration: none;
    color: #fff;
    background: linear-gradient(90deg, #fff, #ffbff6 55%, #9bf6ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #c6b2dd;
}

.meta span::before {
    content: "✦";
    margin-right: 6px;
    color: var(--hover-color);
}

.excerpt {
    color: #eee3ff;
    opacity: 0.93;
}

.pagination {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination a {
    text-decoration: none;
    color: #ffd4fa;
    border: 1px solid rgba(255,255,255,0.32);
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.08);
    transition: all 0.2s ease;
}

.pagination a:hover,
.pagination a.active {
    color: #1e0935;
    background: linear-gradient(90deg, #ff8bf3, #9ef9ff);
    border-color: transparent;
}

.article-title {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.2;
    margin-bottom: 14px;
    color: #fff;
    text-shadow: 0 0 14px rgba(255, 137, 241, 0.65);
}

.content {
    padding: 22px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    box-shadow: inset 0 0 40px rgba(124, 248, 255, 0.08);
}

.content h1,
.content h2,
.content h3 {
    margin: 22px 0 12px;
    color: #ffc9f9;
}

.content p { margin-bottom: 14px; }

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 9999;
}

.reading-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ff79ef, #7cf8ff);
}

.article-disclaimer,
.article-nav .nav-link,
.related-item {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.article-disclaimer {
    margin-top: 18px;
    padding: 14px 16px;
}

.article-nav {
    margin-top: 18px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.article-nav .nav-link {
    text-decoration: none;
    color: #f4eaff;
    padding: 12px 14px;
}

.article-nav .nav-link span {
    display: block;
    font-size: 0.82rem;
    opacity: 0.78;
}

.article-nav .nav-link strong {
    display: block;
    margin-top: 4px;
    line-height: 1.35;
}

.related-posts {
    margin-top: 20px;
}

.related-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-item {
    padding: 12px;
}

.related-item h4 a {
    color: #fff;
    text-decoration: none;
}

.related-item p {
    margin-top: 6px;
    margin-bottom: 0;
    font-size: 0.92rem;
    color: #eadcff;
}

.site-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: #c7b0e5;
}

.site-footer nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.site-footer a {
    color: var(--hover-color);
    text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.hero,
.social-proof,
.category-nav,
.featured-picks,
.reading-history,
.story-feed-header,
.faq-seo {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.08);
}

.hero-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-btn {
    text-decoration: none;
    color: #f6e6ff;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 999px;
    padding: 6px 12px;
}
.hero-btn.primary {
    color: #25053f;
    border-color: transparent;
    background: linear-gradient(90deg, #ff8bf3, #9ef9ff);
}

.social-proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.social-proof strong { font-size: 1.35rem; display: block; }
.social-proof span { opacity: 0.8; font-size: 0.88rem; }

.category-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.category-pill {
    border: 1px solid rgba(255,255,255,0.25);
    color: #f4e7ff;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 5px 11px;
    cursor: pointer;
}
.category-pill.active {
    color: #1e0935;
    border-color: transparent;
    background: linear-gradient(90deg, #ff8bf3, #9ef9ff);
}

.featured-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.featured-item {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.08);
}
.featured-item h4 a { color: #fff; text-decoration: none; }
.featured-item p { margin-top: 6px; margin-bottom: 0; color: #eadcff; font-size: 0.92rem; }

.story-feed-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.story-search {
    min-width: 220px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 999px;
    padding: 8px 12px;
}

#reading-history-list { display: grid; gap: 8px; }
.history-item {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 10px 11px;
    background: rgba(255,255,255,0.08);
}
.history-item h4 a { color: #fff; text-decoration: none; }
.history-empty { opacity: 0.72; }
.faq-seo details + details { margin-top: 8px; }

@keyframes floatIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    body { padding: 16px 12px 52px; }
    header { padding: 20px 16px; border-radius: 16px; }
    .post, .content { padding: 16px; border-radius: 14px; }
    .excerpt, .content { font-size: 0.98rem; }
}
