body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

/* Главная оболочка всего интерфейса */
.container {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 30px;
    max-width: 1000px; /* Увеличили ширину для компьютеров */
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

h1 {
    color: #f0f6fc;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 5px;
}

.subtitle {
    color: #8b949e;
    font-size: 14px;
    margin-bottom: 25px;
}

/* НОВАЯ СЕТКА ДЛЯ КАРТОЧЕК */
.subscription-list {
    display: grid;
    /* На ПК автоматически делает колонки шириной от 260px */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px; /* Красивые отступы между всеми карточками */
    text-align: left;
    width: 100%;
}

.card {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    display: flex; /* Переключаем в flex-режим */
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: #f0f6fc;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.delay {
    font-size: 11px;
    background-color: #30363d;
    color: #8b949e;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: normal;
    border: 1px solid #444c56;
}

.card-desc {
    color: #8b949e;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* Описания будут равны, даже если текста разное количество */
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    margin: 0 auto 20px auto;
    width: 160px;
    height: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

    .qr-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

.btn-copy {
    display: block;
    background-color: #1EBA60;
    color: white;
    border: none;
    width: 100%;
    text-align: center;
    font-weight: bold;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 186, 96, 0.2);
    transition: background-color 0.2s, transform 0.1s;
}

    .btn-copy:hover {
        background-color: #169a4e;
    }

    .btn-copy:active {
        transform: scale(0.98);
    }

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #238636;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 9999;
}

    .toast.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

footer {
    margin-top: 30px;
    font-size: 13px;
    color: #8b949e;
    border-top: 1px solid #30363d;
    padding-top: 15px;
}

    footer a {
        color: #58a6ff;
        text-decoration: none;
    }

        footer a:hover {
            text-decoration: underline;
        }

/* МЕДИА-ЗАПРОС ДЛЯ ТЕЛЕФОНОВ */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px 15px;
    }

    .subscription-list {
        /* Принудительно выстраиваем карточки строго в одну колонку */
        grid-template-columns: 1fr;
    }

    .toast {
        width: 80%;
        text-align: center;
    }
}
