/* Сброс и база */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 1200px;
    width: 100%;
    background: #161b22;
    border-radius: 16px;
    padding: 30px 40px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
    border: 1px solid #30363d;
}

/* Шапка */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #30363d;
}
.logo {
    font-size: 22px;
    font-weight: 700;
    color: #f0f6fc;
    letter-spacing: 0.5px;
}
.logo .icon {
    color: #f0883e;
    margin-right: 8px;
}
nav {
    display: flex;
    gap: 25px;
    font-size: 15px;
}
.nav-link {
    cursor: pointer;
    color: #8b949e;
    transition: 0.2s;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.nav-link:hover {
    color: #f0f6fc;
    border-bottom-color: #f0883e;
}
.nav-link.highlight {
    color: #f0f6fc;
    font-weight: 600;
}
.nav-link.highlight:hover {
    border-bottom-color: #f0883e;
}

/* Основной блок */
main {
    padding: 30px 0 20px;
}
.hero {
    text-align: center;
    padding: 30px 0 10px;
}
.hero h1 {
    font-size: 38px;
    font-weight: 600;
    background: linear-gradient(135deg, #f0f6fc 0%, #f0883e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero .sub {
    font-size: 18px;
    color: #8b949e;
    margin: 12px 0 28px;
}

/* Кнопки */
.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    margin: 0 8px;
}
.btn.primary {
    background: #f0883e;
    color: #0d1117;
}
.btn.primary:hover {
    background: #f6995a;
    transform: scale(1.02);
}
.btn.secondary {
    background: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
}
.btn.secondary:hover {
    background: #30363d;
}

/* Карточки репозиториев */
.repos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 40px 0 30px;
}
.repo-card {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 20px 22px;
    cursor: pointer;
    transition: 0.2s;
}
.repo-card:hover {
    border-color: #f0883e;
    background: #161b22;
    transform: translateY(-3px);
}
.repo-name {
    font-weight: 600;
    font-size: 18px;
    color: #f0883e;
}
.repo-desc {
    font-size: 14px;
    color: #8b949e;
    margin: 8px 0 12px;
}
.repo-meta {
    font-size: 13px;
    color: #484f58;
}

/* Статистика */
.stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    padding: 18px 0;
    border-top: 1px solid #21262d;
    border-bottom: 1px solid #21262d;
    color: #8b949e;
    font-size: 15px;
    margin-bottom: 10px;
}

/* Подвал */
footer {
    display: flex;
    justify-content: space-between;
    padding-top: 22px;
    font-size: 14px;
    color: #484f58;
}
.status {
    color: #3fb950;
}
.status.offline {
    color: #f85149;
}

/* ===== Модальное окно ошибок ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.modal.show {
    display: flex;
}
.modal-content {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 20px;
    padding: 40px 50px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    animation: fadeSlide 0.25s ease-out;
}
@keyframes fadeSlide {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-icon {
    font-size: 52px;
    margin-bottom: 12px;
}
.modal-content h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 10px;
}
.modal-content p {
    color: #8b949e;
    font-size: 16px;
    margin-bottom: 28px;
    line-height: 1.5;
}
.modal-content .btn {
    background: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 10px 36px;
}
.modal-content .btn:hover {
    background: #30363d;
}

/* ===== Страница помощи ===== */
.help-content {
    max-width: 600px !important;
    text-align: left !important;
}
.help-content h2 {
    text-align: center;
}
.help-text h3 {
    color: #f0883e;
    margin: 20px 0 10px;
    font-size: 18px;
}
.help-text p {
    color: #c9d1d9;
    margin-bottom: 10px;
    line-height: 1.6;
}
.code-block {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Courier New', monospace;
    color: #f0f6fc;
    margin: 10px 0 15px;
    font-size: 14px;
    overflow-x: auto;
}
.help-content .btn {
    display: block;
    margin: 20px auto 0;
    background: #f0883e;
    color: #0d1117;
}
.help-content .btn:hover {
    background: #f6995a;
}

/* Адаптив */
@media (max-width: 700px) {
    .container { padding: 20px 16px; }
    header { flex-direction: column; gap: 14px; }
    nav { flex-wrap: wrap; justify-content: center; gap: 14px; }
    .hero h1 { font-size: 28px; }
    .repos { grid-template-columns: 1fr; }
    .stats { flex-wrap: wrap; gap: 16px; }
    footer { flex-direction: column; align-items: center; gap: 8px; }
    .modal-content { padding: 30px 20px; }
}

/* Стили для списка в помощи */
.help-text ul {
    list-style: none;
    padding-left: 0;
}
.help-text ul li {
    padding: 4px 0;
    border-bottom: 1px solid #21262d;
}
.help-text ul li:last-child {
    border-bottom: none;
}
.help-text ul li strong {
    color: #f0883e;
}
