/* styles.css - Main stylesheet */

:root {
    /* FutureMed Hub Color Scheme - Professional Medical Variant */
    --cyber-purple: #7c3aed;
    --electric-teal: #46f779;
    --cyber-cyan: #6ffaff;
    --cyber-green: #46f779;
    --dark-bg: #131827;
    --card-bg: rgba(40, 38, 58, 0.55);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    
    /* Semantic colors */
    --primary-color: #7c3aed;
    --primary-hover: #6d28d9;
    --success-color: #46f779;
    --warning-color: #fbbf24;
    --danger-color: #ef4444;
    --text-color: #ffffff;
    --text-muted: #9ca3af;
    --bg-light: rgba(40, 38, 58, 0.3);
    --bg-white: rgba(40, 38, 58, 0.55);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(to bottom, rgba(22,22,39,0.3), #0c0b1c);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Header */
.page-header {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-bottom: 2px solid rgba(70, 247, 121, 0.3);
}

.page-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.95;
    color: #e5e7eb;
}

/* Info Sections */
.info-section, .why-section {
    margin: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-white);
}

.info-toggle, .why-toggle {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-light);
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.why-toggle {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.info-toggle:hover, .why-toggle:hover {
    background: var(--border-color);
}

.why-toggle:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #084298 100%);
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 12px;
}

.info-content, .why-content {
    padding: 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    line-height: 1.7;
    color: var(--text-color);
}

.intro {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    padding: 12px;
    background: #e7f1ff;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    color: #1a1a1a;
}

.intro * {
    color: inherit;
}

.info-block {
    margin: 15px 0;
    padding: 12px;
    background: var(--bg-white);
    border-left: 3px solid var(--text-muted);
    border-radius: 4px;
    color: var(--text-color);
}

.info-block.success {
    background: #d4edda;
    border-left-color: var(--success-color);
    color: #155724;
}

.info-block.success * {
    color: inherit;
}

.info-block.recommend {
    background: #cfe2ff;
    border-left-color: var(--primary-color);
    color: #084298;
}

.info-block.recommend * {
    color: inherit;
}

.info-block ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.info-block li {
    margin: 4px 0;
}

/* Input Explanations */
.input-explanation {
    margin: 16px 0;
    padding: 12px;
    background: var(--bg-white);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.input-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.input-why {
    font-size: 14px;
    color: var(--text-muted);
    padding-left: 24px;
}

/* Insight Box */
.insight-box {
    margin: 24px 0;
    padding: 16px;
    background: #fff3cd;
    border: 2px solid var(--warning-color);
    border-radius: var(--border-radius);
    color: #856404;
}

.insight-box *,
.insight-box p,
.insight-box .final-note {
    color: #856404 !important;
}

.insight-box strong {
    display: block;
    font-size: 16px;
    color: #856404;
    margin-bottom: 10px;
}

.comparison {
    margin: 16px 0;
}

.bad-example, .good-example {
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    font-size: 14px;
}

.bad-example {
    background: #f8d7da;
    border-left: 4px solid var(--danger-color);
    color: #721c24;
}

.bad-example * {
    color: inherit;
}

.good-example {
    background: #d1e7dd;
    border-left: 4px solid var(--success-color);
    color: #155724;
}

.good-example * {
    color: inherit;
}

.result {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-style: italic;
    opacity: 0.9;
}

.pro-tip {
    margin-top: 20px;
    padding: 12px;
    background: #d1ecf1;
    border-left: 4px solid #0dcaf0;
    border-radius: 4px;
    font-size: 14px;
    color: #055160;
}

.pro-tip * {
    color: inherit;
}
    border-left: 4px solid #0dcaf0;
    border-radius: 4px;
    font-size: 14px;
    color: #055160;
}

/* Main Content */
.main-content {
    padding: 30px;
    background: rgba(22, 22, 39, 0.3);
}

/* Form Sections */
.form-section {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.form-section h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

/* Input Method Tabs */
.input-method-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: var(--border-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Input Panels */
.input-panel {
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
}

/* File Input */
.file-input {
    display: none;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.file-label:hover {
    border-color: var(--primary-color);
    background: #f0f8ff;
}

.file-icon {
    font-size: 24px;
}

.file-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
}

.input-status {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
}

.input-status.success {
    color: var(--success-color);
}

.input-status.error {
    color: var(--danger-color);
}

/* Text Input */
.text-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: border-color 0.2s;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Select */
.form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 15px;
    background: var(--bg-white);
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: var(--border-color);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Textarea */
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #46f779 0%, #00e7a0 100%);
    color: #000000;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(70, 247, 121, 0.3);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(70, 247, 121, 0.5);
    background: linear-gradient(135deg, #5aff8a 0%, #00f5b0 100%);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Output Container */
.output-container {
    margin: 30px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

/* Prompt Preview */
.prompt-preview {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
}

.prompt-preview h4 {
    margin-bottom: 12px;
    color: var(--primary-color);
}

.prompt-preview pre {
    background: #f5f5f5;
    color: #1a1a1a;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Summary Section */
.summary-section {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 20px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.summary-header h3 {
    font-size: 20px;
    color: var(--text-color);
}

.summary-actions {
    display: flex;
    gap: 8px;
}

.action-btn, .copy-btn {
    padding: 8px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover, .copy-btn:hover {
    background: var(--border-color);
}

/* Summary Content */
.summary-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-color);
}

.summary-content p {
    margin-bottom: 12px;
}

/* Error Section */
.error-section {
    padding: 16px;
    background: #f8d7da;
    border: 2px solid var(--danger-color);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.error-section h4 {
    color: var(--danger-color);
    margin-bottom: 8px;
}

.error-section p {
    color: #721c24;
}

/* Debug Console */
.debug-console {
    margin-bottom: 24px;
    padding: 16px;
    background: #1e1e1e;
    border: 2px solid #333;
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.debug-header h4 {
    color: #4ec9b0;
    margin: 0;
    font-size: 14px;
}

.debug-toggle-btn {
    padding: 4px 12px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.debug-toggle-btn:hover {
    background: #444;
}

.debug-log {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 12px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.debug-log::-webkit-scrollbar {
    width: 8px;
}

.debug-log::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.debug-log::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.debug-log::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .page-header {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .main-content, .output-container {
        padding: 20px;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .summary-actions {
        width: 100%;
    }
    
    .action-btn {
        flex: 1;
    }
}
