/* ════════════════════════════════════════════════════════════════
   DAILY CATHOLIC GAME — Cathedral-Themed Redesign
   ════════════════════════════════════════════════════════════════ */

:root {
    /* ── Cathedral Palette ── */
    --primary-color: #1a1a2e;
    --primary-dark: #0f0f1e;
    --primary-light: #2d2d4a;
    --secondary-color: #f5f0e8;
    --accent-color: #c9a84c;
    --accent-light: #e0cc8a;
    --accent-glow: rgba(201, 168, 76, 0.25);
    --liturgical: #6a1b9a;
    --liturgical-light: #9c4dcc;

    --text-color: #2c2c3a;
    --text-muted: #7a7a8e;
    --text-on-dark: #e8e4dc;

    --background-color: #faf8f0;
    --card-bg: #ffffff;
    --error-color: #c0392b;
    --success-color: #4a7c59;
    --present-color: #c9a84c;
    --absent-color: #6b6b7b;

    --font-display: 'Cinzel', serif;
    --font-heading: 'Merriweather', serif;
    --font-body: 'Roboto', sans-serif;

    --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
    --shadow-md: 0 4px 20px rgba(26, 26, 46, 0.10);
    --shadow-lg: 0 12px 40px rgba(26, 26, 46, 0.16);
    --shadow-gold: 0 4px 20px rgba(201, 168, 76, 0.18);

    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    background: var(--background-color);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(106, 27, 154, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, #faf8f0 0%, #f0ebe0 100%);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    line-height: 1.6;
}

/* ════════════════════════════════════════════════════════════════
   USER BAR
   ════════════════════════════════════════════════════════════════ */

.user-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-on-dark);
    z-index: 2000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.4s var(--transition);
    border-bottom: 2px solid var(--accent-color);
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.user-bar-inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-size: 0.9rem;
}

.user-bar-greeting {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.95;
    font-weight: 400;
}

.user-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-bar-btn {
    background: rgba(201, 168, 76, 0.15);
    border: 1px solid rgba(201, 168, 76, 0.35);
    color: var(--accent-light);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all var(--transition);
    min-width: 38px;
    min-height: 38px;
    justify-content: center;
}

.user-bar-btn:hover {
    background: rgba(201, 168, 76, 0.3);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.sign-out-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-on-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 18px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font-body);
    font-weight: 500;
    transition: all var(--transition);
    min-height: 38px;
}

.sign-out-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ════════════════════════════════════════════════════════════════
   AUTH SCREEN
   ════════════════════════════════════════════════════════════════ */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    animation: fadeIn 0.7s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: var(--radius-lg);
    padding: 44px 38px;
    width: 100%;
    max-width: 430px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative gold top line */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 0 0 4px 4px;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-cross {
    font-size: 3.2rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    text-shadow: 0 2px 12px rgba(201, 168, 76, 0.3);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.auth-header h1 {
    font-family: var(--font-display);
    color: var(--primary-color);
    font-size: 1.65rem;
    margin: 0 0 6px;
    letter-spacing: 0.5px;
}

.auth-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* Form Inputs */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-align: left;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0dbd0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: rgba(250, 248, 240, 0.6);
    color: var(--text-color);
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
    color: #aaa;
}

/* Auth Error */
.auth-error {
    background: #fdf0ef;
    color: var(--error-color);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 16px;
    border: 1px solid #f0c6c2;
    text-align: left;
    animation: shake 0.35s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Auth Buttons */
.auth-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(26, 26, 46, 0.25);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(26, 26, 46, 0.35);
}

.auth-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 22px 0;
    gap: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d0ccc0, transparent);
}

.auth-divider span {
    color: #aaa;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Google Button */
.google-btn {
    background: white;
    color: #555;
    border: 2px solid #e0dbd0;
    box-shadow: var(--shadow-sm);
}

.google-btn:hover:not(:disabled) {
    background: #faf8f0;
    border-color: #c0bbb0;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.google-icon {
    flex-shrink: 0;
}

/* Auth Toggle Link */
.auth-toggle {
    margin-top: 22px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.auth-toggle strong {
    color: var(--accent-color);
    transition: color var(--transition);
}

.auth-toggle:hover strong {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════════
   MAIN APP CONTAINER
   ════════════════════════════════════════════════════════════════ */

.container {
    width: 100%;
    max-width: 640px;
    padding: 24px;
    padding-top: 68px; /* space for user bar */
    text-align: center;
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    animation: fadeIn 0.5s ease;
    position: relative;
}

/* Gold accent top border */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--liturgical), var(--accent-color));
}

