:root {
    /* Cores principais */
    --primary-color: #3700FE;
    /* --primary-dark: #2B00C8; */
    --primary-light2: #dbeafe;
    --primary-ultra-light: #f0f7ff;
    
    /* Cores de feedback */
    --success-color: #059669;
    --success-dark: #047857;
    --success-light: #d1fae5;
    --success-text: #064e3b;
    
    --error-color: #dc2626;
    --error-dark: #b91c1c;
    --error-light: #fecaca;
    --error-text: #7f1d1d;
    
    --warning-color: #d97706;
    --warning-dark: #92400e;
    --warning-light: #fed7aa;
    --warning-text: #92400e;
    
    --info-color: #0891b2;
    --info-dark: #0e7490;
    --info-light: #cffafe;
    --info-text: #164e63;
    
    /* Cores neutras */
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --surface-secondary: #e2e8f0;
    
    /* Cores de texto */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    
    /* Cores de borda */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: #3b82f6;
    
    /* Cores específicas do jogo - estilo palavra cruzada clássica */
    --cell-empty: #000000;
    --cell-letter: #ffffff;
    --cell-letter-border: #000000;
    --cell-filled: #ffffff;
    --cell-filled-text: #000000;
    --cell-active: #ffeb3b;
    --cell-active-text: #000000;
    --cell-active-border: #fbc02d;
    --cell-highlight: #e3f2fd;
    --cell-highlight-text: #0d47a1;
    --cell-correct: #c8e6c9;
    --cell-correct-text: #1b5e20;
    --cell-correct-border: #4caf50;
    --cell-error: #ffcdd2;
    --cell-error-text: #c62828;
    --cell-error-border: #f44336;
    --cell-hint: #fff3e0;
    --cell-hint-text: #e65100;
    --cell-hint-border: #ff9800;
    
    /* Tipografia */
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 28px;
    
    /* Sombras e outros */
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--background);
    font-size: var(--font-size-base);
}

.palavracruzada-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    /* min-height: 100vh; */
}

/* === HEADER === */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 24px;
    background: none;
    /* border-radius: var(--border-radius); */
    /* box-shadow: var(--shadow); */
    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.titulo-atividade {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--neutral-800);
    margin: 0;
    line-height: 1.3;
}

.time-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: var(--surface-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    min-width: 80px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;

    button {
        font-size: var(--font-size-base);
        padding: 8px 12px;
        color: var(--neutral-800);
        background: white;
        box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
        border-radius: var(--border-radius);
    }
}

.header-options {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}

/* === CONTEÚDO PRINCIPAL === */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
    align-items: center;
}

/* === COLUNAS PRINCIPAIS === */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.right-column {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* === SEÇÃO DO ENUNCIADO === */
.enunciado-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.enunciado-content {
    font-size: var(--font-size-md);
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    /* white-space: pre-wrap; */
    word-wrap: break-word;
}

.enunciado-content:empty::before {
    content: "Enunciado não disponível";
    color: var(--text-muted);
    font-style: italic;
}

/* === SEÇÃO DA GRADE === */
.grid-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grid-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.crossword-grid {
    display: inline-grid;
    grid-template-columns: repeat(16, 32px);
    grid-template-rows: repeat(16, 32px);
    gap: 1px;
    background: none;
    border: none;
    border-radius: 4px;
    padding: 6px;
}

/* === CÉLULAS === */
.cell {
    background: var(--cell-empty);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-size-base);
    position: relative;
    cursor: default;
    user-select: none;
    transition: var(--transition);
    border-radius: 4px;
    color: var(--text-inverse);
    font-family: 'Arial', sans-serif;
}

.cell:hover {
    transform: none;
    z-index: 1;
}

.cell.letter {
    background: var(--cell-letter);
    border: 1px solid var(--cell-letter-border);
    color: var(--cell-filled-text);
    cursor: pointer;
}

.cell.letter:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    transform: scale(1.02);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cell.filled {
    background: var(--cell-filled);
    color: var(--cell-filled-text);
    border: 2px solid var(--cell-letter-border);
}

.cell.empty {
    background: none;
    cursor: default;
    color: var(--text-inverse);
    border: none;
}

.cell.empty:hover {
    transform: none;
}

.cell.active {
    background: var(--cell-active);
    color: var(--cell-active-text);
    border: 3px solid var(--cell-active-border);
    box-shadow: 0 0 0 2px rgba(251, 192, 45, 0.3), 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
    z-index: 3;
    font-weight: 900;
    outline: 5px solid rgba(45, 237, 251, 0.552);
}

