:root {
    --bg: #0a0a0f;
    --bg2: #12121a;
    --bg3: #1a1a2e;
    --surface: #1e1e32;
    --surface2: #2a2a45;
    --text: #e8e6e3;
    --text2: #a8a6a3;
    --text3: #6a6865;
    --accent: #f0c040;
    --accent2: #d4a020;
    --accent3: #8a6010;
    --border: #2a2a45;
    --shadow: rgba(0,0,0,.5);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: .3s cubic-bezier(.4,0,.2,1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: #fff; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* bg pattern */
body::before {
    content: ''; position: fixed; inset: 0; z-index: -1;
    background-image: radial-gradient(ellipse at 20% 50%, rgba(240,192,64,.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(240,192,64,.02) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(100,60,200,.03) 0%, transparent 50%);
}

/* Loading overlay */
.loading-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .6s ease;
}
.loading-overlay.show { opacity: 1; }
.loading-overlay__content { text-align: center; }
.loading-skull {
    font-size: 72px;
    display: inline-block;
    animation: skullBounce .8s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 30px rgba(240,192,64,.3));
}
@keyframes skullBounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-12px) scale(1.05); }
}
.loading-phrase {
    color: var(--accent);
    font-size: 14px;
    margin-top: 24px;
    opacity: .8;
    animation: phraseFade 2s ease-in-out infinite;
}
@keyframes phraseFade {
    0%, 100% { opacity: .5; }
    50% { opacity: 1; }
}

