:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --success: #3fb950;
    --error: #f85149;
}

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

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

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 20s infinite alternate;
}

.orb-1 {
    top: -200px;
    left: -200px;
    background: #58a6ff;
}

.orb-2 {
    bottom: -200px;
    right: -200px;
    background: #bc8cff;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #58a6ff 0%, #bc8cff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.input-group {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
    }
}

.reference-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

.reference-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.05);
}

.reference-input::placeholder {
    color: var(--text-secondary);
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.02);
}

.drop-zone:hover, .drop-zone.drag-active {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.05);
}

.drop-zone svg {
    color: var(--text-secondary);
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.drop-zone:hover svg, .drop-zone.drag-active svg {
    color: var(--accent);
}

.drop-zone h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.drop-zone p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.file-list {
    margin-top: 24px;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.remove-btn:hover {
    color: var(--error);
}

.primary-btn {
    width: 100%;
    padding: 16px;
    margin-top: 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.primary-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(88, 166, 255, 0.2);
}

.primary-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.loader-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

.status-message {
    margin-top: 16px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    min-height: 24px;
}

.status-success { color: var(--success); }
.status-error { color: var(--error); }
.status-info { color: var(--accent); }

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}