.cell.word-highlight {
    background: var(--cell-highlight);
    color: var(--cell-highlight-text);
    border: 2px solid var(--info-color);
    box-shadow: inset 0 0 0 1px rgba(13, 71, 161, 0.2);
}

.cell.correct {
    background: var(--cell-correct);
    color: var(--cell-correct-text);
    border: 2px solid var(--cell-correct-border);
    animation: correctPulse 0.6s ease;
    font-weight: 900;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.cell.error {
    background: var(--cell-error);
    color: var(--cell-error-text);
    border: 2px solid var(--cell-error-border);
    animation: shake 0.4s ease-in-out;
    font-weight: 900;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.2);
}

.cell.hint {
    background: var(--cell-hint);
    color: var(--cell-hint-text);
    border: 3px solid var(--cell-hint-border);
    animation: hintGlow 1s ease;
    font-weight: 900;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

@keyframes hintGlow {
    0%, 100% { 
        box-shadow: 0 0 0 0 var(--warning-color);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(217, 119, 6, 0.3);
        transform: scale(1.05);
    }
}

.cell-number {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 9px;
    font-weight: 900;
    color: #000000;
    line-height: 1;
    pointer-events: none;
    text-shadow: none;
    font-family: 'Arial', sans-serif;
    z-index: 1;
}

/* Números em células especiais */
.cell.active .cell-number,
.cell.filled .cell-number,
.cell.correct .cell-number,
.cell.error .cell-number,
.cell.hint .cell-number,
.cell.word-highlight .cell-number {
    color: #000000;
    text-shadow: none;
    font-weight: 900;
}

/* === AÇÕES INFERIORES === */
.bottom-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.btn-large {
    /* padding: 16px 32px;
    font-size: var(--font-size-md);
    min-height: 52px;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2); */
}



/* === SEÇÃO DE DICAS === */
.clues-section {
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.clues-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
}

.clues-column {
    display: flex;
    flex-direction: column;
    min-height: 250px;
}

.clues-column:first-child {
    border-right: 1px solid var(--border);
}

.clues-column-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 16px 20px;
    background: var(--surface-secondary);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--primary-color);
}

.clues-column-header h3 {
    margin: 0;
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--neutral-800);
    letter-spacing: 0.05em;
}

.clues-column-header .material-symbols-outlined {
    font-size: 20px;
    color: var(--primary-color);
}

.clues-column-header .word-count {
    font-size: var(--font-size-xs);
    opacity: 0.7;
    font-weight: 500;
    margin-left: auto;
    background: var(--primary-light2);
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--primary-dark);
}

.clues-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    max-height: 400px;
}

.clues-list {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.clue-item {
    margin-bottom: 6px;
    padding: 8px 10px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.4;
    display: flex;

}

.clue-item:hover {
    background: var(--surface-hover);
    transform: translateX(3px);
    border-color: var(--primary-color);
}

.clue-item.active {
    background: var(--primary-light2);
    border: 4px solid var(--primary-color);
    transform: translateX(6px);
    color: var(--neutral-800);
    font-weight: 700;
}

.clue-item.completed {
    background: var(--success-light);
    border-color: var(--success-color);
    opacity: 0.9;
    color: var(--success-text);
}

.clue-item.completed .clue-text {
    text-decoration: line-through;
    opacity: 0.7;
}

.clue-number {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 6px;
    min-width: 16px;
    display: inline-block;
    font-size: var(--font-size-xs);
}

.clue-item.active .clue-number {
    color: var(--primary-color);
}

.clue-item.completed .clue-number {
    color: var(--success-color);
}

.clue-text {
    color: inherit;
    font-weight: 400;
    font-size: var(--font-size-base);
    word-wrap: break-word;
    hyphens: auto;
}

/* === CONTROLES === */

.btn {
    /* padding: 12px 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: var(--font-size-sm);
    min-height: 40px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
    text-transform: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); */
}

.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:hover {
    /* transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); */
}

.btn:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background-color: #e5e7eb !important;
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.btn:disabled:before {
    display: none;
}

/* Variações de botões */
.btn-primary {
    /* background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    border-color: var(--primary-color); */
}

.btn-primary:hover:not(:disabled) {
    /* background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
    border-color: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4); */
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
    color: var(--text-inverse);
    border-color: var(--success-color);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--success-dark) 0%, #047857 100%);
    border-color: var(--success-dark);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}
/* 
.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
} */

/* .btn-hint {
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-dark) 100%);
    color: var(--text-inverse);
    border-color: var(--warning-color);
}

.btn-hint:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--warning-dark) 0%, #92400e 100%);
    border-color: var(--warning-dark);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
} */

