/**
 * Estilos específicos para páginas de jogos individuais
 * 
 * @package BloxCodes
 * @version 1.0.0
 */

/* Layout da página de jogo */
.game-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Breadcrumbs - Removido: agora está no style.css global para consistência */

/* Cabeçalho do jogo */
.game-header {
    overflow: hidden;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.game-header-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem 2rem 0 2rem;
    align-items: start;
}

.game-main-image {
    position: relative;
}

.game-featured-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    object-fit: cover;
    min-height: 300px;
}

.game-header-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: flex-start;
    height: 100%;
}

.game-title-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
}

.game-title {
    font-size: var(--font-size-2xl);
    font-weight: bold;
    color: var(--gray-800);
    margin: 0;
    line-height: 1.1;
    flex: 1;
}

/* Sistema de Notificações */
.notification-bell {
    position: relative;
    background: none;
    border: none;
    width: auto;
    height: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.notification-bell:hover {
    transform: scale(1.1);
}

.notification-bell:active {
    transform: scale(0.95);
}

.bell-icon {
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
    display: block;
}

.notification-bell:hover .bell-icon {
    transform: rotate(15deg);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.notification-bell.subscribed .bell-icon {
    color: var(--accent-color);
}

.notification-bell.push-subscribed .bell-icon {
    color: var(--success-color);
    animation: pulse-push 2s infinite;
}

@keyframes pulse-push {
    0% {
        filter: drop-shadow(0 0 0 rgba(76, 175, 80, 0.7));
    }
    70% {
        filter: drop-shadow(0 0 8px rgba(76, 175, 80, 0.4));
    }
    100% {
        filter: drop-shadow(0 0 0 rgba(76, 175, 80, 0));
    }
}


/* Animação do badge */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Data de atualização */
.game-last-updated {
    margin: 0 0 1.5rem 0;
    font-size: var(--font-size-base);
    color: var(--gray-700);
    font-weight: bold;
}

.update-label {
    font-weight: bold;
    margin-right: 0.25rem;
}

.update-time {
    font-weight: bold;
    color: var(--gray-700);
}

/* Informações do jogo */
.game-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.1rem;
}

.game-header-info > *:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: 600;
    color: var(--gray-700);
    min-width: 120px;
    flex-shrink: 0;
}

.developer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.developer-link:hover {
    color: var(--button-hover);
    text-decoration: underline;
}

.developer-name {
    font-weight: 500;
    color: var(--gray-800);
}

/* Data de lançamento */
.game-info-item time {
    color: var(--gray-600);
    font-size: var(--font-size-base);
}

/* Categorias (Gêneros e Subgêneros) */
.game-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Links simples para gêneros e subgêneros */
.game-categories a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.game-categories a:hover {
    color: var(--button-hover);
    text-decoration: underline;
}

/* Links de classificação indicativa na página do jogo */
.game-info-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.game-info-item a:hover {
    color: var(--button-hover);
    text-decoration: underline;
}

/* Classificação como texto simples - sem estilos especiais */

/* Links externos */
.game-external-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
    min-width: 0;
}

.external-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    padding: 0.25rem 0.125rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
    min-width: 0;
    /* Remover área de clique extra - apenas ícone e texto serão clicáveis */
    pointer-events: none;
}

.external-link:hover {
    color: var(--primary-color);
}

/* Efeitos de hover específicos para ícone e texto */
.external-link .link-icon:hover {
    color: var(--primary-color);
    /* Efeito de esmaecimento no ícone */
    opacity: 0.7;
}

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

.external-link .link-icon {
    font-size: 1.75rem;
    margin-bottom: 0;
    /* Tornar apenas o ícone clicável */
    pointer-events: auto;
    cursor: pointer;
    /* Transição para cor e opacidade, sem transform */
    transition: color 0.3s ease, opacity 0.3s ease;
}

