/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: 'Lato', sans-serif;
    color: #3a3a3a;
    background-color: #fff4f4;
}

/* Header */
header {
    text-align: center;
    margin: 30px 0;
}

header h1 {
    font-size: 2.5rem;
    color: #e0707c; /* Coral */
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 0 6px rgba(240, 160, 160, 0.3);
}

/* Intro */
.intro {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fef0f8; /* soft lavender-pink */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(204, 179, 255, 0.3);
    color: #3a3a3a;
    font-size: 1.1rem;
    line-height: 1.8;
}

.intro h2 {
    font-size: 1.8rem;
    color: #b66caa;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
}

.intro ul {
    list-style-type: disc;
    margin-left: 20px;
}

.intro li {
    margin-bottom: 10px;
}

/* Sudoku Grid */
#sudoku-grid {
    width: 40%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(180, 200, 255, 0.4);
    table-layout: fixed;
}

#sudoku-grid td {
    padding: 10px;
    border: 2px solid #d0b3ff; /* Lavender blue borders */
    text-align: center;
    vertical-align: middle;
    height: 60px;
    width: 60px;
    background-color: #faf7ff;
    transition: transform 0.2s ease;
}

#sudoku-grid td:hover {
    transform: scale(1.05);
    background-color: #f1eaff;
}

/* Input fields */
input {
    width: 100%;
    height: 100%;
    font-size: 1.2rem;
    text-align: center;
    border: 1px solid #c7b7ff;
    background-color: #fefcff;
    color: #3a3a3a;
    border-radius: 5px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

input:disabled {
    background-color: #e8e1ff;
    color: #888;
}

input:focus {
    outline: none;
    background-color: #fcefff;
    border-color: #b69eff;
}

/* Timer */
#timer {
    font-size: 1.5rem;
    text-align: center;
    margin-top: 20px;
    font-weight: bold;
    color: #b66caa;
}

/* Controls */
#controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

#controls button,
#controls select {
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(194, 155, 255, 0.3);
}

#controls button {
    background-color: #ffa3c8;
    color: #fff;
    border: none;
}

#controls button:hover {
    background-color: #ff7db7;
    transform: scale(1.05);
}

#controls select {
    background-color: #fef0f8;
    color: #3a3a3a;
    border: 1px solid #dabfff;
    padding: 10px;
    border-radius: 5px;
}

#controls select:hover {
    transform: scale(1.05);
}

#difficulty-badge {
    font-size: 1.1rem;
    font-weight: bold;
    color: #7a4fa0; /* soft purple */
    margin-left: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    background-color: #f5eaff;
    box-shadow: 0 0 5px rgba(120, 80, 160, 0.2);
    transition: all 0.3s ease;
}


/* Mobile */
@media (max-width: 768px) {
    #sudoku-grid {
        width: 90%;
    }

    #controls {
        flex-direction: column;
        gap: 10px;
    }

    #controls button,
    #controls select {
        width: 100%;
    }

    .intro {
        padding: 15px;
        margin-top: 20px;
    }

    header h1 {
        font-size: 2rem;
    }
}

/* Error Counter */
#errors {
    text-align: center;
    margin-top: 10px;
    font-size: 1.2rem;
    color: #da6c8f;
    font-weight: bold;
}

/* Hint Button */
#hint {
    background-color: #c4b5fd;
    color: #fff;
    border: none;
}

#hint:hover {
    background-color: #a78bfa;
    transform: scale(1.05);
}

/* Modal Popup */
#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(80, 0, 60, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

#modal.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: #fff0f8;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(255, 160, 180, 0.4);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #b66caa;
}

.modal-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #3a3a3a;
}

#modal-close {
    background-color: #ffa3c8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#modal-close:hover {
    background-color: #ff7db7;
    transform: scale(1.05);
}
