/* style.css */
body {
    background: linear-gradient(to right, #2D6A4F, #40916C, #52B788);
    color: #333;
    font-family: 'Arial', sans-serif;
}

.container {
    margin-top: 50px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 15px;
    padding: 25px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.word-card {
    margin: auto;
    max-width: 600px; /* Limit card width */
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid #D8F3DC;
    cursor: pointer; /* Indicate it's clickable */
}

.word-card:hover {
    transform: scale(1.03); /* Effect when hovering over card */
    box-shadow: 0 8px 20px rgba(45, 106, 79, 0.25);
}

.show-answer-text {
    font-size: 18px;
    font-weight: bold;
    color: #71b1f5; /* Bootstrap primary color */
    cursor: pointer; /* Indicate it's clickable */
}

.footer-buttons {
    display: flex;
    justify-content: center;
}

.btn-back {
    background-color: #6c757d;
    color: white;
    margin: 10px 0;
    width: 100%;
}

.btn-large {
    padding: 14px 20px; /* Larger buttons */
    font-size: 18px; 
    border-radius: 8px; /* Rounded button corners */
}

/* Additional styles for the reveal-answer text */
.reveal-answer {
    font-size: 24px; /* Bigger for visibility */
    color: #28a745; /* Bootstrap success color */
}

.total-score {
	color: #af075d !important;
    text-shadow: -1px -1px 0 #ffffff, 1px -1px 0 #ffffff, -1px 1px 0 #ffffff, 1px 1px 0 #ffffff;
	-webkit-text-stroke: 1px #ffffff;
}

.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

#wordsModal .modal-xl {
    max-width: 90%;
}

#wordsModal .table {
    margin-bottom: 0;
}

#wordsModal .modal-body {
    padding: 0;
}


#wordsModal .btn .ti {
    font-size: 1.1rem;
    line-height: 1;
    vertical-align: middle;
}

#wordsModal .btn {
    padding: 0.25rem 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer {
    position: relative;
    bottom: 0;
    width: 100%;
    font-size: 0.8rem;
    color: #717171;
    margin-top: 2rem;
}

.footer a {
    color: #888;
}

.footer a:hover {
    color: #666;
}

.btn-success {
    background-color: #2D6A4F;
    border-color: #2D6A4F;
}

.btn-success:hover {
    background-color: #1B4332;
    border-color: #1B4332;
}


.search-filter-container {
    margin: 0 auto 20px;
    flex-wrap: wrap;
}
  
.search-container {
    flex: 1;
    min-width: 250px;
}

.book-filter {
width: 150px;
}

.book-filter .form-select {
height: 100%;
border-color: #ced4da;
}

.book-filter .form-select:focus {
border-color: #40916C;
box-shadow: 0 0 0 0.25rem rgba(64, 145, 108, 0.25);
}

.search-container .input-group-text {
background-color: #40916C;
color: white;
border-color: #40916C;
}

.search-container .form-control:focus {
border-color: #40916C;
box-shadow: 0 0 0 0.25rem rgba(64, 145, 108, 0.25);
}

.search-container .btn-outline-secondary {
border-color: #ced4da;
color: #6c757d;
}

.search-container .btn-outline-secondary:hover {
background-color: #f8f9fa;
}

/* เพิ่ม CSS สำหรับ Choice Game */
.choices-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 550px;
    margin: 0 auto;
}

/* ปรับแต่งปุ่มตัวเลือก */
.choice-btn {
    padding: 15px;
    font-size: 1.1rem;
    text-align: left;
    white-space: normal;
    height: auto;
    min-height: 60px;
    border-radius: 10px;
    transition: all 0.2s ease;
    background-color: white; /* พื้นหลังสีขาว */
    color: #2b4056; /* ตัวหนังสือสีเทาเข้ม */
    border: 1px solid #ced4da !important; /* กรอบสีเทาอ่อน */
}

.choice-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* เมื่อตอบถูก */
.choice-btn.btn-success {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
    font-weight: bold;
}

/* เมื่อตอบผิด */
.choice-btn.btn-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
    font-weight: bold;
}

/* ตัวเลือกที่ถูกเลือก (กรณีที่ยังไม่ได้ตรวจสอบคำตอบ) */
.choice-btn.btn-primary {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
    font-weight: bold;
}

/* ตัวเลือกอื่นที่ไม่ได้เลือกหลังจากตอบแล้ว */
.choice-btn:disabled {
    opacity: 0.75;
    background-color: white; /* ยังคงเป็นพื้นหลังสีขาว */
    color: #6c757d; /* สีตัวหนังสือจางลงเล็กน้อย */
    border: 1px solid #dee2e6 !important; /* กรอบสีอ่อนลง */
}

/* ปรับให้แสดงผลได้ดีบนอุปกรณ์มือถือ */
@media (max-width: 576px) {
    .choices-container {
        grid-template-columns: 1fr;
    }
    
    .choice-btn {
        font-size: 1rem;
        padding: 12px;
        min-height: 50px;
    }
}

/* ปุ่มไปข้อถัดไปแบบสีเขียว gradient */
.btn-next-gradient {
    background: linear-gradient(to right, #0b536e, #076d69, #52b7b5);
    /* background: radial-gradient(circle, #2d596a, #1c684f, #52b7b5); */
    /* background: radial-gradient(circle, rgba(144,98,4,1) 0%, rgba(189,132,15,1) 70%, rgba(245,206,127,1) 100%); */
    color: white;
    font-weight: bold;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(45, 106, 79, 0.2);
}

.btn-next-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(45, 106, 79, 0.3);
    background: linear-gradient(to right, #1B4332, #2D6A4F, #40916C);
    color: white;
}

.btn-next-gradient:active {
    transform: translateY(1px);
    box-shadow: 0 2px 3px rgba(45, 106, 79, 0.2);
}


/* รายการเกมในโมดัล */
#gamesListModal .list-group-item {
    transition: all 0.2s ease;
}

#gamesListModal .list-group-item:hover {
    background-color: #f5f5f5;
}

#gamesListModal .list-group-item.active {
    background-color: #e6f7ff;
    border-color: #91d5ff;
    color: #1890ff;
}