/* ====== RESET E VARIÁVEIS ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --accent: #58a6ff;
    --accent-hover: #4493e6;
    --success: #238636;
    --error: #da3633;
    --warning: #f85149;
    --gradient: linear-gradient(135deg, #58a6ff, #a5b4fc);
}

/* Tema escuro automático */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0d1117;
        --bg-secondary: #161b22;
        --bg-tertiary: #21262d;
        --bg-elevated: #1a1f26;
        --text-primary: #f0f6fc;
        --text-secondary: #8b949e;
        --border: #30363d;
        --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
}

/* Tema claro automático */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f5f7fa;
        --bg-secondary: #ffffff;
        --bg-tertiary: #f0f0f0;
        --bg-elevated: #ffffff;
        --text-primary: #202124;
        --text-secondary: #5f6368;
        --border: #e0e0e0;
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        --accent: #1a73e8;
        --accent-hover: #1669d1;
    }
}

/* Modo escuro forçado */
.dark-mode {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-elevated: #1a1f26;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --border: #30363d;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Modo claro forçado */
.light-mode {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f0f0;
    --bg-elevated: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --accent: #1a73e8;
    --accent-hover: #1669d1;
}

/* ====== BASE ====== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== FOCO ACESSÍVEL ====== */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

button:focus,
input:focus,
textarea:focus,
select:focus,
.btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ====== NAVBAR ====== */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.nav-brand:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

/* ====== MOBILE MENU FIX ====== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 1001;
}

.menu-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* Mobile styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block !important;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-top: none;
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        box-shadow: var(--shadow);
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex !important;
        animation: slideDown 0.3s ease;
    }
    
    .nav-menu a {
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 6px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .user-info-nav {
        padding: 0.5rem 1rem;
        border-bottom: 1px solid var(--border);
        margin-bottom: 0.5rem;
    }
    
    .theme-toggle {
        margin-top: 0.5rem;
        padding: 0.75rem 1rem;
        border-radius: 6px;
        justify-content: flex-start;
        gap: 0.5rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* ====== MAIN CONTENT ====== */
.main-content {
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

/* ====== HERO SECTION ====== */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0.1;
    z-index: -1;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ====== GAMES GRID ====== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 20px;
}

.game-card {
    background: var(--bg-elevated);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-card:hover::before {
    opacity: 0.05;
}

.game-link {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    z-index: 2;
}

.game-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-card-image {
    transform: scale(1.05);
}

.game-card-content {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

.game-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.game-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.game-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
}

.game-cover {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.game-cover:hover {
    transform: scale(1.02);
}

.game-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    line-height: 1.2;
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.meta-item {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.meta-item i {
    color: var(--accent);
}

.screenshots {
    margin-bottom: 3rem;
}

.screenshots h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.screenshot {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.screenshot:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.game-description,
.game-specs,
.download-section,
.comments-section {
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
}

.game-description h3,
.game-specs h3,
.download-section h3,
.comments-section h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.game-description h3 i,
.game-specs h3 i,
.download-section h3 i,
.comments-section h3 i {
    color: var(--accent);
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.spec-item {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.spec-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.spec-item h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.login-required {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

.login-required a:hover {
    text-decoration: underline;
}

/* ====== COMMENTS ====== */
.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    resize: vertical;
    margin-bottom: 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.comment-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment {
    background: var(--bg-elevated);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.comment:hover {
    transform: translateY(-1px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: bold;
    color: var(--accent);
}

.comment-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.comment-text {
    color: var(--text-primary);
    line-height: 1.6;
}

/* ====== BUTTONS ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(88, 166, 255, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.btn-download {
    background: var(--success);
    color: white;
}

.btn-download:hover {
    background: #2ea043;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(35, 134, 54, 0.3);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #c93025;
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ====== PAGINATION ====== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination .btn {
    min-width: 40px;
    padding: 0.5rem 0.75rem;
}

.pagination .btn.active {
    background: var(--accent);
    color: white;
}

.pagination .btn:hover {
    transform: translateY(-1px);
}

/* ====== AUTH FORMS ====== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    padding: 0.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.auth-tabs a {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-weight: 500;
}

.auth-tabs a.active,
.auth-tabs a:hover {
    background: var(--accent);
    color: white;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ====== DASHBOARD ====== */
.dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.dashboard-sidebar {
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
    border: 1px solid var(--border);
    position: sticky;
    top: 100px;
    box-shadow: var(--card-shadow);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.user-info i {
    font-size: 3rem;
    color: var(--accent);
}

.user-info h3 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.role {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-DEV {
    background: #f85149;
    color: white;
}

.role-SUPER_ADMIN {
    background: #ff8c00;
    color: white;
}

.role-ADMIN {
    background: var(--accent);
    color: white;
}

.role-USER {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(4px);
}

.dashboard-nav a i {
    width: 20px;
    text-align: center;
}

.dashboard-content {
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
}

/* ====== STATS GRID ====== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--card-shadow);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.stat-card i {
    font-size: 2rem;
    color: var(--accent);
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 50%;
    border: 1px solid var(--border);
}

.stat-info h3 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ====== FORMS ====== */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label i {
    color: var(--accent);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

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

.form-grid .full-width {
    grid-column: 1 / -1;
}

/* ====== TABLES ====== */
.table-responsive {
    overflow-x: auto;
    margin-top: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
    transform: scale(1.01);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.game-mini {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.game-mini img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* ====== ALERTS ====== */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    border: 1px solid;
    box-shadow: var(--card-shadow);
}

.alert i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-success {
    background: rgba(35, 134, 54, 0.15);
    color: #3fb950;
    border-color: #238636;
}

.alert-error {
    background: rgba(218, 54, 51, 0.15);
    color: #f85149;
    border-color: #da3633;
}

.alert-warning {
    background: rgba(187, 128, 9, 0.15);
    color: #f0883e;
    border-color: #bb8009;
}

.alert-info {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border-color: #58a6ff;
}

/* ====== FOOTER ====== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 0 2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-info {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ====== MODAL PARA SCREENSHOTS ====== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.close:hover {
    color: var(--accent);
    transform: scale(1.1);
}

/* ====== SCROLLBAR PERSONALIZADA ====== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

::-webkit-scrollbar-corner {
    background: var(--bg-tertiary);
}

/* ====== LOADING STATES ====== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ====== RESPONSIVIDADE AVANÇADA ====== */

/* Telas muito pequenas (smartphones pequenos) */
@media (max-width: 360px) {
    .container,
    .nav-container {
        padding: 0 10px;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
}

/* Smartphones (retratos) */
@media (max-width: 576px) {
    body {
        font-size: 15px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 6px;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
        gap: 1.5rem;
    }

    .game-header {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem;
    }

    .game-info h1 {
        font-size: 2rem;
    }

    .meta-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-sidebar {
        position: static;
        padding: 1.5rem;
    }

    .dashboard-content {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .download-buttons {
        flex-direction: column;
    }

    .spec-grid {
        grid-template-columns: 1fr;
    }

    .screenshot-gallery {
        grid-template-columns: 1fr;
    }

    .pagination {
        gap: 0.25rem;
    }

    .pagination .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .table-responsive {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .modal {
        padding-top: 20px;
    }

    .modal-content {
        width: 95%;
    }

    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .game-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .user-info {
        justify-content: center;
        text-align: center;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Notebooks pequenos */
@media (max-width: 992px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* Desktops grandes */
@media (min-width: 1400px) {
    .container,
    .nav-container {
        max-width: 1400px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ====== MELHORIAS DE IMAGEM ====== */
img,
.game-card-image,
.screenshot,
.game-mini img,
.game-cover {
    image-rendering: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ====== ANIMAÇÕES SUAVES ====== */
.game-card,
.stat-card,
.btn,
.comment,
.spec-item,
.screenshot,
.auth-card,
.alert {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== PRINT STYLES ====== */
@media print {
    .navbar,
    .footer,
    .theme-toggle,
    .menu-toggle,
    .btn,
    .dashboard-sidebar,
    .pagination {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
    }
    
    .game-card,
    .dashboard-content,
    .auth-card {
        background: white !important;
        border: 1px solid black !important;
        box-shadow: none !important;
    }
}

/* ====== MODO DE ALTO CONTRASTE ====== */
@media (prefers-contrast: high) {
    :root {
        --border: #ffffff;
        --text-secondary: #ffffff;
    }
    
    .dark-mode {
        --border: #ffffff;
        --text-secondary: #ffffff;
    }
}

/* ====== REDUÇÃO DE MOVIMENTO ====== */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.nav-menu.active {
    display: flex !important;   /* força exibição */
    flex-direction: column;     /* garante empilhamento vertical */
    gap: 1rem;
}


/* ====== UTILITIES ====== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-sticky { position: sticky; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.select-none { user-select: none; }
.select-all { user-select: all; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }


/* =========================================================
   ⬇⬇  ADICIONE A PARTIR DAQUI — ÚLTIMA LINHA DO style.css ⬇⬇
   ========================================================= */

/* ----- Tema Escuro (padrão  */
body {

    --bg-primary:   #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary:  #21262d;
    --bg-elevated:  #1a1f26;

    --text-primary:   #f0f6fc;
    --text-secondary: #8b949e;

    --border:       #30363d;
    --shadow:       0 8px 24px rgba(0,0,0,.4);
    --card-shadow:  0 4px 20px rgba(0,0,0,.4);

    --accent:       #58a6ff;
    --accent-hover: #4493e6;
}

    

/* ----- Tema claro */
body.light-mode {
    /* fundos */
    --bg-primary:   #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary:  #f5f5f5;
    --bg-elevated:  #ffffff;

    /* texto */
    --text-primary:   #202124;
    --text-secondary: #5f6368;

    /* efeitos */
    --border:       #e0e0e0;
    --shadow:       0 4px 12px rgba(0,0,0,.05);
    --card-shadow:  0 2px 8px  rgba(0,0,0,.08);

    /* cor de destaque */
    --accent:       #1a73e8;
    --accent-hover: #1669d1;
}

/* evita flash de cor na troca */
body, body.dark-mode {
    background: var(--bg-primary);
    color:      var(--text-primary);
    transition: background-color .3s ease, color .3s ease;
}
/* =========================================================
   ⬆⬆           NÃO COLOQUE NADA DEPOIS DESTE BLOCO         ⬆⬆
   ========================================================= */
