:root {
    --bg: #f4f6fb;
    --card: rgba(255, 255, 255, 0.92);
    --text: #182033;
    --muted: #67728a;
    --accent: #4d6bff;
    --accent-hover: #3454f4;
    --border: rgba(24, 32, 51, 0.08);
    --shadow: 0 18px 48px rgba(27, 39, 94, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #ffffff 0%, #edf2ff 35%, var(--bg) 100%);
    color: var(--text);
}

img {
    display: block;
    max-width: 100%;
}

.page {
    min-height: 100vh;
    padding: 32px 20px 48px;
}

.header {
    max-width: 1240px;
    margin: 0 auto 28px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.header h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.08;
    font-weight: 900;
}

.subtitle {
    margin: 0;
    max-width: 820px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.grid {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 400px));
    justify-content: center;
    gap: 24px;
}

.card {
    width: 400px;
    min-height: 400px;
    border-radius: 28px;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow);
    padding: 18px;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 56px rgba(27, 39, 94, 0.16);
}

.cover-wrap {
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #eef2ff 0%, #e8edff 100%);
    margin-bottom: 16px;
}

.cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.title {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
    word-break: break-word;
}

.meta-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.meta span {
    color: var(--text);
    font-weight: 700;
}

.actions {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    gap: 12px;
}

.btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 52px;
    padding: 14px 18px;
    border-radius: 16px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 800;
    font-size: 15px;
    line-height: 1;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #5a7cff 0%, #7d92ff 100%);
    box-shadow: 0 12px 26px rgba(77, 107, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #6f86ff 100%);
}

.btn-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--border);
    cursor: not-allowed;
}

.empty {
    max-width: 1240px;
    margin: 32px auto 0;
    padding: 28px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
}

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

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 400px));
    }

    .card {
        width: 100%;
        min-height: 380px;
    }
}

@media (max-width: 480px) {
    .page {
        padding: 24px 14px 36px;
    }

    .subtitle {
        font-size: 16px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card {
        min-height: auto;
        padding: 14px;
    }

    .title {
        font-size: 21px;
    }

    .actions {
        padding-top: 14px;
    }
}