.external-link .link-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    word-break: break-word;
    /* Tornar apenas o texto clicável */
    pointer-events: auto;
    cursor: pointer;
    /* Transição apenas para cor, sem transform */
    transition: color 0.3s ease;
}

.link-icon {
    font-size: 1.2em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.link-icon .custom-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.external-link .link-icon .custom-icon {
    width: 28px;
    height: 28px;
}

.link-icon .emoji-icon {
    font-size: 1.2em;
}

/* Conteúdo principal */
.game-content {
    padding: 2rem;
    margin-bottom: 0;
}

/* Estilos para imagens no campo "Como Resgatar os Códigos" */
.redeem-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1rem auto;
    display: block;
}

.redeem-content img.size-small {
    max-width: 200px;
    width: 100%;
}

.redeem-content img.size-medium {
    max-width: 400px;
    width: 100%;
}

.redeem-content img.size-large {
    max-width: 600px;
    width: 100%;
}

.redeem-content img.size-responsive {
    max-width: 100%;
    width: 100%;
}

/* Responsividade para imagens */
@media (max-width: 768px) {
    .redeem-content img.size-small,
    .redeem-content img.size-medium,
    .redeem-content img.size-large {
        max-width: 100%;
        width: 100%;
    }
    
    .redeem-content ul,
    .redeem-content ol {
        padding-left: 1rem;
        margin: 0.75rem 0;
    }
    
    .redeem-content li {
        margin-bottom: 0.25rem;
        padding-left: 0.25rem;
    }
}

.game-introduction,
.game-how-to-redeem,
.game-active-codes,
.game-about,
.game-faq {
    margin-bottom: 2rem;
}

.game-introduction h2,
.game-how-to-redeem h2,
.game-active-codes h2,
.game-about h2,
.game-faq h2 {
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: var(--gray-800);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.game-how-to-redeem {
    margin-bottom: 0;
}

.game-how-to-redeem h2 {
    margin-bottom: 0;
}

.game-faq {
    margin-bottom: 0;
}

.game-introduction {
    margin-bottom: 20px;
}

.game-description {
    line-height: 1.8;
    color: var(--gray-700);
}



.redeem-content {
    line-height: 1.8;
    color: var(--gray-700);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    padding: 1rem;
}

.redeem-content ul,
.redeem-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    line-height: 1.8;
}

.redeem-content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.redeem-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.redeem-content p:last-child {
    margin-bottom: 0;
}

.game-about-content {
    line-height: 1.8;
    color: var(--gray-700);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Garantir que parágrafos tenham o mesmo espaçamento */
.game-about-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.game-about-content p:last-child {
    margin-bottom: 0;
}

/* Estilos para listas na seção "Sobre o Jogo" */
.game-about-content ul,
.game-about-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    line-height: 1.8;
}

.game-about-content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.game-about-content li:last-child {
    margin-bottom: 0;
}

/* Estilos específicos para mobile */
@media (max-width: 768px) {
    .game-about-content ul,
    .game-about-content ol {
        padding-left: 1rem;
        margin: 0.75rem 0;
    }
    
    .game-about-content li {
        margin-bottom: 0.25rem;
        padding-left: 0.25rem;
    }
}

/* Tabela de códigos */
.codes-table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

