:root {
    --bg-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    /* Subtle gradient background */
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.15) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Prevent scroll on drag usually */
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform var(--transition-speed);
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Drop Zone */
#drop-zone {
    border: 2px dashed var(--card-border);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}

#drop-zone:hover,
#drop-zone.highlight {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.05);
    transform: scale(1.02);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    transition: color var(--transition-speed);
}

#drop-zone:hover .upload-icon {
    color: var(--accent-color);
}

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

.drop-text strong {
    color: var(--text-primary);
}

#file-name {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress Bar */
#progress-wrapper {
    display: none;
    margin-top: 2rem;
    width: 100%;
}

.progress-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    height: 12px;
    width: 100%;
    margin-bottom: 0.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

#progress-bar {
    background: linear-gradient(45deg,
            var(--accent-color) 25%,
            #c084fc 25%,
            #c084fc 50%,
            var(--accent-color) 50%,
            var(--accent-color) 75%,
            #c084fc 75%,
            #c084fc);
    background-size: 40px 40px;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.3s ease-out;
    animation: progress-stripe 1s linear infinite;
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
}

@keyframes progress-stripe {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 40px 0;
    }
}

#progress-text {
    display: none;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Result / Messages */
#result {
    margin-top: 2rem;
    display: none;
    animation: fadeIn 0.5s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    color: var(--success-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.error-message {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Link Card */
.link-card {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 1rem;
}

.download-url-input {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    flex-grow: 1;
    padding: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    outline: none;
    width: 100%;
}

.copy-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-speed);
}

.copy-button:hover {
    background: var(--accent-hover);
}

.copy-button.copied {
    background: var(--success-color);
}

/* Footer / Credits */
.footer {
    position: absolute;
    bottom: 1rem;
    text-align: center;
    width: 100%;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.2);
}

/* Utilities */
input[type="file"] {
    display: none;
}
