* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f8fafc;
    --text-secondary: #cbd5e1;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.upload-box, .result-box, .error-box {
    background: var(--surface);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    width: 100%;
    max-width: 500px;
    text-align: center;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 2.5em;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-box h1 {
    font-size: 2.2em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1em;
}

.upload-form {
    margin-top: 30px;
}

.drop-zone {
    border: 2px dashed #475569;
    border-radius: 16px;
    padding: 40px 20px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    background: rgba(30, 41, 59, 0.5);
    margin-bottom: 24px;
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.drop-zone.drop-active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.drop-zone.file-selected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.drop-content h3 {
    margin-bottom: 8px;
    color: var(--text);
}

.drop-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.drop-icon {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: 0.7;
}

.file-info {
    margin-top: 16px;
}

.file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.file-type {
    font-size: 1.5em;
}

.file-details {
    text-align: left;
}

.file-details strong {
    display: block;
    color: var(--text);
}

.file-details span {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.progress-bar {
    display: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.upload-btn {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.upload-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.upload-btn.loading .btn-text {
    opacity: 0;
}

.upload-btn.loading .btn-loader {
    opacity: 1;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.feature-icon {
    font-size: 1.2em;
}

/* Result page styles */
.success-animation {
    margin-bottom: 24px;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-box h1 {
    margin-bottom: 32px;
    font-size: 2em;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out;
}

.file-icon-large {
    font-size: 2.5em;
    opacity: 0.8;
}

.file-details-large h3 {
    margin-bottom: 4px;
    text-align: left;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.download-section, .qr-section {
    margin: 32px 0;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.link-container {
    display: flex;
    margin: 16px 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.link-input {
    flex: 1;
    padding: 16px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.copy-btn.copied {
    background: var(--success);
}

.copy-text, .copied-text {
    transition: opacity 0.3s ease;
}

.copied-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.copy-btn.copied .copy-text {
    opacity: 0;
}

.copy-btn.copied .copied-text {
    opacity: 1;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--success);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

.qr-container {
    margin-top: 16px;
}

.qr-code {
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    margin: 24px 0;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.info-icon {
    font-size: 1.5em;
}

.info-content {
    text-align: left;
}

.info-content strong {
    color: #fbbf24;
}

.info-content p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 4px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.back-link:hover {
    color: var(--text);
}

.error-box {
    text-align: center;
}

.error-icon {
    font-size: 4em;
    margin-bottom: 20px;
    color: var(--danger);
}

.error-box h1 {
    margin-bottom: 16px;
}

.error-box p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .upload-box, .result-box, .error-box {
        padding: 32px 24px;
        margin: 10px;
    }
    
    .features {
        flex-direction: column;
        gap: 16px;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .copy-btn {
        padding: 12px;
    }
}