:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-1: #3b82f6;
    --accent-2: #8b5cf6;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --error: #ef4444;
}

* {
    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;
    position: relative;
    overflow: hidden;
}

.background-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-1);
    bottom: -100px;
    left: -100px;
    animation-delay: -10s;
}

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

.container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 3rem;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 1;
    transition: all 0.3s ease;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

h1 span {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.5;
}

.drop-zone {
    border: 2px dashed var(--card-border);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.3);
    cursor: pointer;
}

.drop-zone.dragover {
    border-color: var(--accent-1);
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
}

.drop-zone-content > label {
    pointer-events: auto;
}

.upload-icon {
    color: var(--accent-1);
    transition: transform 0.3s ease;
}

.drop-zone:hover .upload-icon {
    transform: translateY(-5px);
}

.drop-text {
    font-size: 1.2rem;
    font-weight: 600;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: none;
    display: inline-block;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}

.file-icon {
    color: var(--accent-1);
    flex-shrink: 0;
}

#file-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

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

.actions {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.btn-process {
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

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

.btn-process:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.loader {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--bg-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

.btn-process:disabled .loader {
    border-top-color: var(--text-secondary);
}

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

.hidden {
    display: none !important;
}

.status-message {
    margin-top: 1.5rem;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

.status-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
    white-space: pre-wrap;
    word-break: break-all;
    text-align: left;
    font-size: 0.9rem;
}

.download-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.5s ease;
}

.btn-success {
    background: var(--success);
    color: white;
    text-decoration: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

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

@media (max-width: 600px) {
    .container {
        padding: 2rem;
    }
    h1 { font-size: 2rem; }
}
