:root {
    --bg-base: #0a0a0b;
    --brand-primary: #6366f1;
    --brand-secondary: #a855f7;
    --brand-glow: rgba(99, 102, 241, 0.4);
    --surface-glass: rgba(25, 25, 28, 0.6);
    --surface-glass-border: rgba(255, 255, 255, 0.06);
    --surface-input: rgba(0, 0, 0, 0.4);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --focus-ring: rgba(99, 102, 241, 0.5);
    --success: #10b981;
}

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

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

/* Abstract glowing background orbs */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
}

.ambient-blob-1,
.ambient-blob-2 {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.ambient-blob-1 {
    background: linear-gradient(to right, var(--brand-primary), var(--brand-secondary));
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
}

.ambient-blob-2 {
    background: linear-gradient(to right, #3b82f6, var(--brand-primary));
    width: 350px;
    height: 350px;
    bottom: -50px;
    right: -50px;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(50px, 50px) rotate(20deg);
    }
}

/* Main Container */
.glass-panel {
    width: 100%;
    max-width: 760px;
    background: var(--surface-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    border: 1px solid var(--surface-glass-border);
    padding: 3rem;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: panelEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panelEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

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

/* Header Elements */
.header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.icon-box {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px var(--brand-glow);
    position: relative;
}

.icon-box::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.icon-box svg {
    width: 28px;
    height: 28px;
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Form Layout */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

label span.optional {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    text-transform: none;
    color: #71717a;
}

textarea {
    width: 100%;
    background: var(--surface-input);
    border: 1px solid var(--surface-glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    font-family: inherit;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

textarea:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--focus-ring), inset 0 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

textarea::placeholder {
    color: #52525b;
    font-weight: 300;
}

/* Custom Scrollbar */
textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: transparent;
}

textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.1rem;
    margin-top: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: white;
    background: linear-gradient(to right, var(--brand-primary), var(--brand-secondary));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(168, 85, 247, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px -5px var(--brand-glow);
}

/* Results Section */
.result-panel {
    margin-top: 3rem;
    border-top: 1px solid var(--surface-glass-border);
    padding-top: 2.5rem;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.result-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.badge-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-radius: 50%;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--surface-glass-border);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-copy.copied {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
    .glass-panel {
        padding: 2rem 1.5rem;
    }

    .header {
        margin-bottom: 2rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .title {
        font-size: 1.5rem;
    }
}