:root {
    --bg-color: #0d1117;
    --panel-bg: rgba(22, 27, 34, 0.6);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-hover: #3182ce;
    --success-color: #238636;
    --error-color: #f85149;
    --error-bg: rgba(248, 81, 73, 0.1);
    --input-bg: rgba(1, 4, 9, 0.6);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-focus: #58a6ff;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

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

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

.globe-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.8) 0%, rgba(88, 166, 255, 0) 70%);
    top: -100px;
    left: -100px;
}

.globe-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(163, 113, 247, 0.6) 0%, rgba(163, 113, 247, 0) 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -10s;
}

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

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

/* Main Container */
.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #e6edf3, #79c0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

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

/* Glass Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Inputs */
.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    width: 1.2rem;
    height: 1.2rem;
    pointer-events: none;
}

input[type="text"] {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', monospace;
    transition: var(--transition);
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

input[type="text"]::placeholder {
    color: rgba(139, 148, 158, 0.5);
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    align-items: center;
    margin: 1.5rem 0 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--panel-border);
}

.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

input:checked+.slider:before {
    transform: translateX(22px);
    background-color: #fff;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-label {
    display: flex;
    flex-direction: column;
}

.toggle-title {
    font-weight: 500;
    font-size: 0.95rem;
}

.toggle-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Error Box */
.error-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--error-bg);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 8px;
    color: var(--error-color);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease-out;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Output Section */
.output-section {
    margin-top: 1rem;
}

.output-wrapper {
    position: relative;
    margin-top: 0.5rem;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 1rem;
    padding-right: 7rem;
    /* Space for button */
    background: #010409;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: #a5d6ff;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: var(--transition);
    word-break: break-all;
}

textarea:focus {
    border-color: var(--accent-color);
}

/* Copy Button */
.copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--panel-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.copy-btn i {
    width: 1rem;
    height: 1rem;
}

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

.copy-btn.copied {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    .title {
        font-size: 2rem;
    }

    textarea {
        height: 160px;
        padding-bottom: 4rem;
        padding-right: 1rem;
    }

    .copy-btn {
        top: auto;
        bottom: 0.75rem;
        right: 0.75rem;
    }
}