header h1 {
    font-family: var(--font-display);
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    letter-spacing: 1px;
}

header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0;
    font-style: italic;
}

/* ════════════════════════════════════════════════════════════════
   GAME AREA
   ════════════════════════════════════════════════════════════════ */

.game-area {
    padding: 24px 16px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #eee8d8 100%);
    margin: 20px 0;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(201, 168, 76, 0.15);
    box-shadow: var(--shadow-sm);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-on-dark);
    border: none;
    padding: 16px 34px;
    font-size: 1.05rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-body);
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(26, 26, 46, 0.25);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.primary-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(201, 168, 76, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(26, 26, 46, 0.35);
}

.primary-btn:hover::after {
    width: 300px;
    height: 300px;
}

.primary-btn:active {
    transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════════════════════════ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(26, 26, 46, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 4% auto;
    padding: 28px 24px;
    border: none;
    width: 90%;
    max-width: 620px;
    border-radius: var(--radius-lg);
    position: relative;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.35s ease-out;
}

/* Gold accent top for modals */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 0 0 4px 4px;
}

@keyframes modalSlideIn {
    from { transform: translateY(40px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-content h2 {
    font-family: var(--font-display);
    color: var(--primary-color);
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.close-btn,
.close-leaderboard-btn,
.close-edit-profile-btn,
.close-weekly-btn {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

.close-btn:hover,
.close-leaderboard-btn:hover,
.close-edit-profile-btn:hover,
.close-weekly-btn:hover {
    color: var(--primary-color);
    background: var(--secondary-color);
}

.readings-container {
    text-align: left;
    margin-top: 20px;
}

.reading-section {
    margin-bottom: 28px;
    border-bottom: 1px solid #ebe6da;
    padding-bottom: 20px;
}

.reading-section:last-child {
    border-bottom: none;
}

.reading-section h3 {
    color: var(--primary-color);
    font-family: var(--font-heading);
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.reading-section p {
    line-height: 1.7;
    color: #444;
    font-size: 0.95rem;
}

footer {
    margin-top: auto;
    padding: 24px 0 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid #ebe6da;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

footer::before {
    content: '✝';
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* ════════════════════════════════════════════════════════════════
   GAME BOARD & TILES
   ════════════════════════════════════════════════════════════════ */

.board-container {
    display: grid;
    grid-gap: 6px;
    margin-bottom: 20px;
}

.tile {
    width: clamp(48px, 11vw, 58px);
    height: clamp(48px, 11vw, 58px);
    border: 2px solid #d0ccc0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: bold;
    text-transform: uppercase;
    user-select: none;
    border-radius: 6px;
    background: var(--card-bg);
    transition: border-color 0.15s;
}

.tile.filled {
    border-color: #8a8680;
    animation: pop 0.12s;
}

.tile.correct {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
    animation: flip 0.5s;
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.3);
}

.tile.present {
    background-color: var(--present-color);
    color: white;
    border-color: var(--present-color);
    animation: flip 0.5s;
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
}

.tile.absent {
    background-color: var(--absent-color);
    color: white;
    border-color: var(--absent-color);
    animation: flip 0.5s;
}

/* ════════════════════════════════════════════════════════════════
   KEYBOARD
   ════════════════════════════════════════════════════════════════ */

.keyboard-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 520px;
    padding: 0 4px;
}

.key-row {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 5px;
}

.key {
    background: linear-gradient(180deg, #e8e4dc 0%, #d8d4cc 100%);
    border-radius: 8px;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    font-weight: 600;
    height: clamp(52px, 12vw, 60px);
    flex: 1;
    text-transform: uppercase;
    touch-action: manipulation;
    user-select: none;
    transition: all 0.15s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.key:hover {
    background: linear-gradient(180deg, #d8d4cc 0%, #c8c4bc 100%);
    transform: translateY(-1px);
}

.key:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.key.wide {
    flex: 1.5;
    font-size: clamp(0.7rem, 2vw, 0.85rem);
}

.key.correct {
    background: linear-gradient(180deg, var(--success-color), #3d6b4c);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.3);
}

.key.present {
    background: linear-gradient(180deg, var(--present-color), #b89940);
    color: white;
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
}

.key.absent {
    background: linear-gradient(180deg, var(--absent-color), #5a5a6a);
    color: white;
}

/* ════════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════════ */

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

@keyframes flip {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}

@keyframes staggerFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.message-container {
    min-height: 32px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* ════════════════════════════════════════════════════════════════
   RESULTS CARD
   ════════════════════════════════════════════════════════════════ */

.results-container {
    padding: 20px 0;
    animation: scaleIn 0.5s ease;
}

.results-card {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ece4d4 100%);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(201, 168, 76, 0.2);
}

.results-card h2 {
    font-family: var(--font-display);
    color: var(--primary-color);
    margin: 0 0 6px;
    font-size: 1.45rem;
    letter-spacing: 0.5px;
}

.results-subtitle {
    color: var(--text-muted);
    margin: 0 0 24px;
    font-size: 0.95rem;
}

.results-scores {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: var(--radius);
    padding: 18px 22px;
    min-width: 85px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition);
}

.score-item:hover {
    transform: translateY(-2px);
}

.score-item.score-total {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    box-shadow: var(--shadow-md);
}

.score-item.score-total .score-label,
.score-item.score-total .score-value {
    color: white;
}

.score-item.score-total .score-value {
    color: var(--accent-light);
}

.score-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.score-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary-color);
}

.results-details {
    margin-top: 16px;
}

.results-word {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 8px;
}

.results-status {
    font-size: 1rem;
    margin: 6px 0;
}

/* ════════════════════════════════════════════════════════════════
   MCQ SECTION
   ════════════════════════════════════════════════════════════════ */

.mcq-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 32px 24px;
    background: linear-gradient(135deg, #fff 0%, var(--secondary-color) 100%);
    border: 2px solid rgba(201, 168, 76, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-gold);
    animation: mcqFadeIn 0.6s ease;
}

@keyframes mcqFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.mcq-container h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.1rem;
    line-height: 1.55;
    margin: 0 0 24px;
    text-align: left;
}

.mcq-container::before {
    content: '📖 Readings Question';
    display: block;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    counter-reset: option-counter;
}

/* MCQ option buttons */
.option-btn {
    display: block;
    width: 100%;
    padding: 14px 18px 14px 48px;
    background: white;
    border: 2px solid #e0dbd0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    color: var(--text-color);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition);
    line-height: 1.45;
    position: relative;
    counter-increment: option-counter;
    animation: staggerFadeIn 0.4s ease backwards;
}

.option-btn:nth-child(1) { animation-delay: 0.05s; }
.option-btn:nth-child(2) { animation-delay: 0.1s; }
.option-btn:nth-child(3) { animation-delay: 0.15s; }
.option-btn:nth-child(4) { animation-delay: 0.2s; }

.option-btn::before {
    content: counter(option-counter, upper-alpha);
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.option-btn:hover {
    background: var(--secondary-color);
    border-color: var(--accent-color);
    transform: translateX(4px);
    box-shadow: 0 3px 12px rgba(201, 168, 76, 0.15);
}

.option-btn:hover::before {
    background: var(--accent-color);
    color: white;
}

/* ════════════════════════════════════════════════════════════════
   WEEKLY SCORE BANNER
   ════════════════════════════════════════════════════════════════ */

.weekly-score-banner {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ece4d4 100%);
    border-radius: var(--radius);
    padding: 3px;
    margin: 0 0 16px;
    animation: fadeIn 0.5s ease;
    border: 1px solid rgba(201, 168, 76, 0.15);
}

.weekly-score-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: white;
    border-radius: 11px;
    box-shadow: var(--shadow-sm);
}

.weekly-score-left {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.weekly-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    font-weight: 600;
}

.weekly-total {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.weekly-pts {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.weekly-details-btn {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 1px solid #e0dbd0;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font-body);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
}

.weekly-details-btn:hover {
    background: var(--primary-color);
    color: var(--text-on-dark);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* ════════════════════════════════════════════════════════════════
   WEEKLY STATS MODAL
   ════════════════════════════════════════════════════════════════ */

.weekly-modal-content {
    max-width: 480px;
}

.weekly-date-range {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: -4px 0 20px;
}

.weekly-chart {
    margin: 16px 0 20px;
}

.weekly-day-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0ebe0;
}

.weekly-day-row:last-child {
    border-bottom: none;
}

.weekly-day-row.today {
    background: var(--secondary-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin: 0 -12px;
    border-bottom-color: transparent;
}

.weekly-day-label {
    width: 40px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
    flex-shrink: 0;
}

.weekly-day-row.today .weekly-day-label {
    color: var(--accent-color);
}

.weekly-bar-container {
    flex: 1;
    display: flex;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0ebe0;
    gap: 2px;
}

.weekly-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    transition: width 0.6s ease;
    min-width: 0;
}

.wordle-bar {
    background: linear-gradient(90deg, var(--success-color), #5a9068);
    color: white;
}

.mcq-bar {
    background: linear-gradient(90deg, var(--present-color), #d4b85e);
    color: white;
}

.empty-bar {
    background: #ece6da;
    width: 100%;
}

.missed-bar {
    background: #f0ebe0;
    color: #ccc;
    font-size: 0.75rem;
    width: 100%;
}

.weekly-score-label {
    width: 36px;
    text-align: right;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    flex-shrink: 0;
}

.weekly-score-label.future {
    color: #ddd;
    font-weight: 400;
}

.weekly-score-label.missed {
    color: #ccc;
    font-weight: 400;
}

/* Weekly summary footer */
.weekly-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 0;
    border-top: 2px solid var(--accent-color);
    margin-top: 8px;
}

.weekly-summary-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.weekly-summary-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Legend */
.weekly-chart::after {
    content: '🟩 Wordle  🟨 MCQ';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ════════════════════════════════════════════════════════════════
   LEADERBOARD MODAL
   ════════════════════════════════════════════════════════════════ */

.leaderboard-modal-content {
    max-width: 500px;
}

.leaderboard-list {
    margin-top: 16px;
}

.leaderboard-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 30px 0;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #faf8f0;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.leaderboard-row:nth-child(1) {
    background: linear-gradient(135deg, #fdf5e0, #faecc8);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-gold);
}

.leaderboard-row:nth-child(2) {
    background: linear-gradient(135deg, #f5f5f0, #ebe8e0);
    border-color: #d0ccc0;
}

.leaderboard-row:nth-child(3) {
    background: linear-gradient(135deg, #faf0e8, #f0e0d0);
    border-color: #dfc8b0;
}

.leaderboard-row.current-user {
    border: 2px solid var(--liturgical);
    background: linear-gradient(135deg, #f3e5f5, #ede7f6);
}

.leaderboard-rank {
    width: 34px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.leaderboard-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.leaderboard-score {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--accent-color);
    flex-shrink: 0;
    min-width: 48px;
    text-align: right;
}

/* ════════════════════════════════════════════════════════════════
   EDIT PROFILE MODAL
   ════════════════════════════════════════════════════════════════ */

.edit-profile-modal-content {
    max-width: 420px;
}

.edit-profile-modal-content label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.edit-profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.edit-profile-actions .auth-btn {
    flex: 1;
}

/* ════════════════════════════════════════════════════════════════
   WEEKLY HOMILY CHALLENGE
   ════════════════════════════════════════════════════════════════ */

.homily-section {
    margin: 30px 0 20px;
    animation: fadeIn 0.5s ease;
}

.homily-card {
    background: linear-gradient(135deg, #fff 0%, var(--secondary-color) 50%, #ece4d4 100%);
    border: 2px solid rgba(201, 168, 76, 0.2);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: 0 6px 28px rgba(26, 26, 46, 0.1);
    position: relative;
}

/* Decorative top accent */
.homily-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 0 0 4px 4px;
}

.homily-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

.homily-icon {
    font-size: 34px;
    color: var(--accent-color);
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow-sm);
}

.homily-header h2 {
    font-family: var(--font-display);
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
    letter-spacing: 0.5px;
}

.homily-presider {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 4px 0 0;
}

.homily-theme {
    font-style: italic;
    color: var(--primary-color);
    font-size: 0.93rem;
    line-height: 1.55;
    margin: 0 0 16px;
    padding: 14px 18px;
    background: rgba(201, 168, 76, 0.08);
    border-radius: 10px;
    border-left: 3px solid var(--accent-color);
}

.homily-question {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-size: 1.02rem;
    line-height: 1.55;
    margin: 0 0 20px;
}

/* Homily MCQ Options */
.homily-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.homily-option-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    background: white;
    border: 2px solid #e0dbd0;
    border-radius: 12px;
    font-size: 0.93rem;
    font-family: var(--font-body);
    color: var(--text-color);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition);
    line-height: 1.45;
}

.homily-option-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    border-color: var(--accent-color);
    transform: translateX(4px);
    box-shadow: 0 3px 12px rgba(201, 168, 76, 0.12);
}

.homily-option-btn.correct {
    background: #e8f5e9;
    border-color: var(--success-color);
    color: #2e7d32;
    font-weight: 600;
}

.homily-option-btn.incorrect {
    background: #fdf0ef;
    border-color: var(--error-color);
    color: var(--error-color);
}

/* Homily Result Badge */
.homily-result-badge {
    text-align: center;
    margin-bottom: 16px;
    animation: mcqFadeIn 0.5s ease;
}

.homily-result-badge.correct {
    color: var(--accent-color);
}

.homily-result-badge.incorrect {
    color: var(--error-color);
}

.homily-result-text {
    text-align: center;
    font-size: 1.02rem;
    color: var(--text-color);
    margin: 0 0 20px;
    line-height: 1.55;
}

/* Homily Video */
.homily-video-container {
    margin-top: 16px;
    animation: mcqFadeIn 0.4s ease;
}

.homily-video {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    background: #000;
}

.video-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Watch Full Homily Button */
.homily-watch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    margin-top: 16px;
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    color: var(--primary-color);
    font-size: 0.93rem;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.homily-watch-btn:hover {
    background: var(--primary-color);
    color: var(--text-on-dark);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26, 26, 46, 0.25);
}

/* Homily Loading */
.homily-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 0;
    color: var(--text-muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0dbd0;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Unavailable */
.homily-unavailable-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.93rem;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ════════════════════════════════════════════════════════════════
   WORDLE SCORING RULES
   ════════════════════════════════════════════════════════════════ */

.scoring-rules {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-sm);
}

.scoring-rules h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
}

.scoring-rules ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 13px;
    justify-content: center;
}

.scoring-rules li {
    color: var(--text-color);
}

.scoring-rules strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — 3 BREAKPOINTS
   ════════════════════════════════════════════════════════════════ */

/* Tablet & smaller desktops */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }

    .modal-content {
        width: 94%;
        margin: 3% auto;
        padding: 24px 20px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .container {
        box-shadow: none;
        min-height: 100vh;
        max-width: 100%;
        border-radius: 0;
        padding: 16px;
        padding-top: 64px;
    }

    .container::before {
        border-radius: 0;
    }

    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 92vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        animation: slideUp 0.35s ease-out;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .auth-card {
        padding: 32px 22px;
        border-radius: var(--radius);
    }

    .game-area {
        padding: 16px 10px;
        margin: 16px 0;
    }

    .keyboard-container {
        gap: 4px;
    }

    .key-row {
        gap: 4px;
    }

    .key {
        border-radius: 6px;
    }

    .primary-btn {
        width: 100%;
        padding: 16px 24px;
    }

    .user-bar-inner {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .results-scores {
        gap: 10px;
    }

    .score-item {
        padding: 14px 16px;
        min-width: 75px;
    }

    .mcq-container {
        padding: 24px 18px;
    }

    .option-btn {
        padding: 13px 16px 13px 44px;
        font-size: 0.92rem;
    }

    .homily-card {
        padding: 22px 18px;
    }

    .leaderboard-row {
        padding: 12px 12px;
    }

    .weekly-score-inner {
        padding: 12px 14px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .weekly-details-btn {
        width: 100%;
        justify-content: center;
    }

    footer {
        padding: 20px 0 12px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .tile {
        width: 42px;
        height: 42px;
        font-size: 1.4rem;
    }

    .key {
        height: 48px;
        font-size: 0.8rem;
    }

    .key.wide {
        font-size: 0.65rem;
    }

    .auth-card {
        padding: 28px 18px;
    }

    .results-scores {
        flex-direction: column;
        align-items: center;
    }

    .score-item {
        width: 100%;
        max-width: 200px;
    }

    header h1 {
        font-size: 1.3rem;
    }
}
