:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --accent: #10b981;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
}

#root {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    width: 100%;
    max-width: 900px;
    transition: transform 0.3s ease;
}

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

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

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

.input-group {
    margin-bottom: 1rem;
}

/* Loading States */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-spinner {
    display: none;
    width: 1.25em;
    height: 1.25em;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    vertical-align: middle;
}

/* HTMX Request States */
.htmx-request .btn-text {
    display: none;
}

.htmx-request .btn-spinner {
    display: inline-block;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    font-family: inherit;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Accessibility: Global Focus Styles */
:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-dark), 0 0 0 4px var(--primary);
}

/* Accessibility: Fix for hidden file input focus */
.file-upload-wrapper:focus-within .btn {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px var(--bg-dark), 0 0 0 4px var(--primary);
}

.file-list {
    margin-top: 2rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    margin-bottom: 0.75rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
}

.file-icon {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    color: var(--primary);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
}

.file-meta {
    font-size: 0.875rem;
    color: var(--text-dim);
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.breadcrumb span, .breadcrumb a {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.breadcrumb span:hover, .breadcrumb a:hover {
    color: white;
}