:root {
    --bg-color: #0b0f19;
    --text-color: #e2e8f0;
    --glass-bg: rgba(20, 25, 40, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #10b981;
    --error: #ef4444;
    --orb-1: rgba(59, 130, 246, 0.3);
    --orb-2: rgba(16, 185, 129, 0.2);
    --orb-3: rgba(139, 92, 246, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Background Animations */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 40vw;
    height: 40vw;
    background: var(--orb-1);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 35vw;
    height: 35vw;
    background: var(--orb-2);
    bottom: 10%;
    right: -10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 30vw;
    height: 30vw;
    background: var(--orb-3);
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 4vh;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header.glass-panel {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 .accent {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 500px;
}

/* Search Form */
.search-form {
    width: 100%;
    max-width: 600px;
    margin-top: 1rem;
}

.input-group {
    display: flex;
    position: relative;
    border-radius: 100px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
    outline: none;
    font-family: 'Inter', sans-serif;
}

input::placeholder {
    color: #64748b;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 100px;
    padding: 0 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

button:active {
    transform: translateY(0);
}

button.loading span {
    opacity: 0.5;
}

button.loading svg {
    animation: spin 1s linear infinite;
}

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

/* Status Messages */
.status-message {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.status-message.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    position: absolute;
}

.status-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-message.info {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Viewer Section */
.viewer-section {
    width: 100%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
}

.viewer-section.hidden {
    opacity: 0;
    transform: translateY(40px);
    pointer-events: none;
    position: absolute;
}

.viewer-container {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.viewer-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.embed-responsive {
    position: relative;
    width: 100%;
    height: 75vh;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff; /* White background for PDF */
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .input-group { flex-direction: column; border-radius: 16px; background: transparent; border: none; gap: 1rem; }
    input { background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); border-radius: 12px; }
    button { padding: 1rem; border-radius: 12px; justify-content: center; }
}
