* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* UTC-inspired professional dark palette */
    --primary-color: #4F6DF5;
    --primary-hover: #6B85F7;
    --secondary-color: #3A56D4;
    --accent-color: #A7B1D8;
    --bg-primary: #05060B;
    --bg-secondary: #0B0E1A;
    --bg-card: rgba(242, 245, 255, 0.04);
    --text-primary: #F2F5FF;
    --text-secondary: #A7B1D8;
    --text-muted: #6B7293;
    --border-color: rgba(242, 245, 255, 0.10);
    --error-color: #ff5555;
}


/* Remove all browser default focus outlines and hover highlights */
*,
*:focus,
*:focus-visible,
*:focus-within {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* Remove tap highlight on mobile */
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
  tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(79, 109, 245, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(79, 109, 245, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(107, 133, 247, 0.04) 0%, transparent 40%);
    z-index: -1;
}

/* Lock Screen */
.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 6, 11, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    user-select: none;
    -webkit-user-select: none;
}

.lock-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lock-content {
    text-align: center;
    padding: 20px;
    max-width: 400px;
    width: 90%;
}

.lock-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 32px;
    color: #fff;
    animation: pulse 2s infinite;
    box-shadow: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.lock-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.lock-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.password-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 8px;
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.password-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    padding: 12px 16px;
    outline: none;
    text-align: center;
    letter-spacing: 4px;
    font-weight: 600;
}

.password-input::placeholder {
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 400;
}

.unlock-btn {
    background: var(--primary-color);
    border: none;
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    font-size: 16px;
    box-shadow: none;
}

.unlock-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: none;
}

.unlock-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-msg {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.error-msg.show {
    display: flex;
}

.attempts-text {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.attempts-text.danger {
    color: var(--error-color);
}

.lockout-box {
    display: none;
    background: rgba(255, 85, 85, 0.1);
    border: 1px solid rgba(255, 85, 85, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    color: var(--text-primary);
}

.lockout-box.show {
    display: block;
}

.lockout-timer {
    font-size: 32px;
    font-weight: 700;
    color: var(--error-color);
    font-family: 'Courier New', monospace;
    margin: 10px 0;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-screen.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(79, 109, 245, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-muted);
    margin-top: 16px;
    font-size: 14px;
}

/* PDF Viewer */
.pdf-viewer {
    display: none;
    width: 100%;
    min-height: 100vh;
    background: var(--bg-primary);
}

.pdf-viewer.show {
    display: block;
}

.pdf-page {
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
}

.pdf-page canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
* {
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) var(--bg-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .lock-title {
        font-size: 24px;
    }
    .lock-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}