* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', system-ui, sans-serif;
    color: #e2e8f0;
    min-height: 100vh;
    background: #0b1220;
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(56, 189, 248, 0.22), transparent 55%),
        radial-gradient(ellipse 80% 50% at 100% 50%, rgba(99, 102, 241, 0.12), transparent 45%),
        radial-gradient(ellipse 60% 40% at 0% 80%, rgba(14, 165, 233, 0.1), transparent 40%),
        linear-gradient(180deg, #0f172a 0%, #0c1929 50%, #0a1628 100%);
    background-attachment: fixed;
}

.page {
    max-width: 1000px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 1.5rem) 3.5rem;
}

.header {
    text-align: center;
    margin-bottom: clamp(2rem, 5vw, 3rem);
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.logo {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #f8fafc 0%, #7dd3fc 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.tagline {
    margin-top: 0.75rem;
    color: #94a3b8;
    font-size: 1.05rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.85rem 1.75rem;
    border-radius: 20px;
    text-decoration: none;
    color: #e2e8f0;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.92) 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    overflow: hidden;
}

a.card:hover,
a.card.card--selected {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.45),
        0 0 0 2px rgba(56, 189, 248, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

a.card:visited {
    color: #e2e8f0;
}

.card--ski {
    border-color: rgba(34, 211, 238, 0.22);
}

.card--pirate {
    border-color: rgba(251, 191, 36, 0.15);
}

.card--soon {
    cursor: default;
}

.card--soon:hover {
    transform: none;
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card__badge {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.22);
    color: #86efac;
    border: 1px solid rgba(74, 222, 128, 0.4);
}

.card__badge--soon {
    background: rgba(251, 191, 36, 0.18);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.4);
}

.card__icon {
    font-size: 3rem;
    margin-bottom: 0.85rem;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.card__title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

a.card .card__title {
    color: #f8fafc;
}

.card__desc {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.55;
    flex-grow: 1;
    margin-bottom: 1.35rem;
}

.card__cta {
    font-weight: 700;
    font-size: 0.95rem;
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

a.card .card__cta {
    color: #7dd3fc;
}

a.card:hover .card__cta {
    color: #bae6fd;
}

.card__cta--ghost {
    display: inline-flex;
    margin-top: auto;
    text-decoration: none;
    color: #a8b4cf;
    font-weight: 600;
}

.card__cta--ghost:hover {
    color: #f1f5f9;
}

.footer {
    margin-top: 3.5rem;
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.footer code {
    background: rgba(15, 23, 42, 0.8);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.82rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
}

@media (max-width: 520px) {
    .card__badge {
        position: static;
        align-self: flex-start;
        margin-bottom: 0.75rem;
    }
}

/* Legenda do Controle */
.gamepad-legend {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    gap: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    opacity: 0;
}

.gamepad-legend.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}

.button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #334155;
    border-radius: 50%;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.button-icon--confirm {
    background: #2563eb;
    color: white;
}
