/* --- 1. สไตล์หน้าจอโดยรวม (จาก game.css) --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
    color: #333;
    text-align: center;
    margin: 0;
}

/* --- 2. สไตล์จาก index.html (Modal, Form) --- */

.form-container { 
    background: white; 
    padding: 2rem; 
    border-radius: 8px; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    display: none; /* ซ่อนไว้ก่อน */
    width: 90%;
    max-width: 400px;
}

.form-container h1 { text-align: center; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; text-align: left; }
.form-group select, .form-group input[type="text"] { 
    width: 100%; 
    padding: 0.5rem; 
    border-radius: 4px; 
    border: 1px solid #ccc; 
    box-sizing: border-box; 
}
.form-container button { 
    width: 100%; 
    padding: 0.75rem; 
    border: none; 
    border-radius: 4px; 
    background-color: #ccc; 
    color: white; 
    font-size: 1rem; 
}
.form-container button:enabled { 
    background-color: #007bff; 
    cursor: pointer; 
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #F5EFE6;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    text-align: left;
}

.modal-content h2 {
    text-align: center;
    margin-top: 0;
    color: #5D4037;
}

.modal-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.modal-content button {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 1rem;
    background-color: #007bff;
    cursor: pointer;
    margin-top: 1rem;
}


/* --- 3. สไตล์จาก game.html (Popcat) --- */

.wrapper {
    background: #ffffff;
    padding: 2rem 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
}

#countlabel {
    font-size: 5rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 1rem;
    display: block;
}

#popcat {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 1.5rem;
    -webkit-user-drag: none;
    user-select: none;
    cursor: pointer; /* ⭐️ เพิ่ม cursor รูปมือ ชี้ว่าคลิกได้ */
}

/* ⭐️ (สไตล์ #btn, #btn:hover, #btn:active ถูกลบออกทั้งหมด) */


#finish-button {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    width: 100%;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background-color 0.2s ease;
}

#finish-button:hover {
    background-color: #218838;
}

/* ⭐️ [แก้ไข] ลบ #btn:disabled ออก */
#finish-button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
}

/* --- 4. ⭐️ สไตล์สำหรับหน้า Poster (ใหม่) ⭐️ --- */
.poster-container {
    padding: 2rem;
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
}

.poster-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 1.5rem;
}

.poster-container a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.poster-container a:hover {
    background-color: #0056b3;
}