/* ==========================================================================
   BASE.CSS — Biến màu sắc, Body, Dark Mode, Typography
   ========================================================================== */

/* BIẾN MÀU SẮC (SÁNG / TỐI TOÀN CỤC) */
:root {
    --primary-text: #2d3748; --bg-body: #f8fafc; --bg-card: #ffffff;
    --border-color: #e2e8f0; --btn-hover: #f1f5f9;
    --text-main: #111827; --text-sub: #6b7280;
    --vocab-highlight: #2563eb;
    --correct-bg: #f0fff4; --correct-border: #48bb78; --correct-text: #276749;
    --wrong-bg: #fff5f5; --wrong-border: #e53e3e; --wrong-text: #c53030;
    --selected-bg: #ebf8ff; --selected-border: #3182ce; --selected-text: #2b6cb0;
}

body.dark-mode {
    --primary-text: #f8fafc; --bg-body: #0f172a; --bg-card: #1e293b;
    --border-color: #334155; --btn-hover: #1e293b;
    --text-main: #f9fafb; --text-sub: #9ca3af;
    --vocab-highlight: #60a5fa;
    --correct-bg: #064e3b; --correct-border: #10b981; --correct-text: #a7f3d0;
    --wrong-bg: #7f1d1d; --wrong-border: #ef4444; --wrong-text: #fca5a5;
    --selected-bg: #1e3a8a; --selected-border: #3b82f6; --selected-text: #bfdbfe;
}

body { 
    font-family: 'Pretendard', sans-serif; 
    background: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%); 
    background-attachment: fixed;
    color: var(--primary-text); 
    transition: background-color 0.3s, color 0.3s; 
    
    /* Chống copy/highlight text trên desktop và mobile */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Cho phép bôi đen, copy ở các ô nhập liệu vì người dùng cần gõ chữ */
input, textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}
.container { 
    background-color: var(--bg-card); 
    border-color: var(--border-color); 
    max-width: 900px; 
    margin: 0 auto; 
    padding: 30px 40px; 
    box-sizing: border-box; 
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .container {
        margin: 0 15px; 
        padding: 20px 16px;
        border-radius: 16px;
        width: auto;
    }
}
@media (max-width: 600px) {
    .container {
        margin: 0 5px;
    }
}
.modal-content { background-color: var(--bg-card); color: var(--primary-text); }

/* ========== GLOBAL TYPOGRAPHY ========== */
body, .shared-text, .question-text, .option, .trans-content { word-break: keep-all !important; overflow-wrap: break-word !important; line-height: 1.85 !important; }


/* ==========================================================================
   FOOTER - CHÂN TRANG DÙNG CHUNG
   ========================================================================== */
.global-footer {
    margin-top: 60px;
    padding: 35px 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    text-align: center;
}

body.dark-mode .global-footer {
    background: rgba(15, 23, 42, 0.85);
    border-color: #334155;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    font-size: 1.3em;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

body.dark-mode .footer-logo {
    color: #f9fafb;
}

.footer-slogan {
    margin: 0;
    color: var(--text-sub);
    font-weight: 500;
    font-size: 0.95em;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95em;
}

body.dark-mode .footer-contact {
    color: #f9fafb;
}

.social-icon {
    color: #1877f2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.05);
    opacity: 0.9;
}
