body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #000; /* Alterado de #f5f5f5 para preto */
    color: #fff;
}

header {
    color: white;
    padding: 20px 0;
    text-align: center;
}

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

.dashboard {
    /*display: flex;*/
    /*justify-content: space-between;*/
    margin-top: 20px;
}

.stats {
    background-color: #222; /* Alterado de branco para tom escuro */
    color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
    flex: 1;
    margin-right: 20px;
}

.word-section {
    flex: 3;
}

.search-bar {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #444; /* Borda ajustada */
    border-radius: 4px;
    background-color: #333; /* Fundo escuro */
    color: #fff; /* Texto branco */
}

/* Estilo atualizado para os cards, simulando cartas de jogos */
.word-card {
    position: relative;
    background: linear-gradient(145deg, #2a2a2a, #0d0d0d);
    border: 2px solid #444;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    margin: 5px;
}

#word-cards {
    display: flex !important;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

.word-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 1);
}

/* Adiciona um efeito de brilho sutil, como se a carta tivesse uma camada brilhante */
.word-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 70%);
    transform: rotate(25deg);
    pointer-events: none;
}

/* Cabeçalho da carta */
.word-card h3 {
    margin-top: 0;
    font-size: 1.5em;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Caso queira adicionar detalhes extras, como uma "moldura interna" para simular texturas */
.word-card .card-content {
    position: relative;
    z-index: 1;
}

.popularity {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.popularity button {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    filter: grayscale(20%);
    transition: opacity 0.3s, filter 0.3s;
}

.popularity button:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.popularity button.active {
    opacity: 1;
    filter: grayscale(0%);
    box-shadow: 0 0 0 2px #007bff;
}

.easy {
    background-color: #2ecc71;
    color: white;
}

.medium {
    background-color: #f1c40f;
    color: white;
}

.hard {
    background-color: #e74c3c;
    color: white;
}

/* Sobrescrever regras para tabs e tab-content */
.tabs {
    display: flex;
    margin-top: 20px;
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    background-color: #222;
    border: 1px solid #444;
    border-bottom: none;
    color: #fff;
}

.tab.active {
    background-color: #333;
    border-bottom: 1px solid #333;
}

/* Sobrescrever para garantir que o conteúdo seja visível */
.tab-content {
    border: 1px solid #444;
    padding: 20px;
    background-color: #111;
    color: #fff;
    display: block !important;
}

/* Sobrescrever para garantir que o conteúdo ativo seja visível */
.tab-content.active {
    display: block !important;
}

.word-list {
    margin-top: 20px;
}

.word-item {
    display: flex;
    justify-content: space-between;
    padding: 2px;
}

.word-item button {
    margin-left: 10px;
}

.loading {
    display: none;
    font-size: 16px;
    color: #007bff;
    text-align: center;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading.show {
    display: flex;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #007bff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #222; /* Alterado de #fefefe para tom escuro */
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #444; /* Borda ajustada */
    width: 80%;
    max-width: 500px;
    color: #fff;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    color: #ccc; /* Alterado de #aaa */
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    z-index: 10;
}

.close:hover,
.close:focus {
    color: #fff; /* Alterado para manter contraste no fundo escuro */
    text-decoration: none;
    cursor: pointer;
}

/* Responsividade para o modal */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .close {
        font-size: 32px;
        right: 10px;
        top: 5px;
        width: 40px;
        height: 40px;
        line-height: 40px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 10px;
    }
    
    .close {
        font-size: 36px;
        right: 8px;
        top: 3px;
        width: 44px;
        height: 44px;
        line-height: 44px;
    }
}

.voice-selector {
    margin-bottom: 20px;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-form input {
    padding: 10px;
    font-size: 16px;
    background-color: #333; /* Fundo escuro para inputs */
    border: 1px solid #444;
    color: #fff;
}

.login-form button {
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.login-form button:hover {
    background-color: #0056b3;
}

.auth-controls {
    display: flex;
    justify-content: end;
    padding: 5px;
}

button {
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    font-size: 12px;
    border-radius: 5px;
    cursor: pointer;
    margin: 2px;
}

button:hover {
    background-color: #0056b3;
}

#logout-button {
    background-color: #e74c3c;
}

.swal2-container {
    z-index: 9990;
}
.swal2-shown {
    z-index: 9990;
}

.introjs-tooltip {
    color: black;
}

.suggestion-content {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

@media (max-width: 480px) {
    .suggestion-content {
        max-height: 50vh;
        padding: 8px;
    }

    .modal-footer button {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
    }
}

/* Estilos customizados para Toast Notifications */
.toast-custom-popup {
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Toast escuro para fundo escuro */
.swal2-toast.toast-custom-popup {
    background: rgba(40, 40, 40, 0.95) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Ícones do toast */
.toast-custom-popup .swal2-icon {
    border-radius: 50% !important;
}

/* Barra de progresso customizada */
.toast-custom-progress {
    background: rgba(0, 123, 255, 0.3) !important;
    border-radius: 0 0 16px 16px !important;
}

/* Sucesso - verde */
.toast-custom-popup.swal2-icon-success .toast-custom-progress {
    background: rgba(46, 204, 113, 0.4) !important;
}

/* Erro - vermelho */
.toast-custom-popup.swal2-icon-error .toast-custom-progress {
    background: rgba(231, 76, 60, 0.4) !important;
}

/* Info - azul */
.toast-custom-popup.swal2-icon-info .toast-custom-progress {
    background: rgba(52, 152, 219, 0.4) !important;
}

/* Warning - amarelo */
.toast-custom-popup.swal2-icon-warning .toast-custom-progress {
    background: rgba(241, 196, 15, 0.4) !important;
}

/* Título do toast */
.toast-custom-popup .swal2-title {
    font-size: 16px !important;
    font-weight: 500 !important;
}

/* Animação suave de entrada */
.swal2-toast.swal2-show {
    animation: slideInRight 0.3s ease-out !important;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
