body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23e0e0e0"/><circle cx="20" cy="20" r="5" fill="%23d0d0d0"/><circle cx="50" cy="40" r="7" fill="%23d0d0d0"/><circle cx="80" cy="25" r="6" fill="%23d0d0d0"/><circle cx="30" cy="70" r="8" fill="%23d0d0d0"/><circle cx="70" cy="75" r="5" fill="%23d0d0d0"/></svg>');
}

.game-container {
    text-align: center;
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 90%;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.game-info {
    margin-bottom: 20px;
}

.status {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    background-color: #e0e0e0;
    color: #333;
}

.timer {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.scores {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.score {
    font-size: 18px;
    font-weight: bold;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 5px;
    margin: 30px auto;
    max-width: 400px;
    background-color: #8d6e63;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cell {
    aspect-ratio: 1;
    background-color: #8bc34a;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
}

.cell:hover {
    background-color: #7cb342;
    transform: translateY(-2px);
}

.cell.selected {
    background-color: #aed581;
    transform: scale(0.95);
}

.cell.found {
    background-color: #c8e6c9;
    color: #2e7d32;
}

.word-input {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#word-input {
    padding: 12px 20px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    width: 200px;
    text-align: center;
    text-transform: uppercase;
}

#word-input:focus {
    outline: none;
    border-color: #8bc34a;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #1976D2;
}

#submit-word {
    background-color: #4caf50;
}

#submit-word:hover {
    background-color: #388e3c;
}

#clear-selection {
    background-color: #ff9800;
}

#clear-selection:hover {
    background-color: #f57c00;
}

#hint-btn {
    background-color: #9c27b0;
}

#hint-btn:hover {
    background-color: #7b1fa2;
}

.found-words, .word-list {
    margin: 20px 0;
    text-align: left;
}

.found-words h3, .word-list h3 {
    margin-bottom: 10px;
    color: #333;
}

#found-words-list, #word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 50px;
}

.word-item {
    padding: 5px 10px;
    background-color: #e0e0e0;
    border-radius: 15px;
    font-size: 14px;
}

.word-item.found {
    background-color: #c8e6c9;
    color: #2e7d32;
}

.controls {
    margin: 20px 0;
}

.instructions {
    margin-top: 20px;
    padding: 15px;
    background-color: #e3f2fd;
    border-radius: 8px;
    text-align: left;
}

.instructions h3 {
    margin-top: 0;
    color: #1976d2;
}

.instructions p {
    margin: 10px 0;
    color: #555;
}

@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }
    
    .status {
        font-size: 20px;
    }
    
    .scores {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-board {
        max-width: 90%;
        padding: 5px;
        gap: 3px;
    }
    
    .cell {
        font-size: 20px;
    }
    
    .word-input {
        flex-direction: column;
        align-items: center;
    }
    
    #word-input {
        width: 80%;
        margin-bottom: 10px;
    }
    
    button {
        padding: 10px 15px;
        font-size: 14px;
    }
}