body {
    font-family: Arial, sans-serif;
    background-color: #181818;
    color: #fff;
    text-align: center;
}

/* Na tej stronie nagłówek ma rosnąć razem z listą trybów,
   inaczej kafelki wychodzą poza stały #header i wchodzą na stopkę. */
#header {
    height: auto;
    min-height: 100vh;
    display: block;
    align-items: stretch;
}

#header .content {
    height: auto;
}

.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 160px; /* reserve space so tiles don't overlap the footer */
}

h1 {
    text-align: left;
    font-size: 40px;
}

.selektor {
    text-align: left;
    margin-bottom: 30px;
}

/* ---------- Siatka trybów ---------- */
.tryby {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
    align-items: stretch;
}

/* ---------- Karta trybu ---------- */
.tryb-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    text-decoration: none;
    color: #e6eef6;
    padding: 22px;
    border-radius: 16px;
    background:
        radial-gradient(130% 130% at 100% 0%, rgba(57,190,255,0.10), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.40));
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
    transition: transform 320ms cubic-bezier(.2,.9,.3,1), box-shadow 320ms ease, border-color 320ms ease;
    opacity: 0;
    transform: translateY(20px);
}

.tryb-card.in-view {
    animation: trybIn 520ms cubic-bezier(.2,.9,.3,1) forwards;
}

@keyframes trybIn {
    to { opacity: 1; transform: translateY(0); }
}

.tryb-card:hover {
    transform: translateY(-8px);
    border-color: rgba(57,190,255,0.40);
    box-shadow: 0 20px 44px rgba(0,0,0,0.5), 0 0 0 1px rgba(57,190,255,0.14);
}

/* ---------- Górna część karty ---------- */
.tryb-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tryb-card__cat {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9fe3ff;
    background: rgba(57,190,255,0.12);
    border: 1px solid rgba(57,190,255,0.25);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.tryb-card h2 {
    color: #39BEFF;
    margin: 0;
    font-size: 24px;
}

.tryb-card__ver {
    margin: 6px 0 0;
    font-size: 13px;
    color: #aebcc7;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tryb-card__icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45));
    transition: transform 320ms cubic-bezier(.2,.9,.3,1);
}

.tryb-card:hover .tryb-card__icon {
    transform: scale(1.12) rotate(-6deg);
}

/* ---------- Stopka karty ---------- */
.tryb-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 22px;
}

.tryb-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #aebcc7;
}

.tryb-status__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #6b6b6b;
}

.tryb-status.is-online {
    color: #dff8ff;
}

.tryb-status.is-online .tryb-status__dot {
    background: #2bb673;
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
    0%   { box-shadow: 0 0 0 0 rgba(43,182,115,0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(43,182,115,0); }
    100% { box-shadow: 0 0 0 0 rgba(43,182,115,0); }
}

.tryb-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #39BEFF;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 9px 16px;
    border-radius: 8px;
    transition: gap 220ms ease, background 220ms ease;
}

.tryb-card:hover .tryb-card__cta {
    gap: 12px;
    background: #56c9ff;
}

/* Ensure footer stays on top of content and is not overlapped */
footer {
    position: relative;
    z-index: 20;
}

/* ---------- Responsywność ---------- */
@media (max-width: 600px) {
    .container { width: 92%; }
    .tryby { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .tryb-card,
    .tryb-card.in-view {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
