/* -------------------------- */
/*      Kajotte Studio        */
/* -------------------------- */
:root {
    --bg-color: #0d0d11;
    --glass-bg: rgba(18, 18, 24, 0.65);
    --glass-border: rgba(255, 255, 255, 0.06);
    --text-main: #f1f5f9;
    --text-muted: #64748b;
    --accent: #38bdf8;
    --error-color: #f87171;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 0%, #1e1b4b 0%, var(--bg-color) 75%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.7;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 40px 24px;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 10px 24px;
    margin-bottom: 50px;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.lang-btn {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--glass-border);
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: var(--accent);
    color: var(--bg-color);
    border-color: var(--accent);
}

header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: 2.4rem;
    font-weight: 300;
    letter-spacing: -0.03em;
    margin: 0 0 12px 0;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    box-sizing: border-box;
}

.intro-section h2 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-top: 0;
    color: var(--accent);
}

.intro-section p {
    font-size: 0.95rem;
    color: #cbd5e1;
}

.news-date {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    font-weight: 600;
}

.news-content {
    font-size: 1.05rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#status-message {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 30px 0;
}

#status-message.error-state {
    color: var(--error-color);
    font-style: normal;
}

footer {
    text-align: center;
    margin-top: 60px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.log-line {
    margin-bottom: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
}

.badge {
    font-weight: 700;
    margin-right: 8px;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.badge-new {
    color: #81d4f2;
}

.badge-upd {
    color: #eecf52;
}

.badge-fix {
    color: #52ee6f;
}

.newsletter-header {
    display: block;
    width: 100%;
    margin-bottom: 24px;
}

.newsletter-header .glass-card {
    width: 100%;
    margin: 0 0 20px 0;
    box-sizing: border-box;
}

.newsletter-header .glass-card:last-child {
    margin-bottom: 0;
}

.legend-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.legend-sections-wrapper {
    display: block;
}

.legend-section {
    margin-bottom: 15px;
}

.legend-section:last-child {
    margin-bottom: 0;
}

.legend-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    opacity: 0.8;
}

.legend-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.legend-section li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.legend-section .badge {
    display: inline-block;
    min-width: 50px;
    text-align: center;
    margin-right: 8px;
    font-family: monospace;
}

.archive-link {
    display: inline-block;
    font-size: 0.85rem;
    font-family: monospace;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.archive-link:hover {
    color: var(--primary-color, #0099ff);
    border-bottom-color: var(--primary-color, #0099ff);
}

.archive-link-wrapper {
    margin: 10px 0 25px 0;
    text-align: right;
}

@media (min-width: 768px) {
    .newsletter-header {
        display: table;
        table-layout: fixed;
        border-spacing: 20px 0;
        margin-left: -20px;
        width: calc(100% + 40px);
    }

    .newsletter-header .glass-card {
        display: table-cell;
        vertical-align: top;
        width: 50%;
        margin: 0;
    }
    
    .legend-sections-wrapper {
        display: table;
        width: 100%;
    }
    
    .legend-section {
        display: table-cell;
        width: 50%;
        vertical-align: top;
        margin-bottom: 0;
    }
}

@media (max-width: 600px) {
    .main-nav {
        flex-direction: column;
        gap: 20px;
        padding: 20px 16px;
        border-radius: 16px;
        margin-bottom: 35px;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        width: 100%;
    }

    .nav-links a {
        font-size: 1rem;
        width: 100%;
        text-align: center;
        padding: 4px 0;
    }

    .lang-switch {
        width: 100%;
        text-align: center;
        margin-top: 5px;
        border-top: 1px solid var(--glass-border);
        padding-top: 15px;
    }

    .lang-btn {
        display: inline-block;
        padding: 6px 20px;
        font-size: 0.9rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 0.95rem;
        padding: 0 10px;
    }
}