/* Mobile: remover scroll horizontal e ajustar layout */
@media (max-width: 768px) {
    .codes-table-container {
        overflow-x: visible;
    }
    
    .codes-table {
        table-layout: fixed;
        width: 100%;
    }
    
    .codes-table th,
    .codes-table td {
        padding: 0.5rem 0.25rem;
        font-size: var(--font-size-sm);
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .codes-table th {
        font-size: 15px;
        white-space: nowrap;
    }
    
    .codes-table th:nth-child(2) {
        padding: 0.5rem 0.5rem !important;
        text-align: center !important;
    }
    
    .codes-table th:nth-child(3) {
        text-align: center !important;
    }
    
    .code-cell {
        width: 25%;
        font-size: var(--font-size-sm);
        padding: 0.5rem 0.25rem 0.5rem 1.25rem !important;
        line-height: 1.3;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .reward-cell {
        width: 60%;
        padding: 0.5rem 0.5rem 0.5rem 1.25rem !important;
        line-height: 1.4;
        font-size: var(--font-size-sm);
    }
    
    .status-cell {
        width: 15%;
        padding: 0.5rem 0.25rem !important;
        text-align: center;
        font-size: var(--font-size-sm);
    }
    
    .status-label {
        font-size: 10px;
        padding: 0.2rem 0.5rem;
    }
}

/* Telas muito pequenas - ajustes adicionais */
@media (max-width: 480px) {
    .codes-table th,
    .codes-table td {
        padding: 0.375rem 0.125rem;
        font-size: 12px;
    }
    
    .codes-table th {
        font-size: 14px;
        white-space: nowrap;
    }
    
    .codes-table th:nth-child(2) {
        padding: 0.375rem 0.5rem !important;
        text-align: center !important;
    }
    
    .codes-table th:nth-child(3) {
        text-align: center !important;
    }
    
    .code-cell {
        width: 20%;
        font-size: 12px;
        padding: 0.375rem 0.125rem 0.375rem 0.875rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .reward-cell {
        width: 65%;
        padding: 0.375rem 0.5rem 0.375rem 0.875rem !important;
        font-size: 12px;
        line-height: 1.3;
    }
    
    .status-cell {
        width: 15%;
        padding: 0.375rem 0.125rem !important;
        text-align: center;
        font-size: 12px;
    }
    
    .status-label {
        font-size: 9px;
        padding: 0.15rem 0.4rem;
    }
}

.codes-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.codes-table thead {
    background: var(--primary-color);
    color: var(--white);
}

.codes-table th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border: none;
    overflow: hidden;
    white-space: nowrap;
}

.codes-table th:nth-child(2) {
    text-align: center;
    padding-right: 1rem;
}

.codes-table th:nth-child(3) {
    text-align: center;
}

.codes-table tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

.codes-table tbody tr:hover {
    background: var(--gray-50);
}

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

.code-cell {
    padding: 0.75rem 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    color: var(--primary-color);
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
    vertical-align: middle;
    overflow: visible;
    word-wrap: break-word;
    white-space: normal;
    position: relative;
}

.reward-cell {
    padding: 0.75rem 1rem 0.75rem 1.5rem;
    color: var(--gray-700);
    line-height: 1.5;
    vertical-align: middle;
    font-size: 14px;
    overflow: hidden;
    word-wrap: break-word;
}

/* Célula de status */
.status-cell {
    padding: 0.75rem 1.5rem;
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
    border-left: 1px solid var(--gray-200);
    overflow: hidden;
    white-space: nowrap;
}

/* Label de status */
.status-label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Label de informações de atualização */
.update-info-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-weight: 500;
    line-height: 1.4;
}

/* Estilos para a tag NOVO */
.new-tag {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

/* Seção de Promoção de Jogos Recentes */
.recent-games-promotion {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.recent-games-promotion p {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
}

.recent-games-promotion a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.recent-games-promotion a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* FAQ */
.faq-content {
    line-height: 1.8;
    color: var(--gray-700);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.faq-content h3 {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: var(--gray-800);
    margin: 1.5rem 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.faq-content h3:first-child {
    margin-top: 0;
}

.faq-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.faq-content p:last-child {
    margin-bottom: 0;
}

.faq-content ul,
.faq-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.faq-content li {
    margin-bottom: 0.5rem;
}

/* Manter estilos antigos para compatibilidade */
.faq-list {
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: var(--gray-100);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.faq-question {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--button-hover);
}

.faq-answer {
    padding: 1.5rem;
    color: var(--gray-700);
    line-height: 1.6;
    background: var(--white);
}

/* Sidebar */
.game-sidebar {
    padding: 1.5rem;
    height: fit-content;
}

.related-games {
    margin-bottom: 2rem;
}

.related-games h3 {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: var(--gray-800);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Grid de Jogos Relacionados */
.related-games-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Remover border-bottom dos cards de jogos relacionados */
.related-games-grid .game-card,
.related-games-grid .game-card-link,
.related-games-grid .game-title,
.related-games-grid article {
    border-bottom: none !important;
}

/* Diminuir fonte dos títulos dos jogos relacionados apenas no mobile */
@media (max-width: 768px) {
    .related-games-grid .game-title {
        font-size: 12px !important;
        line-height: 1.2 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Jogos relacionados - estilo antigo (mantido para compatibilidade) */
.related-game {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    transition: var(--transition);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.related-game:hover {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.related-game a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.related-game-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    object-fit: cover;
}

.related-game h4 {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--gray-800);
    line-height: 1.3;
}

/* Responsividade */
@media (max-width: 1024px) {
    .game-header-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .game-external-links {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }
}

@media (max-width: 768px) {
    .game-single {
        padding: 1rem;
    }
    
    .game-header {
        margin-bottom: 0;
    }
    
    .game-header-content {
        padding: 1.5rem 1.5rem 0 1.5rem;
    }
    
    .game-featured-image {
        object-fit: contain;
        min-height: auto;
        max-height: 300px;
    }
    
    .game-content {
        padding: 1.5rem;
    }
    
    .game-sidebar {
        margin-top: 1rem;
    }
    
    .game-external-links {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 0.5rem;
    }
    
    .external-link {
        padding: 0.25rem 0.125rem;
        /* Manter pointer-events: none no mobile também */
        pointer-events: none;
    }
    
    .external-link .link-icon {
        font-size: 1.5rem;
        /* Manter clicabilidade no mobile */
        pointer-events: auto;
        cursor: pointer;
    }
    
    .external-link .link-text {
        /* Manter clicabilidade no mobile */
        pointer-events: auto;
        cursor: pointer;
    }
    
    /* Breadcrumbs já estão estilizados globalmente no style.css */
    
    .game-title {
        font-size: var(--font-size-xl);
    }
    
    .game-title-container {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        justify-content: space-between;
    }
    
    .game-title {
        flex: 1;
        margin-bottom: 0;
    }
    
    .notification-bell {
        padding: 0;
        flex-shrink: 0;
    }
    
    .bell-icon {
        width: 32px;
        height: 32px;
    }
    
    .notification-badge {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .game-header-content {
        padding: 1rem 1rem 0 1rem;
    }
    
    .game-title-container {
        gap: 0.75rem;
    }
    
    .notification-bell {
        padding: 0;
    }
    
    .bell-icon {
        width: 28px;
        height: 28px;
    }
    }
    
    .game-featured-image {
        max-height: 250px;
    }
    
    .game-content {
        padding: 1rem;
    }
    
    .game-sidebar {
        padding: 1rem;
    }
    
    
    .faq-question,
    .faq-answer {
        padding: 1rem;
    }
}

/* Animações removidas da página de jogos */

/* Estados especiais da tabela */
.codes-table tbody tr.copied .code-cell {
    background: var(--accent-color) !important;
    color: var(--white);
    animation: none;
}

/* Caixa de diálogo "Copiado!" */
.code-cell.copied::after {
    content: 'Copiado!';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

/* Estilos para células de código clicáveis */
.code-cell {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.code-cell:hover {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    transform: scale(1.02);
}

.code-cell:active {
    transform: scale(0.98);
}



/* Animação de fadeIn para a caixa de diálogo */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Utilitários */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

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

/* Responsividade para grid de jogos relacionados */
@media (max-width: 768px) {
    .related-games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .related-games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
}

/* Telas muito pequenas - jogos relacionados */
@media (max-width: 360px) {
    .related-games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
    }
} 