@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --max-width: 1100px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
}


[data-theme="light"] {
    --bg-primary: #f5f6fa;
    --bg-secondary: #ffffff;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --bg-hover: #f0f2f7;
    --text-primary: #1a1d2e;
    --text-secondary: #5a6178;
    --text-tertiary: #8e94a9;
    --text-link: #4361ee;
    --border-color: #e4e7f0;
    --border-light: #eef0f6;
    --accent: #4361ee;
    --accent-hover: #3651d4;
    --accent-light: rgba(67, 97, 238, 0.08);
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
    --teaser-bg: #ffffff;
    --teaser-border: #e8eaf0;
    --teaser-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --teaser-shadow-hover: 0 8px 24px rgba(67, 97, 238, 0.12);
    --header-bg: rgba(255, 255, 255, 0.85);
    --header-border: #e4e7f0;
    --badge-bg: rgba(67, 97, 238, 0.1);
    --badge-text: #4361ee;
    --toggle-bg: #e4e7f0;
    --toggle-dot: #ffffff;
    --scrollbar-track: #f0f0f0;
    --scrollbar-thumb: #c5c5c5;
}

[data-theme="dark"] {
    --bg-primary: #0f1117;
    --bg-secondary: #161925;
    --bg-surface: #1c1f2e;
    --bg-elevated: #232738;
    --bg-hover: #282d42;
    --text-primary: #e8eaf4;
    --text-secondary: #9ca3bf;
    --text-tertiary: #6b7394;
    --text-link: #6c8cff;
    --border-color: #2a2f45;
    --border-light: #232738;
    --accent: #6c8cff;
    --accent-hover: #5a7aff;
    --accent-light: rgba(108, 140, 255, 0.1);
    --danger: #f87171;
    --success: #34d399;
    --warning: #fbbf24;
    --info: #60a5fa;
    --teaser-bg: #1c1f2e;
    --teaser-border: #2a2f45;
    --teaser-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    --teaser-shadow-hover: 0 8px 24px rgba(108, 140, 255, 0.15);
    --header-bg: rgba(15, 17, 23, 0.9);
    --header-border: #2a2f45;
    --badge-bg: rgba(108, 140, 255, 0.12);
    --badge-text: #6c8cff;
    --toggle-bg: #2a2f45;
    --toggle-dot: #6c8cff;
    --scrollbar-track: #161925;
    --scrollbar-thumb: #2a2f45;
}


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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    transition: background-color var(--transition), color var(--transition);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}


::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

.layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    padding: 24px 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--header-border);
    transition: background var(--transition), border-color var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--toggle-bg);
    border-radius: 14px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    padding: 3px;
}

.theme-toggle::after {
    content: '';
    width: 22px;
    height: 22px;
    background: var(--toggle-dot);
    border-radius: 50%;
    transition: transform var(--transition), background var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .theme-toggle::after {
    transform: translateX(24px);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: opacity var(--transition);
}

.theme-toggle .icon-sun {
    left: 7px;
    opacity: 1;
}

.theme-toggle .icon-moon {
    right: 7px;
    opacity: 0.4;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    opacity: 0.4;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    opacity: 1;
}


.mini-teasers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 1px;
}

.mini-teasers .teaser-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    padding-right: 12px;
    gap: 12px;
    box-shadow: none;
    border: 1px solid var(--border-light);
    margin-bottom: 1px;
}

.mini-teasers .teaser-media {
    width: 100px;
    min-width: 100px;
    height: 80px;
}

.mini-teasers .teaser-media img,
.mini-teasers .teaser-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.mini-teasers .teaser-body {
    padding: 8px 0;
}

.mini-teasers .teaser-title {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    -webkit-line-clamp: 3;
}

.mini-teasers .teaser-time {
    font-size: 11px;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .mini-teasers {
        grid-template-columns: 1fr;
    }
}


.news-article {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: border-color var(--transition), background var(--transition);
    margin-bottom: 32px;

}

.news-hero {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    cursor: pointer;
}

.news-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-hero:hover img {
    transform: scale(1.05);
}

.news-body {
    padding: 24px;
}

.news-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: color var(--transition);
}

.news-title:hover {
    color: var(--accent);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-tertiary);
    font-size: 13px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.news-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-meta-item svg {
    width: 14px;
    height: 14px;
}

.meta-views {
    color: var(--danger);
}

.news-content {
    display: none;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    animation: fadeIn 0.3s ease;
}

.news-content.visible {
    display: block;
}

.news-content p {
    margin-bottom: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.teaser-card {
    display: block;
    background: var(--teaser-bg);
    border: 1px solid var(--teaser-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    box-shadow: var(--teaser-shadow);
    cursor: pointer;
    margin-bottom: 20px;
}

.teaser-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--teaser-shadow-hover);
    border-color: var(--accent);
}

.teaser-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
    background: var(--bg-hover);
}

.teaser-media img,
.teaser-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.teaser-card:hover .teaser-media img,
.teaser-card:hover .teaser-media video {
    transform: scale(1.06);
}

.teaser-no-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    background: var(--bg-hover);
}

.teaser-body {
    padding: 14px 16px;
}

.teaser-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}

.teaser-card:hover .teaser-title {
    color: var(--accent);
}

.teaser-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 10px;
}

.teaser-time svg {
    flex-shrink: 0;
}


.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar .teaser-card {
    width: 100%;
}

@media (max-width: 900px) {
    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

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


.article-teaser {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin: 20px 0;
    transition: background var(--transition);
}

.article-teaser:hover {
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    padding-left: 12px;
    padding-right: 12px;
}

.article-teaser .teaser-media {
    width: 120px;
    min-width: 120px;
    height: 100px;
    border-radius: var(--radius-sm);
}

.article-teaser .teaser-title {
    font-size: 16px;
    font-weight: 600;
    -webkit-line-clamp: 3;
}


.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    margin-top: 40px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
    transition: border-color var(--transition);
}


.teaser-card {
    animation: slideUp 0.4s ease both;
}

.teaser-card:nth-child(1) {
    animation-delay: 0s;
}

.teaser-card:nth-child(2) {
    animation-delay: 0.05s;
}

.teaser-card:nth-child(3) {
    animation-delay: 0.1s;
}

.teaser-card:nth-child(4) {
    animation-delay: 0.15s;
}

.teaser-card:nth-child(5) {
    animation-delay: 0.2s;
}

.teaser-card:nth-child(6) {
    animation-delay: 0.25s;
}

.teaser-card:nth-child(7) {
    animation-delay: 0.3s;
}

.teaser-card:nth-child(8) {
    animation-delay: 0.35s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--badge-bg);
    color: var(--badge-text);
}

.notif-overlay {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.notif-overlay.visible {
    opacity: 1;
    transform: translateX(0);
}

.notif-card {
    width: 340px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.notif-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 0;
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.notif-app {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notif-body {
    padding: 12px 16px;
}

.notif-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.notif-msg {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.notif-actions {
    display: flex;
    border-top: 1px solid var(--border-color);
}

.notif-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-family);
    transition: background var(--transition);
}

.notif-btn:hover {
    background: var(--bg-hover);
}

.notif-btn-primary {
    color: var(--accent);
}

.notif-btn-dismiss {
    color: var(--text-tertiary);
    border-left: 1px solid var(--border-color);
}

@media (max-width: 500px) {
    .notif-overlay {
        right: 10px;
        left: 10px;
        top: 10px;
    }

    .notif-card {
        width: 100%;
    }
}