/* ============================================
   GENERADOR DE PROMPTS - ARQUITECTO DE PREGUNTAS
   Diseño oscuro, elegante y moderno
   ============================================ */

/* Variables */
:root {
    --bg-dark: #0f1419;
    --bg-card: #1a1f26;
    --bg-elevated: #242b33;
    --bg-hover: #2d353f;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #3b82f6;
    --accent-secondary: #f97316;
    --accent-success: #22c55e;
    
    --border-color: #2d353f;
    --border-light: #3d454f;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    
    --transition: all 0.2s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text span:first-child {
    font-weight: 600;
    font-size: 15px;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

.framework-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.framework-link:hover {
    text-decoration: underline;
}

/* Steps Navigation */
.steps-nav {
    padding: 20px 16px;
    flex: 1;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
}

.step-item:hover {
    background: var(--bg-hover);
}

.step-item.active {
    background: var(--bg-elevated);
}

.step-item.active .step-number {
    background: var(--accent-primary);
    color: white;
}

.step-item.completed .step-number {
    background: var(--accent-success);
    color: white;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: var(--transition);
}

.step-info {
    display: flex;
    flex-direction: column;
}

.step-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.step-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-footer strong {
    color: var(--text-secondary);
}

.sidebar-footer .institution {
    color: var(--accent-secondary);
    margin-top: 4px;
    margin-bottom: 4px;
}

.website a {
    font-size: 12px;
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

.website a:hover {
    text-decoration: underline;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px 60px;
    max-width: 1200px;
}

/* Step Content */
.step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* Step Header */
.step-header {
    margin-bottom: 32px;
}

.step-badge {
    display: inline-block;
    background: var(--bg-elevated);
    color: var(--accent-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Form Styles */
.form-section {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 44px;
}

.helper-text {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Info Card */
.info-card {
    display: flex;
    gap: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.info-card.success {
    border-color: var(--accent-success);
    background: rgba(34, 197, 94, 0.1);
}

.info-card-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.info-card-content h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.info-card-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

.info-card-content ol {
    color: var(--text-secondary);
    font-size: 14px;
    padding-left: 20px;
    margin-top: 8px;
}

.info-card-content ul {
    margin: 0;
    padding-left: 18px;
}

.info-card-content li {
    margin-bottom: 4px;
}

/* SOLO Selector */
.solo-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.solo-option {
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.solo-option:hover {
    border-color: var(--border-light);
}

.solo-option.selected {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.solo-level {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--accent-primary);
}

.solo-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.solo-verbs {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* Tip Box */
.tip-box {
    display: flex;
    gap: 12px;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 24px;
}

.tip-icon {
    flex-shrink: 0;
}

.tip-content strong {
    display: block;
    color: var(--accent-secondary);
    margin-bottom: 8px;
}

.tip-content ul {
    color: var(--text-secondary);
    font-size: 14px;
    padding-left: 18px;
}

.tip-content li {
    margin-bottom: 4px;
}

/* Steps Slider */
.steps-slider {
    padding: 10px 0;
}

.steps-slider input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
}

.steps-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.slider-labels span.active {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Steps Builder */
.steps-builder {
    margin-top: 24px;
}

.step-builder-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.step-builder-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.step-builder-number {
    width: 28px;
    height: 28px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.step-builder-type {
    flex: 1;
}

.step-builder-type select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

.step-builder-item textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    box-sizing: border-box;
}

.step-builder-item textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.step-builder-item textarea::placeholder {
    color: var(--text-muted);
}

.step-builder-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-item:hover {
    border-color: var(--border-light);
}

.checkbox-item input {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.checkbox-item input:checked ~ .checkmark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-item input:checked ~ .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.checkbox-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.checkbox-content span {
    font-size: 13px;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Prompt Output */
.prompt-output {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
}

.prompt-header span {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    background: #2563eb;
}

.btn-copy.copied {
    background: var(--accent-success);
}

#promptOutput {
    padding: 20px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
        padding: 30px 40px;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .steps-nav {
        display: flex;
        overflow-x: auto;
        padding: 12px;
        gap: 8px;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
        min-width: 80px;
        padding: 10px;
    }
    
    .step-info {
        display: none;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .solo-selector {
        grid-template-columns: 1fr;
    }
}
