/* Word Search - Blue Theme */
:root {
    --primary-color: #1D3461;
    --primary-hover: #2E4A7A;
    --hero-gradient-start: rgba(29, 52, 97, 0.1);
    --hero-gradient-end: rgba(46, 74, 122, 0.1);
    --section-bg-start: rgba(29, 52, 97, 0.05);
    --section-bg-end: rgba(46, 74, 122, 0.05);
    --primary-shadow: rgba(29, 52, 97, 0.3);
    --feature-shadow: rgba(29, 52, 97, 0.15);
    --focus-shadow: rgba(29, 52, 97, 0.25);
    --mode-shadow: rgba(29, 52, 97, 0.2);
    --btn-shadow: rgba(29, 52, 97, 0.4);
    --summary-bg-start: rgba(29, 52, 97, 0.1);
    --summary-bg-end: rgba(46, 74, 122, 0.05);
    --accordion-icon-filter: invert(16%) sepia(29%) saturate(2110%) hue-rotate(191deg) brightness(95%) contrast(95%);
    --btn-text-color: #ffffff;
}

/* Wordsearch Grid */
.wordsearch-grid {
    display: inline-grid;
    gap: 2px;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 0 auto 2rem;
    max-width: 100%;
}

.grid-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 800px;
    display: flex;
    justify-content: center;
}

.grid-cell {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 0.25rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.grid-cell:hover {
    background: var(--section-bg-start);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.grid-cell.selecting {
    background: #ffc107;
    border-color: #ffc107;
    color: white;
}

.grid-cell.found {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    cursor: default;
}

.grid-cell.found:hover {
    transform: none;
}

.grid-cell.revealed {
    background: #ffc107;
    border-color: #ffc107;
    color: white;
    cursor: default;
}

.grid-cell.revealed:hover {
    transform: none;
}

/* Current Word Display */
.current-word-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--section-bg-start);
    border-radius: 0.75rem;
    border: 2px solid var(--primary-color);
}

.current-word-label {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.current-word-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    min-height: 2.5rem;
}

.btn-clear-word {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-clear-word:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

/* Words List Below Grid - 3 Columns */
.words-list-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    border: 2px solid #e9ecef;
}

.words-list-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.words-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.word-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.word-item.found {
    color: #28a745;
    text-decoration: line-through;
    background: rgba(40, 167, 69, 0.1);
}

.word-item.not-found {
    color: #ffc107;
    text-decoration: line-through;
    background: rgba(255, 193, 7, 0.1);
}

.word-item.not-placed {
    color: #6c757d;
    text-decoration: line-through;
    background: rgba(108, 117, 125, 0.1);
    font-style: italic;
}

/* Difficulty Pills */
.pill-option {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 1rem;
    padding: 2rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.pill-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px var(--primary-shadow);
}

.pill-option.selected {
    border-color: var(--primary-color);
    background: var(--section-bg-start);
    box-shadow: 0 4px 15px var(--primary-shadow);
}

/* Paused Overlay */
.paused-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.paused-content {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.paused-content h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    max-width: 450px;
    margin: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

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

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-message {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-modal {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-modal-cancel {
    background: #6c757d;
    color: white;
}

.btn-modal-confirm {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 15px var(--primary-shadow);
}

.btn-modal-warning {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
    .grid-cell {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .grid-cell {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .words-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .grid-cell {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

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

    .current-word-text {
        font-size: 1.5rem;
    }
}

.game-stats {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1rem;
}

.game-stats .stat-card {
    flex: 1;
    min-width: 0;
}

.step.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.step.clickable:hover {
    transform: scale(1.05);
}

.step.clickable:hover .step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step.locked {
    cursor: not-allowed;
    opacity: 0.5;
}

.step.locked:hover {
    transform: none;
}
