* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    text-align: center;
    background-color: #34495e;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

h1 {
    margin-bottom: 20px;
    color: #ecf0f1;
    font-size: 2.5em;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.grid-container {
    display: inline-block;
    border: 3px solid #7f8c8d;
    border-radius: 10px;
    overflow: hidden;
    background-color: #95a5a6;
}

.grid {
    display: grid;
    grid-template-columns: repeat(28, 20px);
    grid-template-rows: repeat(28, 20px);
    gap: 1px;
    background-color: #7f8c8d;
}

.cell {
    width: 20px;
    height: 20px;
    background-color: #ecf0f1;
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.cell:hover {
    background-color: #bdc3c7;
}

.cell.filled {
    background-color: #2c3e50;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clear-btn {
    background-color: #e74c3c;
}

.clear-btn:hover {
    background-color: #c0392b;
}

.guess-btn {
    background-color: #27ae60;
}

.guess-btn:hover {
    background-color: #229954;
}

.result {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 12px 24px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 8px;
    min-width: 60px;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.instructions {
    margin-top: 20px;
    font-size: 14px;
    color: #bdc3c7;
    max-width: 600px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(28, 12px);
        grid-template-rows: repeat(28, 12px);
    }

    .cell {
        width: 12px;
        height: 12px;
    }

    h1 {
        font-size: 2em;
    }

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