:root {
    --bg-left: #f8fafc;
    --text-left: #1e293b;
    --bg-right: #0b1a3a;
    --terminal-bg: #050a1c;
    --terminal-text: #67e8f9;
    --accent-color: #124191;
    --border-color: #e2e8f0;
}

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

body {
    font-family: 'Inter', sans-serif;
    height: 100vh;
    display: flex;
    overflow: hidden;
    background-color: var(--bg-left);
}

.split-container { display: flex; width: 100%; height: 100%; }

.left-panel {
    flex: 1;
    background-color: #ffffff;
    color: var(--text-left);
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.05);
    z-index: 2;
    overflow-y: auto;
}

.content-wrapper {
    padding: 3rem;
    max-width: 650px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 0.8s ease-out;
}

.header-section { margin-bottom: 2rem; }

.header-section h1 {
    font-weight: 600;
    font-size: 2.3rem;
    margin-bottom: 0.5rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.header-section p {
    font-size: 0.98rem;
    color: #64748b;
    line-height: 1.5;
}

.clear-btn {
    background-color: #f8fafc;
    color: #ef4444;
    border: 1px solid #fee2e2;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
}
.clear-btn:hover { background-color: #fef2f2; border-color: #fca5a5; }

.accordion { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.accordion-category { border-bottom: 1px solid var(--border-color); }
.accordion-category:last-child { border-bottom: none; }

.accordion-header {
    background-color: #f1f5f9;
    padding: 1rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s;
}
.accordion-header:hover { background-color: #e2e8f0; }

.accordion-body { display: none; background-color: #ffffff; padding: 1rem 1.5rem; }
.accordion-body.open { display: block; }

.config-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
}
.config-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.inputs-container-wrapper { margin-top: 0.8rem; margin-left: 24px; }

.config-instance {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 10px;
    position: relative;
}

.add-instance-btn {
    background: none;
    border: 1px dashed #cbd5e1;
    color: var(--accent-color);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    width: 100%;
    margin-top: 5px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.add-instance-btn:hover { background: #eff6ff; border-color: #93c5fd; }

.remove-instance-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
}
.remove-instance-btn:hover { background: #fca5a5; color: #b91c1c; }

.input-group { margin-bottom: 0.8rem; }
.input-group:last-child { margin-bottom: 0; }
.input-group label { display: block; font-size: 0.85rem; color: #475569; margin-bottom: 0.3rem; }
.input-group input, .input-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    background: #fff;
}
.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(18, 65, 145, 0.2);
}

.right-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--bg-right), #1e293b);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.terminal-window {
    width: 100%;
    max-width: 800px;
    height: 90%;
    background-color: var(--terminal-bg);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.8s ease-out;
}

.terminal-header {
    background-color: #1e293b;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.traffic-lights { display: flex; gap: 8px; width: 80px; }
.light { width: 12px; height: 12px; border-radius: 50%; }
.close { background-color: #ff5f56; }
.minimize { background-color: #ffbd2e; }
.expand { background-color: #27c93f; }

.terminal-title {
    color: #94a3b8;
    font-size: 0.875rem;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #e2e8f0;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    transition: background 0.2s;
    min-width: 80px;
    justify-content: center;
}
.copy-btn:hover { background: rgba(255,255,255,0.2); }

.terminal-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    position: relative;
    background-color: var(--terminal-bg);
}

pre {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--terminal-text);
    white-space: pre-wrap;
    line-height: 1.5;
    margin: 0;
}

.prompt { color: #fbbf24; user-select: none; }
.typing-effect { color: #94a3b8; font-style: italic; }

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.guide-text {
    font-size: 0.9rem;
    color: #475569;
    margin: 8px 0 16px 28px;
    padding: 12px;
    background: #f0f9ff;
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
    line-height: 1.5;
}
.guide-text p { margin-bottom: 8px; }
.guide-text p:last-child { margin-bottom: 0; }
.guide-text strong { color: #1e293b; }
.guide-text code {
    background: #e0f2fe;
    padding: 1px 6px;
    border-radius: 3px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85em;
    color: #0c4a6e;
}

@media (max-width: 768px) {
    body { overflow: auto; height: auto; }
    .split-container { flex-direction: column; }
    .left-panel { overflow-y: visible; padding-bottom: 2rem; }
    .content-wrapper { padding: 1.5rem; }
    .right-panel { min-height: 500px; padding: 1.5rem; }
    .header-section h1 { font-size: 2rem; }
    .terminal-window { height: 100%; min-height: 400px; }
}
