/* Login / Home gradient background */
.bg-login {
    background: linear-gradient(135deg, #0071e3 0%, #004aad 100%);
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    margin: 16px;
}

/* Card hover effect */
.card-hover {
    transition: box-shadow 0.2s, transform 0.15s;
}

.card-hover:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-1px);
}

.card-hover:active {
    transform: translateY(0);
}

/* Recording pulse animation */
.pulse {
    width: 12px;
    height: 12px;
    background: #dc3545;
    border-radius: 50%;
    animation: pulse 1.2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Photo grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

/* Note content */
.note-content {
    line-height: 1.7;
}

.note-content h1 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.note-content h2 {
    font-size: 1.3rem;
    margin: 24px 0 12px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 4px;
}

.note-content h3 {
    font-size: 1.1rem;
    margin: 16px 0 8px;
}

.note-content ul, .note-content ol {
    padding-left: 20px;
    margin: 8px 0;
}

.note-content li {
    margin-bottom: 4px;
}

.note-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

.note-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.note-content pre {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.note-content pre code {
    background: none;
    padding: 0;
}

.note-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.note-content th, .note-content td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: left;
}

.note-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.note-content blockquote {
    border-left: 3px solid #0071e3;
    padding-left: 12px;
    color: #6c757d;
    margin: 12px 0;
}

/* Chat bubbles */
.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-user {
    background: #0071e3;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-ai {
    background: #f0f0f5;
    color: #1d1d1f;
    border-bottom-left-radius: 4px;
}

.chat-ai p:last-child {
    margin-bottom: 0;
}

.chat-ai pre {
    background: #e2e2e7;
    padding: 8px 12px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85em;
}

.chat-ai code {
    font-size: 0.9em;
}

.chat-ai ul, .chat-ai ol {
    padding-left: 20px;
    margin: 4px 0;
}

/* Typing indicator */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

/* Exam option buttons */
.exam-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.95rem;
}

.exam-option p {
    margin: 0;
}

.exam-option:hover {
    border-color: #0071e3;
    background: #f0f7ff;
}

.exam-option.selected {
    border-color: #0071e3;
    background: #e8f1fd;
}

.exam-option.correct {
    border-color: #198754;
    background: #d1f5e0;
}

.exam-option.wrong {
    border-color: #dc3545;
    background: #fde2e4;
}

/* Exam result badges */
.exam-result {
    font-weight: 600;
    font-size: 0.95rem;
}

.exam-result-correct {
    background: #d1f5e0;
    color: #0f5132;
}

.exam-result-wrong {
    background: #fde2e4;
    color: #842029;
}

/* Oral exam status dot */
.oral-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.oral-status-dot.offline {
    background: #adb5bd;
}

.oral-status-dot.connecting {
    background: #ffc107;
    animation: pulse 1.2s infinite;
}

.oral-status-dot.online {
    background: #198754;
}

/* Oral exam visualizer */
.oral-visualizer {
    display: flex;
    gap: 48px;
    align-items: center;
}

.oral-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #6c757d;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.oral-ring.speaking {
    border-color: #0071e3;
    box-shadow: 0 0 0 6px rgba(0, 113, 227, 0.15);
    animation: ringPulse 0.8s infinite;
}

@keyframes ringPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15); }
    50% { box-shadow: 0 0 0 10px rgba(0, 113, 227, 0.08); }
}

/* Oral exam transcript */
.oral-transcript {
    max-height: 400px;
    overflow-y: auto;
}

.oral-transcript-entry {
    margin-bottom: 12px;
}

.oral-msg-examiner {
    padding: 10px 14px;
    background: #f0f0f5;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.oral-msg-user {
    padding: 10px 14px;
    background: #e8f1fd;
    border-radius: 16px;
    border-bottom-right-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Resize handle between PDF and chat */
.resize-handle {
    height: 6px;
    background: #dee2e6;
    cursor: ns-resize;
    flex-shrink: 0;
    position: relative;
}

.resize-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 3px;
    background: #adb5bd;
    border-radius: 2px;
}