/* .btn-clear {
    background: linear-gradient(135deg, var(--error-color) 0%, var(--error-dark) 100%);
    color: var(--text-inverse);
    border-color: var(--error-color);
}

.btn-clear:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--error-dark) 0%, #991b1b 100%);
    border-color: var(--error-dark);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
} */

/* Botões com ícones */
.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: var(--border-radius);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 16px;
    min-height: auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.btn-icon:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.btn-icon:hover:before {
    width: 100%;
    height: 100%;
}

.btn-icon:hover:not(:disabled) {
    background: var(--surface);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.btn-icon:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

.btn-icon.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.btn-icon.active:before {
    background: rgba(255, 255, 255, 0.1);
}

/* Estados especiais de botões icon */
.btn-icon.sound-on {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border-color: #059669;
}

.btn-icon.sound-off {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border-color: #6b7280;
}

.btn-icon.auto-validation-on {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    border-color: #7c3aed;
}

/* Ícones Material Symbols */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

/* Ícones nos botões */
.btn .material-symbols-outlined {
    font-size: 18px;
}

.btn-icon .material-symbols-outlined {
    font-size: 20px;
}

/* Ícones em elementos específicos */
.clues-tab .material-symbols-outlined {
    font-size: 16px;
}

.time-display .material-symbols-outlined {
    font-size: 16px;
}

/* Ícones nos atalhos */
.shortcuts-list .material-symbols-outlined {
    font-size: 12px;
}

/* === MENSAGENS === */
.message-container {
    margin-top: 12px;
}

.message {
    padding: 10px 12px;
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    font-weight: 500;
    border: 2px solid transparent;
    animation: slideInDown 0.3s ease;
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.message.success {
    background: var(--success-light);
    color: var(--success-text);
    border-color: var(--success-color);
}

.message.error {
    background: var(--error-light);
    color: var(--error-text);
    border-color: var(--error-color);
}

.message.info {
    background: var(--info-light);
    color: var(--info-text);
    border-color: var(--info-color);
}

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

/* === ATALHOS DE TECLADO === */
.keyboard-shortcuts {
    padding: 12px;
    background: var(--surface-secondary);
    border-radius: var(--border-radius);
    font-size: var(--font-size-xs);
    border: 1px solid var(--border);
}

.shortcuts-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: var(--font-size-xs);
}

.shortcuts-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.shortcuts-list span {
    color: var(--text-secondary);
    padding: 1px 0;
    font-size: var(--font-size-xs);
}

kbd {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1px 3px;
    font-size: 10px;
    font-family: monospace;
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideInUp 0.3s ease;
    border: 1px solid var(--border);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--primary-ultra-light);
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: var(--font-size-xl);
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    cursor: pointer;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--error-light);
    color: var(--error-color);
}

