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

.tsv-converter-page {
    padding-bottom: 2rem;
}

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

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

.tsv-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    max-width: 760px;
    line-height: 1.6;
}

.tsv-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);
}

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

@media (max-width: 991px) {
    .tsv-main {
        padding: 1.5rem;
    }
}

.tsv-card {
    padding: 0;
}

.tsv-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 {
    margin-bottom: 1.5rem;
}

.input-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
    font-size: 0.9375rem;
}

.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(--tsv-primary-dark);
    transform: scale(1.1);
}

.tooltip-trigger:focus {
    outline: 2px solid var(--tsv-primary);
    outline-offset: 2px;
}

.tooltiptext {
    visibility: hidden;
    opacity: 0;
    width: 240px;
    background-color: var(--tsv-text-main);
    color: var(--tsv-text-inverse);
    text-align: left;
    border-radius: 8px;
    padding: 0.75rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -120px;
    font-size: 0.8125rem;
    line-height: 1.5;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

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

.tooltip:hover .tooltiptext,
.tooltip-trigger:focus + .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;
    width: 100%;
}

.editor-wrapper:focus-within {
    border-color: var(--tsv-primary);
    box-shadow: 0 0 0 3px var(--tsv-primary-shadow);
}

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

@media (max-width: 767px) {
    .editor-wrapper {
        height: 250px;
        min-height: 250px;
    }
    
    .editor-wrapper .editor {
        height: 250px !important;
        min-height: 250px;
    }
}

.tsv-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9375rem;
    background: var(--tsv-surface);
    color: var(--tsv-text-main);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230f172a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.tsv-select:focus {
    outline: none;
    border-color: var(--tsv-primary);
    box-shadow: 0 0 0 3px var(--tsv-primary-shadow);
}

.tsv-select:hover {
    border-color: var(--tsv-border-dark);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.convert-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: var(--tsv-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--tsv-primary-shadow);
}

.convert-btn:hover {
    background: var(--tsv-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--tsv-primary-shadow);
}

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

.convert-btn:focus {
    outline: 2px solid var(--tsv-primary);
    outline-offset: 2px;
}

.ghost-btn {
    padding: 0.875rem 1.5rem;
    background: transparent;
    color: var(--tsv-text-main);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ghost-btn:hover {
    background: var(--light-bg);
    border-color: var(--tsv-border-dark);
}

.ghost-btn:focus {
    outline: 2px solid var(--tsv-primary);
    outline-offset: 2px;
}

.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;
}

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

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

.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);
}

.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(--tsv-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; }

/* Knowledge Section Styles - Single Card */
.tsv-knowledge {
    padding: 2rem 0;
}

.tsv-article-card {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--tsv-surface);
    border-radius: var(--border-radius);
    padding: clamp(2rem, 4vw, 3rem);
    box-shadow: var(--tsv-shadow-sm);
    border: 1px solid var(--tsv-border-light);
}

.tsv-card-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--tsv-border-light);
}

.tsv-card-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--tsv-text-main);
    margin-bottom: 1rem;
    line-height: 1.3;
}

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

.tsv-card-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.tsv-instruction-section,
.tsv-example-section,
.tsv-audience-section,
.tsv-comparison-section,
.tsv-guide-section,
.tsv-mechanics-section,
.tsv-boundaries-section,
.tsv-credibility-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--tsv-border-light);
}

.tsv-credibility-section {
    border-bottom: none;
    padding-bottom: 0;
}

.tsv-instruction-section h3,
.tsv-example-section h3,
.tsv-audience-section h3,
.tsv-comparison-section h3,
.tsv-guide-section h3,
.tsv-mechanics-section h3,
.tsv-boundaries-section h3,
.tsv-credibility-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tsv-text-main);
    margin-bottom: 1.5rem;
}

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

.tsv-steps-list li {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--tsv-text-main);
    margin-bottom: 0.75rem;
}

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

.tsv-example-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--tsv-surface-muted);
    border-radius: 8px;
    border-left: 3px solid var(--tsv-primary);
}

