:root {
    --primary-color: #00ddff;
    --secondary-color: #004e92;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: var(--surface-color);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

header {
    background: linear-gradient(135deg, var(--secondary-color), var(--surface-color));
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #34d399);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.2);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: rgba(0, 221, 255, 0.05);
}

.tab-content {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

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

.form-group {
    margin-bottom: 1.5rem;
}

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

.required-mark {
    color: var(--error-color);
    margin-left: 0.25rem;
}

.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
    cursor: help;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    background-color: var(--border-color);
    color: var(--text-muted);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
    font-family: inherit;
}

.tooltip:hover .tooltip-icon {
    background-color: var(--primary-color);
    color: #000;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--surface-color);
    color: var(--text-color);
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
    font-weight: normal;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

label span.optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 221, 255, 0.2);
}

select option {
    background-color: var(--surface-color);
    color: var(--text-color);
}

.result-area {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.result-label {
    position: absolute;
    top: -0.75rem;
    left: 1rem;
    background-color: var(--background-color);
    padding: 0 0.5rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
}

.output-code {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    word-break: break-all;
    color: #e2e8f0;
    margin-bottom: 1rem;
    min-height: 1.8rem;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    width: 100%;
}

.copy-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

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

.helper-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Validation Error State */
.input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.helper-text.error-msg {
    color: #ef4444;
}

footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer p {
    margin-bottom: 0.25rem;
}