/* Ticker */
.ticker {
    background: linear-gradient(90deg, #1a0000, #2d0000);
    color: #ff6666;
    display: flex;
    align-items: center;
    height: 36px;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,0,0,.15);
    position: relative;
}
.ticker::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--bg) 0%, transparent 5%, transparent 95%, var(--bg) 100%);
    pointer-events: none;
    z-index: 1;
}
.ticker__label {
    background: linear-gradient(135deg, #cc0000, #ff2200);
    color: #fff;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.ticker__wrap { overflow: hidden; flex: 1; position: relative; height: 100%; }
.ticker__text {
    display: flex;
    white-space: nowrap;
    position: absolute;
    height: 100%;
    align-items: center;
    animation: tickerScroll 50s linear infinite;
    will-change: transform;
}
.ticker__text span { padding: 0 50px; }
.ticker__text span::before { content: "✦"; margin-right: 16px; color: #ff4444; }
@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Header */
.header {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.header::after {
    content: '';
    position: absolute; bottom: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.header__top {
    background: rgba(0,0,0,.2);
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.header__top .container { display: flex; justify-content: space-between; align-items: center; }
.header__date { color: var(--text3); }
.header__lang { display: flex; gap: 2px; }
.header__lang a {
    color: var(--text3);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: var(--transition);
}
.header__lang a.active { color: var(--accent); background: rgba(240,192,64,.1); }
.header__lang a:hover { color: var(--accent); background: rgba(240,192,64,.08); }
.header__main { padding: 28px 0 24px; text-align: center; }
.header__logo { display: inline-block; position: relative; }
.header__logo h1 {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    position: relative;
}
.header__logo h1::before { content: "☠ "; font-size: 36px; -webkit-text-fill-color: initial; color: var(--accent); }
.header__logo h1::after { content: " ☠"; font-size: 36px; -webkit-text-fill-color: initial; color: var(--accent); }
@supports not (background-clip: text) {
    .header__logo h1 { color: var(--text); }
    .header__logo h1::before, .header__logo h1::after { color: var(--accent); }
}
.header__tagline {
    display: block;
    font-size: 12px;
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-top: 8px;
    opacity: .7;
}
.header__nav {
    background: rgba(0,0,0,.3);
    border-top: 1px solid rgba(255,255,255,.04);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.header__nav .container { display: flex; justify-content: center; align-items: center; position: relative; }
.nav-menu { display: flex; gap: 0; }
.nav-menu li a {
    display: block;
    padding: 14px 22px;
    color: var(--text2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    position: relative;
    transition: var(--transition);
}
.nav-menu li a::after {
    content: '';
    position: absolute; bottom: 0; left: 50%; right: 50%;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}
.nav-menu li a:hover { color: #fff; background: rgba(255,255,255,.02); }
.nav-menu li a:hover::after { left: 20%; right: 20%; }
.nav-toggle, .search-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text2);
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    transition: var(--transition);
}
.nav-toggle:hover, .search-toggle:hover { color: var(--accent); }
.search-bar {
    display: none;
    background: rgba(0,0,0,.3);
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
    backdrop-filter: blur(10px);
}
.search-bar.open { display: block; animation: slideDown .3s ease; }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.search-bar form { display: flex; gap: 10px; }
.search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    outline: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.search-bar input:focus { border-color: var(--accent); box-shadow: 0 0 20px rgba(240,192,64,.1); }
.search-bar button {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--bg);
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.search-bar button:hover { transform: scale(1.03); box-shadow: 0 4px 15px rgba(240,192,64,.3); }

/* Main layout */
.main { padding: 40px 0; min-height: 60vh; }
.main__grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; }

/* Posts grid */
.archive__header { margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.archive__header h1 {
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.archive__header p { color: var(--text2); margin-top: 8px; }
.posts-grid { display: flex; flex-direction: column; gap: 24px; }
.post-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}
.post-card::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(240,192,64,.05), transparent);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}
.post-card:hover {
    border-color: var(--accent3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 30px rgba(240,192,64,.05);
}
.post-card:hover::before { opacity: 1; }
.post-card__image {
    overflow: hidden;
    position: relative;
}
.post-card__image::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to right, transparent 50%, var(--surface) 100%);
    pointer-events: none;
}
.post-card__image img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    transition: transform .5s ease;
}
.post-card:hover .post-card__image img { transform: scale(1.08); }
.post-card__body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.post-card__meta {
    font-size: 11px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-weight: 600;
}
.post-card__title { font-size: 22px; line-height: 1.3; margin-bottom: 10px; }
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--accent); }
.post-card__excerpt { color: var(--text2); font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
.post-card__readmore {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.post-card__readmore:hover { gap: 12px; color: #fff; }

/* Single post */
.single-post {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    animation: fadeIn .5s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.single-post__header { margin-bottom: 32px; text-align: center; }
.single-post__category {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--bg);
    padding: 4px 16px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-weight: 700;
}
.single-post__category a { color: var(--bg); }
.single-post__category a:hover { color: #000; }
.single-post__title {
    font-size: 36px;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.single-post__meta { font-size: 13px; color: var(--text3); }
.single-post__meta .separator { margin: 0 8px; opacity: .4; }
.single-post__featured { margin-bottom: 32px; border-radius: var(--radius-sm); overflow: hidden; }
.single-post__featured img { width: 100%; max-height: 500px; object-fit: cover; }
.single-post__content { font-size: 17px; line-height: 1.8; color: var(--text2); }
.single-post__content p { margin-bottom: 1.5em; }
.single-post__content h1, .single-post__content h2, .single-post__content h3 { color: var(--text); }
.single-post__content h2 { font-size: 26px; margin: 40px 0 16px; letter-spacing: -1px; }
.single-post__content h3 { font-size: 20px; margin: 30px 0 12px; }
.single-post__content blockquote {
    border-left: 3px solid var(--accent);
    padding: 16px 24px;
    margin: 24px 0;
    background: rgba(240,192,64,.04);
    font-style: italic;
    color: var(--text2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.single-post__content ul, .single-post__content ol { margin: 20px 0; padding-left: 24px; }
.single-post__content li { margin-bottom: 8px; }
.single-post__content ul li { list-style: disc; }
.single-post__content ol li { list-style: decimal; }
.single-post__content code {
    background: var(--bg3);
    padding: 2px 8px;
    font-size: 14px;
    border-radius: 4px;
    color: var(--accent);
}
.single-post__content pre {
    background: var(--bg3);
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 13px;
    line-height: 1.5;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.single-post__content pre code { background: none; border: none; padding: 0; color: inherit; }
.single-post__content img { margin: 24px 0; border-radius: var(--radius-sm); }
.single-post__footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.single-post__tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.single-post__tags span { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.single-post__tags a {
    background: var(--bg3);
    padding: 4px 12px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text2);
    transition: var(--transition);
}
.single-post__tags a:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* Related posts */
.related-posts { margin-top: 50px; }
.related-posts__title {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text3);
    font-weight: 600;
}
.posts-grid--related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card--small {
    grid-template-columns: 1fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.post-card--small:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.post-card--small .post-card__image { height: 160px; }
.post-card--small .post-card__image img { min-height: 160px; height: 100%; }
.post-card--small .post-card__image::after { display: none; }
.post-card--small .post-card__body { padding: 16px; }
.post-card--small h3 { font-size: 15px; line-height: 1.4; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.pagination a {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text2);
    transition: var(--transition);
}
.pagination a:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.pagination__info { font-size: 13px; color: var(--text3); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.widget__title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--text3);
}
.widget__posts { display: flex; flex-direction: column; gap: 12px; }
.widget__posts li a {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.widget__posts li a:hover { background: rgba(255,255,255,.03); }
.widget__posts li a img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.widget__posts li a span {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--text);
}
.widget__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.widget__tags a {
    background: var(--bg3);
    padding: 4px 10px;
    font-size: 11px;
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text2);
    transition: var(--transition);
    font-weight: 500;
}
.widget__tags a:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* Footer */
.footer {
    background: var(--bg2);
    color: var(--text3);
    padding: 50px 0 0;
    margin-top: 50px;
    border-top: 1px solid var(--border);
    position: relative;
}
.footer::before {
    content: '';
    position: absolute; top: -2px; left: 15%; right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer h4 {
    color: var(--text);
    font-size: 14px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}
.footer p { font-size: 13px; line-height: 1.6; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { color: var(--text3); font-size: 13px; }
.footer ul li a:hover { color: var(--accent); }
.footer__quote {
    font-size: 13px;
    line-height: 1.6;
    color: var(--accent);
    font-style: italic;
    border-left: 2px solid rgba(240,192,64,.2);
    padding-left: 16px;
    margin: 0;
}
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,.04);
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    color: var(--text3);
}

/* Error page */
.error-page { text-align: center; padding: 80px 20px; animation: fadeIn .5s ease; }
.error-page h1 {
    font-size: 80px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -3px;
}
.error-page__desc {
    font-size: 18px;
    color: var(--text2);
    margin: 20px auto 30px;
    font-style: italic;
    line-height: 1.6;
    max-width: 500px;
}
.error-page .btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--bg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.error-page .btn:hover { transform: scale(1.05); box-shadow: 0 8px 25px rgba(240,192,64,.3); color: var(--bg); }

/* No posts */
.no-posts { text-align: center; padding: 60px 20px; color: var(--text3); font-style: italic; font-size: 18px; }

/* Scroll reveal (JS handles the transition) */
.post-card, .widget, .single-post {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .5s ease, transform .5s ease, box-shadow .3s ease, border-color .3s ease;
}
.post-card.revealed, .widget.revealed, .single-post.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .main__grid { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .header__logo h1 { font-size: 32px; }
    .header__logo h1::before, .header__logo h1::after { font-size: 24px; }
    .header__main { padding: 20px 0; }
    .header__tagline { letter-spacing: 3px; font-size: 10px; }
    .nav-menu { display: none; flex-direction: column; width: 100%; background: var(--bg2); position: absolute; top: 100%; left: 0; border-bottom: 1px solid var(--border); }
    .nav-menu.open { display: flex; }
    .nav-menu li a { padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,.04); }
    .nav-menu li a::after { display: none; }
    .nav-toggle { display: block; }
    .search-toggle { display: block; }
    .header__nav .container { justify-content: space-between; }
    .post-card { grid-template-columns: 1fr; }
    .post-card__body { padding: 20px; }
    .post-card__image img { height: 200px; min-height: auto; }
    .post-card__image::after { background: linear-gradient(to bottom, transparent 50%, var(--surface) 100%); }
    .single-post { padding: 24px; }
    .single-post__title { font-size: 26px; }
    .posts-grid--related { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .pagination { flex-direction: column; gap: 8px; }
}
@media (max-width: 480px) {
    .header__logo h1 { font-size: 24px; }
    .header__logo h1::before, .header__logo h1::after { font-size: 18px; }
    .header__top .container { flex-direction: column; gap: 4px; }
    .container { padding: 0 16px; }
}
