:root {
    /* Primary Colors */
    --html-primary: #2563eb;
    --html-primary-dark: #1d4ed8;
    --html-primary-light: #dbeafe;
    --html-primary-hover: #1d4ed8;
    --html-primary-shadow: rgb(37 99 235 / 25%);
    
    /* Semantic Colors */
    --html-success: #10b981;
    --html-warning: #f59e0b;
    --html-danger: #ef4444;
    --html-info: #3b82f6;
    --html-accent: #36cfc9;
    
    /* Surface Colors */
    --html-surface: #ffffff;
    --html-surface-muted: #f4f6fb;
    --html-surface-elevated: #ffffff;
    --html-background: #f8fafc;
    --html-secondary-bg: #e2e8f0;
    
    /* Border Colors */
    --html-border: #e2e8f0;
    --html-border-light: #f1f5f9;
    --html-border-dark: #cbd5e1;
    
    /* Text Colors */
    --html-text-main: #0f172a;
    --html-text-muted: #64748b;
    --html-text-light: #94a3b8;
    --html-text-inverse: #ffffff;
    
    /* Shadow System */
    --html-shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
    --html-shadow-sm: 0 1px 2px rgb(15 23 42 / 0.08);
    --html-shadow-md: 0 4px 12px rgb(15 23 42 / 0.08);
    --html-shadow-lg: 0 12px 24px rgb(15 23 42 / 0.12);
    --html-shadow-xl: 0 20px 25px rgb(15 23 42 / 0.1);
    
    /* Border Radius */
    --html-radius-sm: 0.375rem;
    --html-radius-md: 0.75rem;
    --html-radius-lg: 1.5rem;
    --html-radius-xl: 2rem;
    --html-radius-full: 9999px;
    
    /* Spacing */
    --html-spacing-xs: 0.25rem;
    --html-spacing-sm: 0.5rem;
    --html-spacing-md: 1rem;
    --html-spacing-lg: 1.5rem;
    --html-spacing-xl: 2rem;
    
    /* Legacy Variables */
    --primary-color: var(--html-primary);
    --primary-color-light: var(--html-primary-light);
    --surface-color: var(--html-surface);
    --light-bg: var(--html-background);
    --border-color: var(--html-border);
    --text-primary: var(--html-text-main);
    --text-secondary: var(--html-text-muted);
    --secondary-color: var(--html-text-muted);
    --success-color: var(--html-success);
    --info-color: var(--html-info);
    --warning-color: var(--html-warning);
    --danger-color: var(--html-danger);
    --dark-text: var(--html-text-main);
    --border-radius: var(--html-radius-lg);
    --shadow: var(--html-shadow-md);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* related to and faqs component variables */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --border: #e2e8f0;
    --surface: #ffffff;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
    --surface-muted: #f4f6fb;
    --text-main: #0f172a;
    --text-muted: #64748b;
}

.csv-html-page {
    padding-bottom: 2rem;
}

.converter-intro {
    margin-bottom: 2rem;
}

.converter-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.converter-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    max-width: 700px;
}

.converter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    list-style: none;
    padding: 0;
    margin: 0;
}

.meta-chip {
    background: var(--light-bg);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    color: var(--dark-text);
}

.converter-main {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--html-shadow-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    padding: 2rem;
}

.converter-card {
    padding: 0;
}

.converter-form {
    max-width: 100%;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--dark-text);
}

.status-bar svg {
    flex-shrink: 0;
    color: var(--info-color);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-text);
}

.label-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-trigger {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--info-color);
    color: white;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
    line-height: 1;
}

.tooltip-trigger:hover {
    background: var(--html-primary-hover);
    transform: scale(1.1);
}

.tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark-text);
    color: white;
    text-align: center;
    border-radius: 8px;
    padding: 0.75rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: var(--html-shadow-lg);
}

.tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--dark-text) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.editor-wrapper {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    min-height: 300px;
    transition: var(--transition);
    position: relative;
}

.editor-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.editor-wrapper .editor {
    height: 300px !important;
    width: 100% !important;
    min-height: 300px;
}

.converter-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--dark-text);
    transition: var(--transition);
    
    cursor: pointer;
}

.converter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.converter-select::placeholder {
    color: var(--text-secondary);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark-text);
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
}

.checkbox-label:hover {
    background: var(--light-bg);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.checkbox-label span:not(.tooltip) {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: stretch;
}

.convert-btn {
    flex: 1;
    min-width: auto;
    background: linear-gradient(135deg, var(--html-primary), var(--html-primary-dark));
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--html-shadow-md);
    min-height: 48px;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--html-shadow-lg);
}

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

.convert-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2), var(--html-shadow-md);
}

.convert-btn svg {
    width: 20px;
    height: 20px;
}

.ghost-btn {
    flex: 0 0 auto;
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    color: var(--dark-text);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ghost-btn:hover {
    background: var(--border-color);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

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

.ghost-btn svg {
    width: 16px;
    height: 16px;
}

.results-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.results-container[style*="display: block"] {
    animation: slideIn 0.5s ease-out;
}

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

.results-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--dark-text);
}

