/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.game-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 15px;
}

.game-title i {
    color: #667eea;
}

.header-stats {
    display: flex;
    gap: 30px;
    align-items: center;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

/* Game Area */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Level Selection */
.level-selection {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.level-selection h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #4a5568;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.level-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.level-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.level-card p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.level-info {
    display: flex;
    justify-content: space-around;
    font-size: 0.9rem;
}

.level-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Game Board */
.game-board {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.game-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    height: 100%;
}

.board-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.word-grid {
    display: grid;
    gap: 2px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.grid-cell {
    width: 35px;
    height: 35px;
    background: white;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 5px;
    user-select: none;
}

.grid-cell:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.grid-cell.selected {
    background: #667eea;
    color: white;
    border-color: #5a67d8;
    transform: scale(1.05);
}

.grid-cell.found {
    background: #48bb78;
    color: white;
    border-color: #38a169;
}

/* Células que são encontradas mas estão sendo selecionadas novamente */
.grid-cell.found.selected {
    background: linear-gradient(135deg, #48bb78 0%, #667eea 100%);
    color: white;
    border-color: #5a67d8;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.words-list {
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
}

.words-list h3 {
    margin-bottom: 15px;
    color: #4a5568;
}

.words-list ul {
    list-style: none;
}

.words-list li {
    padding: 8px 12px;
    margin: 5px 0;
    background: white;
    border-radius: 8px;
    transition: all 0.2s ease;
    border-left: 4px solid #e2e8f0;
}

.words-list li.found {
    background: #c6f6d5;
    border-left-color: #48bb78;
    text-decoration: line-through;
    opacity: 0.7;
}

.verse-display {
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
}

.verse-display h4 {
    margin-bottom: 10px;
    color: #4a5568;
}

.verse-display p {
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 10px;
}

.verse-display span {
    font-weight: 600;
    color: #667eea;
}

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    color: #4a5568;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-content h2 i {
    color: #f6ad55;
}

.victory-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
}

.victory-stat {
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-actions .btn {
    flex: 1;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
}

.footer i {
    color: #f56565;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        order: -1;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .game-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .game-title {
        font-size: 1.8rem;
    }
    
    .header-stats {
        gap: 15px;
    }
    
    .level-grid {
        grid-template-columns: 1fr;
    }
    
    .game-board {
        padding: 20px;
    }
    
    .grid-cell {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.5rem;
    }
    
    .grid-cell {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.level-card,
.game-board,
.modal-content {
    animation: fadeIn 0.5s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.grid-cell.found {
    animation: pulse 0.5s ease;
}

/* Seleção de texto personalizada */
::selection {
    background: rgba(102, 126, 234, 0.3);
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
}



/* Estilos para Conquistas e Notificações */
.achievement-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    z-index: 1002;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInUp 0.5s ease-out forwards;
    opacity: 0;
}

.achievement-notification i {
    font-size: 2em;
}

.achievement-notification h3 {
    margin: 0;
    font-size: 1.2em;
}

.achievement-notification p {
    margin: 0;
    font-size: 0.9em;
}

@keyframes slideInUp {
    from { transform: translateX(-50%) translateY(100%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
}

.achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    text-align: left;
}

.achievement-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.achievement-card.locked {
    opacity: 0.6;
    filter: grayscale(100%);
}

.achievement-card.unlocked {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.achievement-card .achievement-icon {
    font-size: 2.5em;
    color: #667eea;
}

.achievement-card.unlocked .achievement-icon {
    color: #4CAF50;
}

.achievement-card .achievement-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: #333;
}

.achievement-card .achievement-details p {
    margin: 0;
    font-size: 0.85em;
    color: #666;
}

.achievement-card .achievement-status {
    margin-left: auto;
    font-weight: 600;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.achievement-card.unlocked .achievement-status {
    color: #4CAF50;
}

.achievement-card .achievement-status i {
    font-size: 1.2em;
}

.progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    height: 8px;
    margin-top: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    font-size: 0.75em;
    color: #555;
    margin-left: 5px;
}

.header-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-btn i {
    font-size: 1.1em;
}




/* Estilos para Conquistas e Notificações */
.achievement-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    z-index: 1002;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInUp 0.5s ease-out forwards;
    opacity: 0;
}

.achievement-notification i {
    font-size: 2em;
}

.achievement-notification h3 {
    margin: 0;
    font-size: 1.2em;
}

.achievement-notification p {
    margin: 0;
    font-size: 0.9em;
}

@keyframes slideInUp {
    from { transform: translateX(-50%) translateY(100%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
}

.achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    text-align: left;
}

.achievement-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.achievement-card.locked {
    opacity: 0.6;
    filter: grayscale(100%);
}

.achievement-card.unlocked {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.achievement-card .achievement-icon {
    font-size: 2.5em;
    color: #667eea;
}

.achievement-card.unlocked .achievement-icon {
    color: #4CAF50;
}

.achievement-card .achievement-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: #333;
}

.achievement-card .achievement-details p {
    margin: 0;
    font-size: 0.85em;
    color: #666;
}

.achievement-card .achievement-status {
    margin-left: auto;
    font-weight: 600;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.achievement-card.unlocked .achievement-status {
    color: #4CAF50;
}

.achievement-card .achievement-status i {
    font-size: 1.2em;
}

.progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    height: 8px;
    margin-top: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    font-size: 0.75em;
    color: #555;
    margin-left: 5px;
}

.header-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-btn i {
    font-size: 1.1em;
}


