/* ========== Reset Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* ========== Global Layout (Desktop Only) ========== */
body {
    background-color: #f4f4f4;
    color: #333;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* ========== Global Typography ========== */
h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #222;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #444;
}

/* ========== QR Code Styling (Index Page) ========== */
/* ✅ Center QR Code for Index Page */
#qr-container-index {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    width: 250px;
    height: 250px;
}

#qr-code-index {
    width: 200px;
    height: 200px;
}

/* ✅ Position QR Code in Chatroom Corner */
#qr-container-chatroom {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    width: 120px;
    height: 120px;
}

#qr-code-chatroom {
    width: 100px;
    height: 100px;
}

/* ========== Chatroom (Desktop Only) ========== */
#chat {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 1000px;
    margin: auto;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
}

#chat_display {
    width: 100%;
    min-height: 500px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
    overflow-y: auto;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

/* ========== Buttons ========== */
button {
    font-size: 1.1rem;
    padding: 12px 24px;
    margin: 10px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
    background-color: #007bff;
    color: white;
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ========== Typing & Speaking Pages (Mobile Only) ========== */
.speaking_box,
#typing_box {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    margin: auto;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
}

#chat_box, #type_chat_box {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: #f9f9f9;
}

#send-button, #speak-button {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* ========== Hide Mobile-Only Pages on Desktop ========== */
@media (min-width: 801px) {
    .speaking_box, #typing_box {
        display: none; /* Hides these pages on larger screens */
    }
}

/* ========== Hide Desktop-Only Pages on Mobile ========== */
@media (max-width: 800px) {
    #chat, #qr-container {
        display: none; /* Hides these pages on smaller screens */
    }
}