/* --- Variáveis de Cor (Light & Dark Theme) --- */
:root[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-surface: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* --- Base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Navbar Centralizada --- */
.navbar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2rem 2rem;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    text-align: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
}

/* Botão de Tema Posicionado no Canto Direito do Header */
.theme-btn {
    position: absolute;
    right: 2rem;
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.8rem;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
}

/* --- Layout Principal --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    flex: 1;
}

.hero {
    text-align: center;
    margin-bottom: 3.5rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.dedication {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* --- Grid de Jogos --- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-4px);
    transition: transform 0.2s ease;
}

.card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    flex: 1;
}

.play-btn {
    display: block;
    text-align: center;
    background-color: var(--accent);
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
}

.play-btn:hover {
    background-color: var(--accent-hover);
}

.play-btn.disabled {
    background-color: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Footer Centralizado --- */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}
