:root {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --accent-color: #38bdf8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.5s ease-out;
    max-width: 400px;
    width: 90%;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

p {
    color: #94a3b8;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

input {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

button {
    padding: 0.75rem;
    background: var(--accent-color);
    color: #0f172a;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s;
    font-size: 1rem;
}

button:hover {
    filter: brightness(1.1);
}

#error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

.hidden {
    display: none !important;
}

#viewer-container {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    background: #1e293b;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

#pdf-container {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

canvas {
    display: block;
    margin-bottom: 1rem;
    max-width: 100%;
    border-radius: 4px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Spinner for loading */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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