/* ============================================================
   Turma da Boiadeirinha — v2 Style
   Layout moderno em grid / colunas
============================================================ */

/* ---------- Tokens ---------- */
:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --text: #1d1d1f;
    --text-secondary: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --border: #d2d2d7;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Animations ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CATALOG PAGE
============================================================ */
.catalog {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 0;
}

/* ---------- Header ---------- */
.catalog header {
    text-align: center;
    margin-bottom: 48px;
}

.brand-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.catalog h1 {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.catalog .subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
}

/* ---------- Grid ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ---------- Card ---------- */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fadeUp 0.5s ease both;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* ---------- Card Image ---------- */
.card-img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8e8ed;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-img img {
    transform: scale(1.04);
}

.flag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 8px;
}

/* ---------- Card Content ---------- */
.card-content {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ---------- Tags ---------- */
.tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f5f5f7;
    color: var(--text-secondary);
}

/* ---------- Card Text ---------- */
.card-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.card-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* ---------- Card Actions ---------- */
.card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.store-btn:hover {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

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

/* ---------- Copy Box ---------- */
.copy-box {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f5f5f7;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.copy-box code {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    user-select: all;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    border-left: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--transition);
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #e8e8ed;
    color: var(--text);
}

.copy-btn .icon-check { display: none; }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; color: #34c759; }

/* ============================================================
   GAME DETAIL PAGE
============================================================ */
.game-detail {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 24px 0;
}

.topbar {
    margin-bottom: 32px;
}

.brand-link {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.brand-link:hover { color: var(--text); }

.detail-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: fadeUp 0.5s ease;
}

.detail-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8e8ed;
}

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

.detail-body {
    padding: 32px;
}

.detail-body h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
}

.detail-body p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.detail-body .store-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.back-link {
    display: inline-block;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    transition: color var(--transition);
}

.back-link:hover { color: var(--accent-hover); }

/* ============================================================
   404 PAGE
============================================================ */
.page-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding: 24px;
}

.page-404 h1 {
    font-size: 80px;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    margin-bottom: 8px;
}

.page-404 p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.page-404 a {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================================
   FOOTER
============================================================ */
footer {
    text-align: center;
    margin-top: 56px;
    padding: 32px 24px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.footer-social a {
    color: #b4b4b9;
    transition: color var(--transition);
}

.footer-social a:hover { color: var(--text); }

footer p {
    color: #b4b4b9;
    font-size: 12px;
}

/* ============================================================
   TOAST
============================================================ */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--text);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 720px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .catalog {
        padding: 32px 16px 0;
    }

    .catalog header {
        margin-bottom: 32px;
    }

    .card-content {
        padding: 16px 20px 20px;
    }

    .detail-body {
        padding: 24px;
    }

    .detail-body h1 {
        font-size: 24px;
    }
}

@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}
