:root {
    --primary-bg: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-color: #38bdf8;
    --accent-hover: #0ea5e9;
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.1);
    --blob-1: #800000;
    --blob-2: #000000;
    --blob-3: #800000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animation */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--blob-1);
    animation-duration: 25s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: var(--blob-2);
    animation-duration: 30s;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: var(--blob-3);
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.1);
    }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    margin: 40px auto;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Form Styling */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.full-width {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input,
select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
    width: 100%;
}

input:focus,
select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

/* Custom Select Dropdown */
.custom-select {
    position: relative;
}

.options-container {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #1e293b;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.options-container.active {
    display: block;
}

.option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.option:last-child {
    border-bottom: none;
}

.option:hover,
.option.highlighted {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
}

.option .code {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.loading-state {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Scrollbar Style */
.options-container::-webkit-scrollbar {
    width: 8px;
}

.options-container::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 0 12px 12px 0;
}

.options-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

/* Result Section */
.result-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--card-border);
}

.url-display {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 16px;
    margin: 10px 0 20px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--accent-color);
    word-break: break-all;
    min-height: 56px;
    display: flex;
    align-items: center;
}

.url-display a {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

.url-display a:hover {
    text-decoration: underline;
}

.copy-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-color) 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: transform 0.1s, box-shadow 0.2s;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .glass-card {
        padding: 24px;
    }

    header h1 {
        font-size: 1.8rem;
    }
}

/* Warning Message */
.warning-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}