/* CSS Variables */
:root {
    --color-link: #ffffff;
    --color-link-hover: #f5c542;
    --color-link-opacity: 0.65;
    --color-link-underline: #444444;
    --color-link-underline-hover: #f5c542;
}

/* Roboto Flex Font */
@font-face {
    font-family: 'Roboto Flex';
    src: url('fonts/Roboto_Flex/roboto-flex-cyrillic-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Roboto Flex';
    src: url('fonts/Roboto_Flex/roboto-flex-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

a {
    color: var(--color-link);
    opacity: var(--color-link-opacity);
    text-decoration: underline;
    text-decoration-color: var(--color-link-underline);
    text-underline-offset: 3px;
    transition: opacity 0.2s, color 0.2s, text-decoration-color 0.2s;
}
a:hover {
    color: var(--color-link-hover);
    opacity: 1;
    text-decoration-color: var(--color-link-underline-hover);
}

.wrapper {
    display: flex;
    max-width: 1400px;
    padding: 40px 20px;
    gap: 30px;
}

.left-column { flex-shrink: 0; }
.container { max-width: 560px; }

.left-column .section-title {
    margin-left: 68px;
}

/* ---- Новости ---- */
.news-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0 20px;
    margin-bottom: 0;
}

.news-number {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    letter-spacing: 1px;
    padding-top: 0;
    text-align: right;
    user-select: none;
}

.news-body {
    padding-bottom: 28px;
    border-bottom: 1px solid #222;
}

.news-item:last-child .news-body {
    border-bottom: none;
}

.news-item + .news-item .news-body {
    padding-top: 28px;
}

.news-item + .news-item .news-number {
    padding-top: 28px;
}

.news-source {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.source-link {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    opacity: 0.35;
    color: #ffffff;
    transition: opacity 0.2s, color 0.2s;
}

.source-link:hover {
    opacity: 1;
    color: var(--color-link-hover);
    text-decoration: none;
}

.title {
    font-family: 'Roboto Flex', sans-serif;
    font-size: 21px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 10px;
}

.summary {
    font-size: 15px;
    color: #888;
    line-height: 1.5;
}

.sidebar {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title {
    font-family: 'Roboto Flex', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #ffffff;
    opacity: 0.35;
    margin-bottom: 32px;
    text-transform: uppercase;
}

.left-column .container {
    margin-left: 0px;
    padding-top: 16px;
}

.island {
    background-color: #1E1E1E;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

/* ---- Модели ---- */
.model-list { list-style: none; }

.model-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 15px;
    padding: 9px 0;
}

.model-list a {
    font-size: 15px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-downloads {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}
.model-downloads::before { content: '▲ '; color: #444; }

.model-list .badge {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 12px;
    color: #888;
}

/* ---- GitHub ---- */
.github-list { display: flex; flex-direction: column; }

.github-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    padding: 11px 0;
    border-bottom: 1px solid #2a2a2a;
}
.github-item:last-child { border-bottom: none; padding-bottom: 0; }

.github-name {
    font-size: 15px;
    font-weight: 500;
    grid-column: 1;
    grid-row: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.github-meta {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.github-meta .badge {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 12px;
    color: #888;
}

.github-stars {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
}
.github-stars::before { content: '★ '; color: #444; }

.github-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 3px;
    font-size: 14px;
    color: #888;
    line-height: 1.4;
}

/* ---- Toggle ---- */
.toggle-switch {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.toggle-btn {
    flex: 1;
    padding: 7px 14px;
    border: none;
    border-radius: 20px;
    background-color: #2a2a2a;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.toggle-btn.active {
    color: #ffffff;
    outline: 1px solid #444;
}
.toggle-btn:hover:not(.active) {
    background-color: #333;
    color: #aaa;
}

/* ---- Product Hunt ---- */
.producthunt-list { display: flex; flex-direction: column; }

.product-item {
    display: flex;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #2a2a2a;
}
.product-item:last-child { border-bottom: none; padding-bottom: 0; }

.product-thumb {
    width: 39px;
    height: 39px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

.product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.product-name { font-size: 15px; font-weight: 500; }

.product-votes {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.product-votes::before { content: '▲ '; color: #444; }

.product-tagline {
    font-size: 14px;
    color: #888;
    line-height: 1.4;
}

/* ---- Сериалы ---- */
.tvshows-list { display: flex; flex-direction: column; }

.tvshow-item {
    display: flex;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #2a2a2a;
}
.tvshow-item:last-child { border-bottom: none; padding-bottom: 0; }

.tvshow-poster {
    width: 51px;
    height: 76px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.tvshow-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tvshow-name { font-size: 15px; font-weight: 500; line-height: 1.3; }

.tvshow-date {
    display: block;
    color: #666;
    font-size: 14px;
}

.tvshow-overview {
    font-size: 14px;
    color: #888;
    line-height: 1.4;
}

/* ---- HmHm Info ---- */
.hmhm-info-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hmhm-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.hmhm-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.hmhm-title {
    font-family: 'Roboto Flex', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.3;
}

.hmhm-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hmhm-block1 {
    font-size: 14px;
    color: #888;
    line-height: 1.5;
    text-align: center;
}

.hmhm-link {
    font-size: 14px;
    color: #888;
    text-align: center;
    opacity: 0.65;
}

.hmhm-link:hover {
    color: var(--color-link-hover);
    opacity: 1;
}

/* ---- HmHm Articles ---- */
.hmhm-articles-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hmhm-articles-list {
    display: flex;
    flex-direction: column;
}

.hmhm-article-link {
    font-size: 14px;
    color: #888;
    line-height: 1.4;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
    text-decoration: none;
    opacity: 0.65;
    transition: opacity 0.2s, color 0.2s;
}

.hmhm-article-link:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hmhm-article-link:hover {
    color: var(--color-link-hover);
    opacity: 1;
}

/* Responsive */
@media (max-width: 1400px) {
    .wrapper {
        flex-wrap: wrap;
    }

    .tvshows-column {
        order: 3;
        min-width: 100%;
    }
}

@media (max-width: 1100px) {
    .wrapper {
        flex-wrap: wrap;
    }

    .producthunt-column {
        order: 3;
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .wrapper {
        flex-direction: column;
        max-width: 100%;
    }

    .container {
        max-width: 100%;
    }

    .sidebar {
        min-width: 100%;
    }

    .producthunt-column,
    .tvshows-column {
        order: 3;
    }
}

/* ---- Cookie Banner ---- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 360px;
    background-color: #1E1E1E;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cookie-banner.hidden {
    display: none;
}

.cookie-text {
    font-size: 14px;
    color: #888;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--color-link-hover);
    opacity: 1;
}

.cookie-btn {
    align-self: flex-end;
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    background-color: #2a2a2a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-btn:hover {
    background-color: #3a3a3a;
    color: var(--color-link-hover);
}

@media (max-width: 480px) {
    .cookie-banner {
        left: 20px;
        right: 20px;
        max-width: none;
        bottom: 10px;
    }
}