/* Reset CSS mặc định */
/* header */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.content {
    padding: 20px;
}

.content .container {
    max-width: 800px;
}

.content h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.content p {
    font-size: 16px;
    line-height: 1.5;
}

/* ------------------------------------------------------- */
/* Layout 3 cột trang chu */
.main-content {
    display: flex;
    gap: 50px;
    padding: 40px;
}

.sidebar {
    width: 16%;
}

.game-list {
    flex: 1;
}

/* Khung quảng cáo */
.ad-box {
    background: white;
    border: 1px solid #ddd;
    min-height: 250px;
    margin-bottom: 20px;
    padding: 15px;
    text-align: center;
}

/*--------------------------------------/*
/* Card game */
.game-list {
    flex: 1;
}

/* ------------------------------------ */
.do-kho {
    display: flex;
    height: 8%;
}

.do-kho-nho {
    padding-left: 2%;
}

.do-kho-nho a {
    text-decoration: none;
    color: black;
}

.do-kho-nho a.active {
    color: white;
    background: #3b61b5;
    padding: 6px 12px;
    border-radius: 6px;
}

.game-card-left {
    width: 35%;
    /* margin-top: 50px; */
}

.khung-sudoku {
    border: 3px solid black;
    /* width: 100%; */
    aspect-ratio: 1 / 1;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

#board {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
}


.cell {
    width: 100%;
    height: 100%;
    border: 1px solid #cfd4dc;
    text-align: center;
    font-size: 36px;
    outline: none;
    caret-color: transparent;
    position: relative;
    background: #fff8d6;
    transition: background 0.3s;
}

/* Ô đã điền đúng */
.cell.filled {
    background: white;
}

.cell::after {
    content: "";

    position: absolute;
    inset: 0;

    background: transparent;

    pointer-events: none;

    transition: background .4s;
}

.cell.note-removed::after {
    background: red;
}

.notes {
    position: absolute;
    inset: 2px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);

    font-size: 16px;
    color: red;
}

.notes div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fixed {
    background: white;
    /* font-weight: ; */
    color: rgb(34, 34, 34);
}

/* ------------------------------------ */
.game-card-right {
    border: 1px solid #ddd;
    width: 25%;
    aspect-ratio: 1 / 1;
    border: none;
}


.number-pad button {
    margin: 0.5px;
    height: 120px;
    width: 100px;
    background: #edf1f7;
    font-size: 48px;
    color: #3b61b5;
    border: none;
    outline: none;
}

.number-pad button:disabled {
    margin: 0.5px;
    height: 120px;
    width: 100px;
    opacity: 0.4;
    font-size: 48px;
    background: #ccc;
    color: #159b34;
    cursor: not-allowed;
}

.number-pad button.disabled {
    transform: none;
}

.top-num {
    height: 10%;
}

.top-info {
    height: 10%;
    display: flex;
    /* margin-bottom: 20px; */
}

.mistakes {
    width: 15%;
    /* padding-left: 5%; */
}

.but-chi {
    border: none;
    border-radius: 15px;
    /* bo góc */

    background: #4a90e2;
    /* màu nền */
    color: white;
    /* màu chữ */

    /* font-size: 30px; */
    font-weight: bold;

    cursor: pointer;
    transform: scale(0.95);
    background: #2c5aa0;
    padding-left: 5%;
    padding-right: 5%;
    height: 80%;
}

#pencil-btn.active {
    background: #b1182a;
    color: white;
}

.xoa {
    width: 20%;
    height: 80%;

    border: none;
    border-radius: 15px;
    /* bo góc */

    background: #4a90e2;
    /* màu nền */
    color: white;
    /* màu chữ */

    /* font-size: 30px; */
    font-weight: bold;

    cursor: pointer;
    transform: scale(0.95);
    background: #2c5aa0;
    margin-right: 5%;
}


.wrong {
    background: #ffebee;
    color: red !important;
}

.correct {
    color: #3b61b5 !important;
}



.new-game {
    width: 85%;
    margin-top: 15px;
    height: 30px;
    background: #5f80c8;
    font-size: 18px;
    color: white;
}

.new-game a {
    text-decoration: none;
    color: #fff;
    /* font-size: 16px; */
}

/* ------------------------------------ */
/* game function*/
.selected {
    background: #138aec !important;
}

.highlight {
    background: #99d0f7 !important;
}

.same-number {
    background: #138aec !important;
}


.xoa:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.win-popup {
    display: none;

    position: fixed;
    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.5);

    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.win-box {
    width: 400px;

    background: white;

    border-radius: 20px;

    padding: 30px;

    text-align: center;

    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

.win-box h2 {
    color: #2e7d32;
    margin-bottom: 20px;
}

.win-buttons {
    margin-top: 25px;
}

.win-buttons button {
    margin: 5px;
    padding: 10px 18px;

    border: none;
    border-radius: 10px;

    background: #3b61b5;
    color: white;

    cursor: pointer;
}

.new-game {
    margin-top: 25px;
}

.new-game button {
    margin: 5px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;

    background: #3b61b5;
    color: white;

    cursor: pointer;
}

/* ------------------------------------ */
.articles {
    /* width: 60%; */
    margin: 60px auto;
    padding-left: 18%;
    padding-right: 18%;
}

.articles p {
    font-size: 20px;
}

.articles h2 {
    color: red;
}