﻿:root {
    --pad: 14px;
    --gap: 10px;
    --btnh: 44px;
}
/* Make word links look clickable */

.viewer a.word-link {
    text-decoration: none; /* Remove underline by default */
    color: #1f6feb; /* Blue color to indicate it's clickable */
    cursor: pointer;
    border-bottom: 1px dotted #1f6feb; /* Subtle dotted underline */
    padding: 1px 2px;
    border-radius: 2px;
    transition: all 0.15s ease;
}

    .viewer a.word-link:hover {
        background: rgba(31, 111, 235, 0.15); /* Light blue background on hover */
        border-bottom: 1px solid #1f6feb; /* Solid underline on hover */
    }

.hl {
    background: none;
    padding: 0 1px;
}

.viewer a.word-link:hover .hl {
    background: rgba(59, 130, 246, 0.25); /* Light blue highlight on hover */
    border-radius: 2px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, Segoe UI, Roboto, Arial;
    background: #f6f7fb;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--pad);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 5;
}

.toolbar {
    display: flex;
    gap: var(--gap);
}

.btn {
    height: var(--btnh);
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    display: inline-flex;
}

    .btn.primary {
        background: #1f6feb;
        color: #fff;
        border-color: #1f6feb;
    }

main {
    padding: var(--pad);
}

.panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: var(--pad);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--gap);
}

.viewer-wrap {
    position: relative;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fafafa;
    overflow: hidden;
    min-height: 520px;
}

.viewer-header {
    font-weight: 700;
    text-align: center;
    padding: 10px;
    border-bottom: 1px dashed #d1d5db;
    font-family: ui-monospace, Consolas, monospace;
}

.viewer {
    font-family: ui-monospace, Consolas, monospace;
    white-space: pre;
    line-height: 1.3;
    padding: var(--pad);
    overflow: auto;
    height: 440px;
}

.page-info {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 12px;
    color: #374151;
}

.question {
    margin-top: var(--gap);
    padding: 12px;
    border-radius: 10px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0c4a6e;
}

.status {
    font-size: 12px;
    color: #6b7280;
    margin-left: 8px;
}

.vline {
    white-space: pre;
}
/* === MODAL MESSAGE BOX / OVERLAYS === */

.msg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.msg-dialog {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    max-width: 420px;
    width: 90%;
    padding: 16px 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
}
/* The normal appearance of the word */

.highlight-word {
    color: black; /* Initial text color */
    cursor: pointer; /* Changes the cursor to a hand icon */
    transition: color 0.3s ease; /* Smooth transition for the color change */
    text-decoration: none; /* Ensure no underline if you want only a color change */
}
    /* The appearance when the user hovers over it */

    .highlight-word:hover {
        color: red; /* The color it changes to on hover */
        background-color: yellow; /* You can also change the background */
        text-decoration: underline; /* Add an underline on hover */
    }

.msg-text {
    white-space: pre-wrap;
    margin-bottom: 14px;
    color: #111827;
    font-size: 14px;
}

.msg-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.hidden {
    display: none !important;
}
/* =========================== Glassmorphism Login Theme (scoped to body.login-page) =========================== */

body.login-page {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    font-family: system-ui, Segoe UI, Roboto, Arial;
    color: #fff;
    background: radial-gradient(1200px 800px at 20% 20%, rgba(120, 100, 255, 0.45), transparent 60%), radial-gradient(1000px 700px at 80% 30%, rgba(0, 200, 255, 0.35), transparent 55%), radial-gradient(900px 700px at 60% 90%, rgba(255, 0, 140, 0.25), transparent 55%), #0b1020;
    overflow: hidden;
    position: relative;
}

    body.login-page::before, body.login-page::after {
        content: "";
        position: absolute;
        width: 460px;
        height: 460px;
        border-radius: 50%;
        filter: blur(50px);
        opacity: 0.55;
        z-index: 0;
    }

    body.login-page::before {
        top: -140px;
        left: -160px;
        background: rgba(120, 100, 255, 0.55);
    }

    body.login-page::after {
        bottom: -160px;
        right: -180px;
        background: rgba(0, 200, 255, 0.45);
    }

.login-wrap {
    width: min(420px, 92vw);
    padding: 24px;
    z-index: 1;
}

.glass-card {
    padding: 28px 26px 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.login-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 750;
    letter-spacing: 0.2px;
}

.login-label {
    display: block;
    margin: 14px 0 6px;
    color: rgba(255,255,255,0.85);
    font-size: 0.92rem;
}

.login-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    outline: none;
}

    .login-input:focus {
        border-color: rgba(255, 255, 255, 0.35);
        box-shadow: 0 0 0 3px rgba(120, 100, 255, 0.22);
    }

.login-btn {
    width: 100%;
    margin-top: 18px;
    padding: 12px 12px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
    color: #081018;
    font-weight: 750;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.75));
}

    .login-btn:hover {
        filter: brightness(1.03);
    }

.login-error {
    margin-top: 12px;
    color: #ff6b6b;
    font-size: 0.95rem;
}

.login-note {
    margin-top: 12px;
    color: rgba(255,255,255,0.72);
    font-size: 13px;
}

/* Account page layout tweaks (keeps same look as index) */
.panel.account {
    grid-template-columns: 1fr; /* override 1fr auto */
}

.form-card {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fafafa;
    padding: var(--pad);
    max-width: 720px;
}

.form-row {
    margin-top: var(--gap);
}

    .form-row label {
        display: block;
        font-size: 12px;
        color: #374151;
        margin-bottom: 6px;
    }

    .form-row input {
        width: 100%;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid #d1d5db;
        background: #fff;
        outline: none;
    }

        .form-row input:focus {
            border-color: #1f6feb;
            box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
        }
