:root {
    --bg-color: #0d1117;
    --text-color: #e6edf3;
    --primary: #7928ca;
    --secondary: #ff0080;
    --glass-bg: rgba(30, 35, 45, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(10, 15, 25, 0.6);
    --error: #ff4d4d;
    --success: #00d084;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Animated Shapes */
.bg-shape {
    position: absolute;
    filter: blur(100px);
    z-index: -1;
    border-radius: 50%;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    opacity: 0.5;
}

.shape-2 {
    width: 600px;
    height: 600px;
    background: var(--secondary);
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
    opacity: 0.3;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #00e5ff;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 3rem;
    z-index: 10;
    margin: 20px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.logo svg {
    color: var(--secondary);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

h1 span {
    color: var(--secondary);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-weight: 300;
    opacity: 0.8;
    font-size: 1.1rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="url"] {
    width: 100%;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="url"]:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.3);
}

.format-toggle {
    display: flex;
    background: var(--input-bg);
    border-radius: 12px;
    overflow: hidden;
    padding: 5px;
    border: 1px solid var(--glass-border);
}

.format-toggle input {
    display: none;
}

.format-toggle label {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.format-toggle input:checked+label {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
}

button[type="submit"] {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 18px;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

button[type="submit"]:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(255, 0, 128, 0.4);
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: scale(1);
}

.status-message {
    margin-top: 1.5rem;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-success {
    background: rgba(0, 208, 132, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 208, 132, 0.2);
}

.status-error {
    background: rgba(255, 77, 77, 0.1);
    color: var(--error);
    border: 1px solid rgba(255, 77, 77, 0.2);
}

.status-loading {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--glass-border);
}

/* Spinner Definition */
.spinner {
    animation: rotate 2s linear infinite;
    z-index: 2;
    width: 24px;
    height: 24px;
}

.spinner .path {
    stroke: hsl(0, 0%, 100%);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 2rem;
    }

    h1 {
        font-size: 2rem;
    }
}