.modal-body {
    padding: 20px;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.help-section {
    margin-bottom: 20px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: var(--font-size-md);
}

.help-section ul {
    margin: 0;
    padding-left: 16px;
}

.help-section li {
    margin-bottom: 4px;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.help-section p {
    margin: 0 0 8px 0;
    font-size: var(--font-size-sm);
}

/* === TOAST === */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 10px 16px;
    border-radius: var(--border-radius);
    color: var(--text-inverse);
    font-weight: 500;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    font-size: var(--font-size-sm);
}

.toast.success {
    background: var(--success-color);
    border-color: var(--success-dark);
}

.toast.error {
    background: var(--error-color);
    border-color: var(--error-dark);
}

.toast.info {
    background: var(--info-color);
    border-color: var(--info-dark);
}

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

/* === ESTADO VAZIO === */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state h3 {
    color: var(--text-primary);
    margin: 12px 0 8px;
    font-size: var(--font-size-lg);
}

.empty-state p {
    font-size: var(--font-size-sm);
}

/* === UTILITÁRIOS === */
.hidden {
    display: none;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.scale-in {
    animation: scaleIn 0.3s ease;
}

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

/* === INPUT MÓVEL === */
.mobile-input {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 16px !important; /* Previne zoom no iOS */
    z-index: -1 !important;
}

/* Indicador visual para dispositivos móveis */
.mobile-input-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 1000;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.mobile-input-indicator.show {
    display: block;
}

/* Estilo específico para touch devices */
@media (hover: none) and (pointer: coarse) {
    .cell.letter {
        position: relative;
    }
    
    .cell.letter:focus {
        outline: 3px solid var(--cell-active-border);
        outline-offset: 2px;
    }
    
    /* Feedback visual aprimorado para móvel */
    .cell.letter:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* === RESPONSIVIDADE === */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .left-column {
        order: 2;
    }
    
    .right-column {
        order: 1;
    }
    
    .clues-columns {
        grid-template-columns: 1fr;
    }
    
    .clues-column:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .clues-column {
        min-height: 300px;
    }
    
    .clues-content {
        max-height: 250px;
    }
    
    .enunciado-section {
        padding: 20px;
    }
    
    .enunciado-content {
        font-size: var(--font-size-base);
    }
}

@media (max-width: 768px) {
    .palavracruzada-container {
        padding: 8px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 12px 16px;
        margin-bottom: 16px;
    }
    
    .header-left {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        width: 100%;





    }
    
    .header-options {
        border-left: none;
        border-top: 1px solid var(--border);
        margin-left: 0;
        padding-left: 0;
        padding-top: 8px;
        margin-top: 8px;
        justify-content: center;
    }
    
    .titulo-atividade {
        font-size: var(--font-size-lg);
        text-align: center;
        word-break: break-word;
        hyphens: auto;
    }
    
    .time-display {
        font-size: var(--font-size-sm);
        padding: 6px 10px;
        min-width: 70px;
    }
    
    .crossword-grid {
        grid-template-columns: repeat(16, 24px);
        grid-template-rows: repeat(16, 24px);
        padding: 4px;
        gap: 1px;
    }
    
    .cell {
        font-size: var(--font-size-sm);
    }
    
    .cell-number {
        font-size: 7px;
        top: 0px;
        left: 1px;
    }
    
    .clues-columns {
        grid-template-columns: 1fr;
    }
    
    .clues-column:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .clues-content {
        min-height: 200px;
        max-height: 300px;
        padding: 12px;
    }
    
    .enunciado-section {
        padding: 16px;
    }
    
    .enunciado-content {
        font-size: var(--font-size-sm);
        line-height: 1.5;
    }

}

@media (max-width: 480px) {
    .palavracruzada-container {
        padding: 4px;
    }
    
    .game-header {
        gap: 8px;
        padding: 8px 12px;
        margin-bottom: 12px;
    }
    
    .header-left {
        gap: 6px;
    }
    
    .header-controls {
        gap: 4px;
    }
    
    .header-options {
        gap: 4px;
        padding-top: 6px;
        margin-top: 6px;
    }
    
    .titulo-atividade {
        font-size: var(--font-size-md);
        line-height: 1.2;
    }
    
    .time-display {
        font-size: var(--font-size-xs);
        padding: 4px 6px;
        min-width: 55px;
        gap: 4px;
    }
    
    .time-display .material-symbols-outlined {
        font-size: 16px;
    }
    
    .crossword-grid {
        grid-template-columns: repeat(16, 20px);
        grid-template-rows: repeat(16, 20px);
        padding: 3px;
        gap: 1px;
    }
    
    .cell {
        font-size: var(--font-size-xs);
    }
    
    .cell-number {
        font-size: 6px;
        top: 0px;
        left: 1px;
    }
    
    .modal-content {
        margin: 8px;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 12px;
    }
    
    .modal-header h2 {
        font-size: var(--font-size-lg);
    }
    
    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .btn-icon .material-symbols-outlined {
        font-size: 18px;
    }
    
    .btn {
        min-height: 36px;
        padding: 8px 12px;
        gap: 4px;
        font-size: var(--font-size-xs);
    }
    
    .btn .material-symbols-outlined {
        font-size: 16px;
    }
    
    .controls {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .controls-row {
        gap: 6px;
    }
    
    .enunciado-section {
        padding: 12px;
    }
    
    .enunciado-content {
        font-size: var(--font-size-xs);
        line-height: 1.4;
    }
}

/* === SMARTPHONES EM MODO PAISAGEM === */
@media (max-width: 768px) and (max-height: 480px) and (orientation: landscape) {
    .game-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 16px;
        gap: 8px;
    }
    
    .header-left {
        flex-direction: row;
        gap: 12px;
        align-items: center;
        width: auto;
    }
    
    .header-controls {
        flex-direction: row;
        gap: 6px;
        width: auto;
    }
    
    .header-options {
        border-left: 1px solid var(--border);
        border-top: none;
        margin-left: 8px;
        padding-left: 8px;
        margin-top: 0;
        padding-top: 0;
    }
    
    .titulo-atividade {
        font-size: var(--font-size-md);
        text-align: left;
    }
}

/* === MODO ESCURO (para acessibilidade futura) === */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --surface: #1e293b;
        --surface-hover: #334155;
        --surface-secondary: #475569;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --border: #334155;
        --border-light: #475569;
    }
    
    .cell.letter {
        background: #334155;
    }
    
    .cell-number {
        text-shadow: 0 0 2px var(--surface);
    }
} 