.results-stats {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.result-content {
    flex: 1;
    margin-bottom: 1.5rem;
}

.html-preview-wrapper {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    height: 400px;
}

.html-preview-wrapper .editor {
    height: 100%;
    width: 100%;
}

.result-actions {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.action-buttons-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.action-button {
    flex: 1 1 auto;
    min-width: 120px;
    background: #f1f5f9;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #405063;
    border: 1px solid #dde3e7;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.action-button:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.action-button.copied {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.action-button svg {
    width: 16px;
    height: 16px;
}

.share-container {
    background: rgba(241, 245, 249, 0.8);
    border-radius: var(--html-radius-md);
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    margin-top: 1rem;
}

.share-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.2);
    color: #ffffff;
}

.share-x { background: #111827; }
.share-facebook { background: #1877f2; }
.share-linkedin { background: #0a66c2; }
.share-reddit { background: #ff4500; }
.share-telegram { background: #229ed9; }
.share-whatsapp { background: #25d366; color: #0f172a; }

.empty-state-content {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--secondary-color);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--border-color);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Educational Content Section */
.csv-html-knowledge {
    margin-top: 3rem;
    margin-bottom: 2.5rem;
}

.csv-html-article {
    background: var(--html-surface);
    border-radius: var(--html-radius-lg);
    padding: clamp(2rem, 4vw, 3rem);
    box-shadow: var(--html-shadow-sm);
    border: 1px solid var(--html-border);
}

.html-article-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--html-text-main);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.html-article-header p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--html-text-main);
    margin-bottom: 1rem;
}

.html-step-box {
    background: var(--html-surface-muted);
    border-radius: var(--html-radius-md);
    padding: 2rem;
    margin: 2rem 0;
    border-left: 4px solid var(--html-primary);
}

.html-step-box h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--html-text-main);
    margin-bottom: 1rem;
}

.html-steps-list {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.html-steps-list li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--html-text-main);
}

.html-tip {
    background: var(--html-primary-light);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9375rem;
    color: var(--html-text-main);
}

.html-scenario-grid {
    margin: 2rem 0;
}

.html-scenario-grid h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--html-text-main);
    margin-bottom: 1.5rem;
}

.scenario-card {
    background: var(--html-surface-muted);
    border-radius: var(--html-radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--html-border);
}

.scenario-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--html-text-main);
    margin-bottom: 0.75rem;
}

.scenario-card p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--html-text-main);
}

.scenario-snippet {
    background: var(--html-text-main);
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 1rem 0;
}

.html-usecase-panel {
    margin: 2rem 0;
}

.html-usecase-panel h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--html-text-main);
    margin-bottom: 1rem;
}

.usecase-list {
    list-style: none;
    padding: 0;
}

.usecase-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: var(--html-text-main);
}

.usecase-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--html-primary);
    font-weight: bold;
}

.html-pros-cons {
    margin: 2rem 0;
}

.html-pros-cons h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--html-text-main);
    margin-bottom: 1.5rem;
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.pros-block,
.cons-block {
    background: var(--html-surface-muted);
    border-radius: var(--html-radius-md);
    padding: 1.5rem;
}

.pros-block {
    border-left: 4px solid var(--html-success);
}

.cons-block {
    border-left: 4px solid var(--html-warning);
}

.pros-block h4,
.cons-block h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--html-text-main);
    margin-bottom: 1rem;
}

.pros-block ul,
.cons-block ul {
    list-style: none;
    padding: 0;
}

.pros-block li,
.cons-block li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: var(--html-text-main);
}

.pros-block li::before,
.cons-block li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--html-primary);
}

.html-topic-guide {
    margin: 2rem 0;
}

.html-topic-guide h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--html-text-main);
    margin-bottom: 1rem;
}

.topic-list {
    list-style: none;
    padding: 0;
}

.topic-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: var(--html-text-main);
}

.topic-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--html-primary);
}

.topic-list a {
    color: var(--html-primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.topic-list a:hover {
    border-bottom-color: var(--html-primary);
}

.html-how-tool-works {
    margin: 2rem 0;
}

.html-how-tool-works h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--html-text-main);
    margin-bottom: 1rem;
}

.html-how-tool-works p {
    line-height: 1.7;
    color: var(--html-text-main);
}

.html-accuracy {
    margin: 2rem 0;
}

.html-accuracy h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--html-text-main);
    margin-bottom: 1rem;
}

.html-accuracy ul {
    list-style: none;
    padding: 0;
}

.html-accuracy li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: var(--html-text-main);
}

.html-accuracy li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--html-primary);
}

.html-team-card {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--html-surface-muted);
    border-radius: var(--html-radius-md);
    border: 1px solid var(--html-border);
}

.html-team-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--html-text-main);
    margin-bottom: 1rem;
}

.html-team-card p {
    line-height: 1.7;
    color: var(--html-text-main);
    margin-bottom: 1rem;
}

.html-team-card a {
    color: var(--html-primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.html-team-card a:hover {
    border-bottom-color: var(--html-primary);
}

.trust-note {
    font-size: 0.9375rem;
    color: var(--html-text-muted);
    font-style: italic;
}

.feedback-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--html-shadow-lg);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 992px) {
    .converter-main {
        padding: 1.5rem;
    }
    
    .pros-cons-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .converter-card {
        padding: 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .convert-btn,
    .ghost-btn {
        width: 100%;
    }
    
    .action-buttons-row {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
    }
    
    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .html-preview-wrapper {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .converter-main {
        padding: 1rem;
    }
    
    .editor-wrapper {
        height: 250px;
    }
}

