:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #ec4899;
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', 'Noto Sans KR', sans-serif;
}

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

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

/* Background Animations */
.background-globes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out alternate;
}

.globe-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.globe-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -5%;
    right: -5%;
    animation-delay: -2s;
}

.globe-3 {
    width: 200px;
    height: 200px;
    background: #06b6d4;
    top: 40%;
    left: 60%;
    animation-delay: -4s;
    opacity: 0.4;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, 40px) scale(1.1);
    }
}

/* Container & Card */
.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
}

/* Header */
.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
}

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

.input-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

textarea {
    width: 100%;
    height: 150px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.2s ease;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.char-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Controls */
.controls-row {
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
}

.control-group {
    flex: 1;
}

.select-wrapper {
    position: relative;
    width: 100%;
}

select {
    width: 100%;
    appearance: none;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

select:focus {
    border-color: var(--primary);
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Radio Switch for Speed */
.radio-container {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 4px;
    height: 50px;
    gap: 4px;
}

.radio-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-option input {
    display: none;
}

.radio-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Checked State */
.radio-option input:checked+.radio-box {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hover State */
.radio-option:hover .radio-box {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.radio-option input:checked:hover+.radio-box {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}


/* Button */
.primary-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

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

.primary-btn:hover::after {
    left: 100%;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

.loader.active {
    display: block;
}

.btn-text.hidden,
.btn-icon.hidden {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer Credit */
.footer-credit {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    opacity: 0.6;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.footer-credit:hover {
    opacity: 1;
}

.footer-credit a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-credit a:hover {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}