.app-container-crossword {
    max-width: 900px;
}

.crossword-layout {
    display: flex;
    gap: 30px;
    width: 100%;
    align-items: flex-start;
}

.grid-container {
    display: grid;
    gap: 2px;
    background: #4a4a4a;
    padding: 4px;
    border-radius: 8px;
    flex-shrink: 0;
    margin: 0 auto;
    box-shadow: var(--shadow-light);
}

.cw-cell {
    width: 40px;
    height: 40px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    text-transform: uppercase;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cw-cell.empty {
    background: transparent;
    pointer-events: none;
}

.cw-cell .cell-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.6rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: #666;
    line-height: 1;
}

.cw-cell.active {
    background: #fff3cd; /* highlighting current cell */
}

.cw-cell.active-word {
    background: #e2e8f0; /* highlighting current word line */
}

.cw-cell.correct {
    color: var(--success-green);
    background: #e6ffed;
}

.cw-cell.wrong {
    color: var(--secondary-coral);
    background: #ffebe9;
    animation: shake 0.3s cubic-bezier(.36,.07,.19,.97) both;
}

.clues-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(255,255,255,0.7);
    padding: 20px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-light);
    max-height: 500px;
    overflow-y: auto;
}

.clues-section h3 {
    margin: 0 0 10px 0;
    color: var(--accent-blue);
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    font-size: 1.1rem;
    border-bottom: 2px dashed rgba(0,0,0,0.1);
    padding-bottom: 5px;
}

.clues-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clues-list li {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 5px;
    transition: background 0.2s;
    display: flex;
    gap: 8px;
}

.clues-list li:hover {
    background: rgba(0,0,0,0.05);
}

.clues-list li.active-clue {
    background: #fff3cd;
    color: #856404;
    font-weight: 800;
}

.clue-num {
    font-weight: 800;
    color: var(--secondary-coral);
}

.clue-solved {
    text-decoration: line-through;
    opacity: 0.5;
}

/* Mobile specific styling */
#hidden-mobile-input {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
}

@media (max-width: 800px) {
    .crossword-layout {
        flex-direction: column;
        align-items: center;
    }
    
    .cw-cell {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
    
    .clues-container {
        width: 100%;
        max-height: 250px;
    }
    
    #mobile-keyboard {
        display: flex !important;
        margin-top: 15px;
        justify-content: center;
        width: 100%;
    }
    
    .mobile-input-row {
        display: flex;
        gap: 10px;
    }
    
    #hidden-mobile-input {
        width: 50px;
        height: 50px;
        opacity: 1;
        position: relative;
        text-align: center;
        font-size: 1.5rem;
        font-family: 'Poppins', sans-serif;
        text-transform: uppercase;
        border: 2px solid var(--accent-blue);
        border-radius: 8px;
    }
}
