/* ==========================================
   HTML TO JSX CONVERTER
   Dark Code Editor Design
   ========================================== */

:root {
    --bg-dark: #0f172a;
    --bg-panel: #1e293b;
    --bg-input: #0b1220;
    --border: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --html-color: #e34c26;
    --jsx-color: #61dafb;
}

.htj-container {
    max-width: 1400px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg-dark);
    min-height: 100vh;
}

/* Header */
.htj-header {
    position: relative;
    padding: 60px 24px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #1e1b4b 100%);
    overflow: hidden;
}

.htj-header-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.htj-header-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.htj-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary-light);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.htj-title {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 16px;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.htj-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Converter */
.htj-converter {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Panels */
.htj-panel {
    background: var(--bg-panel);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.htj-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border);
}

.htj-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.htj-lang-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.htj-lang-badge.html {
    background: rgba(227, 76, 38, 0.2);
    color: #e34c26;
}

.htj-lang-badge.jsx {
    background: rgba(97, 218, 251, 0.2);
    color: #61dafb;
}

.htj-panel-actions {
    display: flex;
    gap: 8px;
}

.htj-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.htj-btn-icon:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text);
}

/* Editor */
.htj-editor {
    flex: 1;
    width: 100%;
    padding: 20px;
    border: none;
    background: var(--bg-input);
    color: var(--text);
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.8;
    resize: none;
    outline: none;
}

.htj-input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.htj-output {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
}

.htj-placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.htj-stats {
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

/* Controls */
.htj-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.htj-convert-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    border: none;
    border-radius: 16px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.5);
}

.htj-convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.6);
}

.htj-arrow {
    font-size: 24px;
}

.htj-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-panel);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    width: 180px;
}

.htj-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

.htj-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* Features */
.htj-features {
    padding: 80px 24px;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0c1220 100%);
}

.htj-section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 48px;
}

.htj-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.htj-feature {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border);
    text-align: center;
}

.htj-feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.htj-feature h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.htj-code-compare {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 16px;
}

.htj-compare-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    font-family: monospace;
    font-size: 14px;
}

.htj-compare-item.vertical {
    flex-direction: column;
}

.htj-compare-item:last-child {
    margin-bottom: 0;
}

.htj-compare-bad {
    color: var(--danger);
    text-decoration: line-through;
    opacity: 0.7;
}

.htj-compare-good {
    color: var(--success);
    font-weight: 600;
}

.htj-arrow-s {
    color: var(--text-muted);
}

/* Patterns */
.htj-patterns {
    padding: 80px 24px;
}

.htj-patterns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.htj-pattern {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
}

.htj-pattern h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-light);
}

.htj-table {
    width: 100%;
    font-family: monospace;
    font-size: 14px;
}

.htj-table td {
    padding: 8px;
    color: var(--text-muted);
}

.htj-table td:nth-child(2) {
    color: var(--text-muted);
    text-align: center;
}

.htj-table td:nth-child(3) {
    color: var(--success);
}

.htj-pattern-note {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

/* Content */
.htj-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px 24px;
}

.htj-content h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 48px 0 24px;
}

.htj-content p, .htj-content li {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.htj-content code {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.htj-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 32px 0;
}

.htj-comparison-manual, .htj-comparison-auto {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
}

.htj-comparison-auto {
    border-color: var(--success);
}

.htj-comparison h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.htj-comparison ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.htj-comparison li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.htj-comparison li:before {
    content: '→ ';
    color: var(--text-muted);
}

.htj-comparison-auto li:before {
    content: '✓ ';
    color: var(--success);
}

.htj-time {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-weight: 600;
    color: var(--text);
}

.htj-edge-cases {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 32px 0;
}

.htj-edge-case {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
}

.htj-edge-case h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-light);
}

.htj-edge-case pre {
    background: var(--bg-input);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: monospace;
    font-size: 13px;
    color: var(--text);
    margin: 12px 0;
}

.htj-edge-case p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.htj-faq {
    margin: 32px 0;
}

.htj-faq-item {
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}

.htj-faq-item h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.htj-cta {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    padding: 48px;
    border-radius: 16px;
    text-align: center;
    margin-top: 48px;
}

.htj-cta h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
}

.htj-cta p {
    margin: 0;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 1024px) {
    .htj-converter {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .htj-controls {
        flex-direction: row;
        justify-content: center;
    }
    
    .htj-options {
        width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}