:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #f472b6;
    /* Pinkish for PH vibe but classy */
    --secondary: #a855f7;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
}

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

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

.background-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.15) 0%, rgba(168, 85, 247, 0.05) 50%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: height 0.3s ease;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: -1px;
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.input-group {
    position: relative;
    margin-bottom: 2rem;
}

input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    padding-right: 120px;
    /* Space for button */
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.6);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.1);
}

button#convertBtn {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    padding: 0 1.5rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

button#convertBtn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

button#convertBtn:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

/* Status Area */
#statusArea {
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    text-align: left;
}

.status-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.status-step.active {
    opacity: 1;
    color: var(--text);
    font-weight: 500;
}

.status-step.completed {
    opacity: 1;
    color: var(--primary);
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.status-message {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* Result Area */
#resultArea {
    animation: fadeIn 0.5s ease;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

#resultTitle {
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--text);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    text-align: center;
}

.download-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(255, 255, 255, 0.1);
}

.secondary-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
}

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

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

/* Loader */
.loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

button.loading .btn-text {
    display: none;
}

button.loading .loader {
    display: inline-block;
}