:root {
    --primary-color: #ff6600;
    --bg-dark: #1a1a1a;
}

html {
    background-color: #333;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    margin: 0;
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Gallery 12 hình */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 5px;
    padding: 5px;
    height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

.gallery-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

/* Modal Fullscreen */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: white;
    z-index: 1000;
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    height: 100%;
}

.question {
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
}

/* Image Container & Overlay */
.image-container {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 6 / 19;
    overflow: hidden;
    border-radius: 10px;
}

#mainImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.cell {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.5s;
}

.cell.revealed {
    background: transparent;
    backdrop-filter: blur(0);
}

/* Hints & Inputs */
.hint-container {
    margin: 20px 0;
    font-size: 1.2rem;
    letter-spacing: 5px;
    font-weight: bold;
    color: #333;
    min-height: 1.5em; /* Giữ khoảng trống */
}

.input-group {
    width: 100%;
    text-align: center;
}

input {
    width: 80%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 25px;
    margin-bottom: 10px;
    outline: none;
}

.buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

button {
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: bold;
}

.btn-guess {
    background: #28a745;
}

.btn-hint {
    background: #ffc107;
    color: black;
}

.btn-skip {
    background: #6c757d;
}

#feedback {
    margin-top: 15px;
    font-weight: bold;
    min-height: 20px; /* Giữ khoảng trống cố định bên dưới theo yêu cầu */
}