:root {
    --bg: #181A1B;
    --bg-gradient: linear-gradient(135deg, #181A1B 0%, #23272B 100%);
    --glass-bg: rgba(32, 34, 37, 0.92);
    --accent: #7C8AFF;
    --accent2: #A9B8FF;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.27);
    --card-border: 1.5px solid rgba(120, 130, 170, 0.10);
    --radius: 20px;
    --header-footer-bg: #1B1D1F;
    --font-main: 'Segoe UI', 'Arial', sans-serif;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    width: 100vw;
    background: var(--bg-gradient);
    background-color: var(--bg);
    background-attachment: fixed;
    color: #F1F2F6;
    font-family: var(--font-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    letter-spacing: 0.01em;
}

header {
    width: 100vw;
    background: var(--header-footer-bg);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    margin-bottom: 36px;
    padding: 24px 0 18px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    border-bottom: 1.5px solid #23272B;
}

header .nav {
    display: flex;
    gap: 2.5em;
    font-size: 1.15em;
    font-weight: 500;
}

header .nav a {
    color: var(--accent2);
    text-decoration: none;
    position: relative;
    transition: color 0.22s;
    letter-spacing: 0.02em;
}

header .nav a::after {
    content: "";
    display: block;
    margin: 0 auto;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.24s cubic-bezier(.4, 1.8, .6, 1);
}

header .nav a:hover {
    color: #fff;
}

header .nav a:hover::after {
    width: 80%;
}

main {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    flex: 1;
}

main a {
    color: #A9B8FF;
    transition: color 0.18s;
}

main a:hover {
    color: #fff;
    text-decoration: underline;
}

.cards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 2.2em;
    margin-top: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.cards a {
    text-decoration: none;
    color: inherit;
    transition: filter 0.18s;
    border-radius: var(--radius);
}

.cards a:focus-visible {
    outline: 3px solid var(--accent2);
    outline-offset: 2px;
}

.card {
    background: var(--glass-bg);
    border: var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 2.3em 1.4em 2em 1.4em;
    transition:
        box-shadow 0.25s cubic-bezier(.4, 1.8, .6, 1),
        transform 0.19s cubic-bezier(.5, 1.4, .8, 1.2);
    position: relative;
    overflow: hidden;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card h3 {
    margin-top: 0.2em;
    margin-bottom: 0.7em;
    font-size: 1.22em;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 12px rgba(80, 80, 120, 0.12);
    z-index: 1;
    letter-spacing: 0.01em;
}

.card p {
    margin: 0.65em 0 0 0;
    color: #D2D5E0;
    font-size: 1.01em;
    z-index: 1;
}

.card time {
    color: var(--accent);
    font-size: 0.97em;
    font-weight: 500;
    background: rgba(90, 100, 140, 0.09);
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 4px;
}

.card:hover {
    transform: translateY(-7px) scale(1.025);
    box-shadow: 0 12px 38px 0 rgba(40, 40, 60, 0.23), 0 1.5px 9px 0 rgba(20, 20, 30, 0.10);
    background: rgba(40, 42, 55, 0.93);
}

.cards a:hover .card {
    filter: brightness(1.03) saturate(1.04);
}

footer {
    background: var(--header-footer-bg);
    color: #b2b5c0;
    width: 100vw;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    padding: 10px 0 10px 0;
    text-align: center;
    font-size: 1em;
    letter-spacing: 0.03em;
    margin-top: 38px;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
    z-index: 100;
    border-top: 1.5px solid #23272B;
}

footer a {
    color: var(--accent2);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.18s;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

main ul {
    list-style: disc inside;
    padding-left: 1.4em;
    margin: 16px 0;
}

main ul li {
    margin: 7px 0;
    font-size: 1.11em;
}

::-webkit-scrollbar {
    width: 10px;
    background: #181A1B;
}

::-webkit-scrollbar-thumb {
    background: #23272B;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: #33394A;
}

@media (max-width: 900px) {

    header,
    footer {
        padding: 15px 0 11px 0;
    }

    main {
        width: 92%;
    }

    .cards {
        gap: 1.3em;
    }
}

@media (max-width: 600px) {

    header,
    footer {
        border-radius: 0;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 1em;
    }

    .card {
        padding: 1.2em 0.7em 1.2em 0.7em;
        min-height: 120px;
    }

    main {
        margin: 0;
        width: 92%;
    }
}