.tsv-example-item:last-child {
    margin-bottom: 0;
}

.tsv-example-item h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tsv-text-main);
    margin-bottom: 1rem;
}

.tsv-example-item p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--tsv-text-main);
    margin-bottom: 1rem;
}

.tsv-code-sample {
    background: var(--tsv-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.875rem;
    
    overflow-x: auto;
    margin: 1rem 0;
    color: var(--tsv-text-main);
    line-height: 1.6;
}

.tsv-audience-list {
    list-style: none;
    padding: 0;
}

.tsv-audience-list li {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--tsv-text-main);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.tsv-audience-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--tsv-primary);
    font-weight: bold;
    font-size: 1.25rem;
}

.tsv-comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tsv-strengths-block,
.tsv-limitations-block {
    padding: 1.5rem;
    background: var(--tsv-surface-muted);
    border-radius: 8px;
}

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

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

.tsv-strengths-block h4,
.tsv-limitations-block h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tsv-text-main);
    margin-bottom: 1rem;
}

.tsv-strengths-block ul,
.tsv-limitations-block ul {
    list-style: none;
    padding: 0;
}

.tsv-strengths-block li,
.tsv-limitations-block li {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--tsv-text-main);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.tsv-strengths-block li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--tsv-success);
    font-weight: bold;
}

.tsv-limitations-block li::before {
    content: "⚠";
    position: absolute;
    left: 0;
    color: var(--tsv-warning);
    font-weight: bold;
}

.tsv-guide-list {
    list-style: none;
    padding: 0;
}

.tsv-guide-list li {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--tsv-text-main);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.tsv-guide-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--tsv-primary);
    font-weight: bold;
}

.tsv-guide-list a {
    color: var(--tsv-primary);
    text-decoration: none;
    font-weight: 600;
}

.tsv-guide-list a:hover {
    text-decoration: underline;
}

.tsv-mechanics-section p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--tsv-text-main);
}

.tsv-boundaries-list {
    list-style: none;
    padding: 0;
}

.tsv-boundaries-list li {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--tsv-text-main);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.tsv-boundaries-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--tsv-text-muted);
    font-weight: bold;
}

.tsv-credibility-section p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--tsv-text-main);
    margin-bottom: 1rem;
}

.tsv-credibility-section a {
    color: var(--tsv-primary);
    text-decoration: none;
    font-weight: 600;
}

.tsv-credibility-section a:hover {
    text-decoration: underline;
}

.tsv-credibility-note {
    background: var(--tsv-primary-light);
    border-left: 4px solid var(--tsv-primary);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9375rem;
    color: var(--tsv-text-main);
}

/* Responsive Design */
@media (max-width: 991px) {
    .tsv-main {
        padding: 1.5rem;
    }
    
    .results-header {
        padding: 1rem;
    }
    
    .result-content {
        padding: 1rem;
    }
    
    .result-actions {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .tsv-intro {
        margin-bottom: 1.5rem;
    }
    
    .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);
    }
    
    .pros-cons-grid {
        grid-template-columns: 1fr;
    }
    
    .tsv-knowledge {
        padding: 2rem 0;
    }
    
    .tsv-article-card {
        padding: 1.5rem;
    }
    
    .tsv-card-content {
        gap: 2rem;
    }
    
    .tsv-instruction-section,
    .tsv-example-section,
    .tsv-audience-section,
    .tsv-comparison-section,
    .tsv-guide-section,
    .tsv-mechanics-section,
    .tsv-boundaries-section,
    .tsv-credibility-section {
        padding-bottom: 1.5rem;
    }
    
    .tsv-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .tsv-preview-wrapper {
        height: 300px;
    }
}

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

/* Accessibility */
.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;
}

/* Focus styles for keyboard navigation */
button:focus-visible,
a:focus-visible,
select:focus-visible {
    outline: 2px solid var(--tsv-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .tsv-main,
    .result-actions,
    .share-container {
        display: none;
    }
}

