:root {
    --bg: #0b0e14;
    --card-bg: rgba(23, 27, 39, 0.7);
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --accent: #d946ef;
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
    --border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Background Effect */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, #2e1065 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, #4c1d95 0%, transparent 40%);
    z-index: -1;
}

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

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(to right, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 3rem;
}

/* The Main Card */
.upload-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

/* Upload Area */
.upload-container {
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 3rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.upload-container:hover, .upload-container.active {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.upload-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.upload-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.upload-container h3 span {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 2px solid var(--primary-glow);
    transition: all 0.2s ease;
}

.upload-container h3 span:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.upload-container p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Custom Name Field */
.custom-slug-container {
    text-align: left;
    margin-bottom: 1.5rem;
}

.custom-slug-container label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 0.6rem;
    display: block;
    margin-left: 0.5rem;
}

.slug-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
}

.slug-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.slug-input-wrapper span {
    color: var(--text-dim);
    font-size: 0.85rem;
    white-space: nowrap;
    margin-right: 0.2rem;
}

.slug-input-wrapper input {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    width: 100%;
    padding-left: 2px;
}

/* Fix for browser autofill white background */
.slug-input-wrapper input:-webkit-autofill,
.slug-input-wrapper input:-webkit-autofill:hover, 
.slug-input-wrapper input:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px #171b27 inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Progress & Success */
.progress-container {
    display: none;
    margin-top: 1rem;
}

.progress-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s ease;
}

.success-container {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.link-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.link-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    word-break: break-all;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

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

.btn-primary:hover {
    background: #7c3aed;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border);
}

footer {
    margin-top: 3rem;
    color: var(--text-dim);
    font-size: 0.8rem;
}
