body {
    font-family: var(--font-main);
    display: flex;
    flex-direction: column;
    overflow-x: clip;
}

.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 14px 44px rgba(31, 20, 40, 0.06),
        inset 0 1px 1px 0 var(--glass-highlight);
}

.glass-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(31, 20, 40, 0.06);
}

.editorial-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.75rem;
    isolation: isolate;
    background: var(--glass-bg);
    border: 1px solid var(--glass-bg-strong);
    box-shadow: 0 14px 44px rgba(31, 20, 40, 0.06);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
        border-color 0.35s ease;
}

.editorial-card > * {
    position: relative;
    z-index: 1;
}

.editorial-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 26px 56px rgba(31, 20, 40, 0.1);
}

.editorial-meta {
    color: var(--color-faint);
    letter-spacing: 0.16em;
}

.editorial-title {
    color: var(--color-dark);
}

.group:hover .editorial-title {
    color: var(--accent-dark);
}

.editorial-description {
    color: var(--color-muted);
    max-width: 42rem;
}

.grainy-placeholder {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-bg-strong);
    border-radius: 1.25rem;
}

.nav-topic {
    padding: 6px 12px;
    border-radius: 100px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.nav-topic:hover {
    color: var(--color-dark);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-panel {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-bg-strong);
    box-shadow: 0 14px 44px rgba(31, 20, 40, 0.06);
}

.sidebar-panel-muted {
    background: rgba(250, 250, 249, 0.55);
}

main {
    z-index: 10;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    background-color: #10b981;
    animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.tg-post {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tg-post:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    transform: translateY(-3px);
}

#search-modal {
    display: none;
    opacity: 0;
    background: rgba(244, 236, 246, 0.7);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#search-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#search-modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.tag-pill {
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
}

.tag-pill:hover {
    color: var(--color-dark);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.tag-pill.active {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px oklch(0.7 0.16 40 / 0.3);
}

.hashtag-link {
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hashtag-link:hover {
    color: var(--color-dark);
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.04);
}

input::placeholder {
    color: rgba(0, 0, 0, 0.25) !important;
}

.editorial-container {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 70px rgba(31, 20, 40, 0.06);
}

.article-body {
    color: var(--color-muted);
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h1,
.article-body h2,
.article-body h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: var(--color-dark);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.article-body h1 {
    font-size: 2.25rem;
}

.article-body h2 {
    font-size: 1.75rem;
}

.article-body h3 {
    font-size: 1.5rem;
}

.article-body ul {
    margin-bottom: 1.5rem;
    margin-left: 1.5rem;
    list-style-type: disc;
}

.article-body ol {
    margin-bottom: 1.5rem;
    margin-left: 1.5rem;
    list-style-type: decimal;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body img {
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.article-body code {
    padding: 0.2rem 0.4rem;
    color: var(--color-muted);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.article-body pre {
    overflow-x: auto;
    margin: 2rem 0;
    padding: 1.5rem;
    color: var(--color-dark) !important;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 1.5rem;
    font-family: var(--font-mono);
}

.article-body pre code {
    padding: 0;
    color: inherit;
    background: transparent;
    border: none;
    box-shadow: none;
}

.article-body blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    color: var(--color-faint);
    font-style: italic;
    background: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 4px solid var(--accent);
    border-radius: 0 1rem 1rem 0;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.article-tags-inline {
    align-items: center;
}

.article-tags-block {
    align-items: flex-start;
}

.article-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    color: var(--accent-soft);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.article-tag:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.92);
}

.article-tag-loading {
    color: var(--color-subtle);
}

.article-tags-plain .article-tag {
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    color: var(--accent-soft);
    font-size: 0.75rem;
}

.article-tags-plain .article-tag:hover {
    transform: none;
    background: none;
    text-decoration: underline;
}

.legal-body p {
    margin-bottom: 1.25rem;
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.legal-body h2 {
    margin: 2.5rem 0 1rem;
    color: var(--color-subtle);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.EasyMDEContainer .CodeMirror {
    min-height: 500px;
    padding: 30px;
    color: var(--color-dark);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.7;
}

.editor-toolbar {
    padding: 10px 30px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.editor-toolbar button {
    color: var(--color-dark) !important;
    opacity: 0.7;
    transition: all 0.2s;
}

.editor-toolbar button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 8px;
}

.tag-badge {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 4px 10px;
    color: var(--accent-soft);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 99px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.progress-bar-fill {
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.notification-item {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

#progress-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    height: 3px;
    background: transparent;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px oklch(0.7 0.16 40 / 0.5);
    transition: width 0.1s ease;
}
