:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --error: #ef4444;
    --success: #10b981;
}

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

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

.background-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    animation-delay: -5s;
}

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

.container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

h1 i {
    color: #eab308;
    filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.5));
}

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

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

input[type="url"] {
    width: 100%;
    padding: 18px 20px 18px 50px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="url"]:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

input[type="url"]:focus + .input-icon,
input[type="url"]:valid + .input-icon {
    color: var(--primary);
}

.options {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.radio-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.radio-container:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.radio-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    position: relative;
    transition: all 0.3s ease;
}

.radio-container input:checked ~ .checkmark {
    border-color: var(--primary);
}

.radio-container input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px var(--primary);
}

.radio-container input:checked ~ i {
    color: var(--primary);
}

.radio-container i {
    font-size: 1.2rem;
}

button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(59, 130, 246, 0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px rgba(59, 130, 246, 0.3);
}

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

.status-box {
    margin-top: 24px;
    padding: 20px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.status-box.hidden {
    display: none;
}

.status-box.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.status-box.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

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

.loader.hidden {
    display: none;
}

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

#statusMessage {
    font-size: 1.05rem;
    line-height: 1.5;
}

.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-loading { color: var(--text-main); }

footer {
    text-align: center;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: var(--success);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background-color: #059669;
}
