/* Universal Converter v3 */
.tool-page__content { display: grid; grid-template-columns: 1fr 380px; gap: var(--space-6); align-items: start; }
.tool-right-col { display: flex; flex-direction: column; gap: var(--space-5); position: sticky; top: var(--space-4); }

/* Ads */
.uc-ad { margin: var(--space-4) 0; text-align: center; overflow: hidden; }
.uc-ad__wrap { display: inline-block; max-width: 100%; overflow: hidden; }
.uc-ad--728 { display: block; }
.uc-ad--300 { display: none; }
@media (max-width: 768px) { .uc-ad--728 { display: none; } .uc-ad--300 { display: block; } }
.uc-ad iframe { max-width: 100% !important; }
.uc-ad--sidebar { text-align: center; }
.uc-ad--result { margin: var(--space-4) 0; text-align: center; }

/* File List */
.uc-file-list { padding: var(--space-3); max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.uc-file-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg-tertiary); border-radius: var(--radius-md); font-size: 13px; transition: background 0.15s; }
.uc-file-item:hover { background: var(--gray-100); }
.uc-file-item__icon { flex-shrink: 0; color: var(--text-secondary); }
.uc-file-item__name { flex: 1; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-file-item__size { font-size: 11px; color: var(--text-tertiary); flex-shrink: 0; }
.uc-file-item__format { font-size: 10px; font-weight: 700; color: var(--primary-700); background: var(--primary-100); padding: 2px 6px; border-radius: var(--radius-sm); text-transform: uppercase; flex-shrink: 0; }
.uc-file-item__remove { border: none; background: none; color: var(--text-tertiary); cursor: pointer; font-size: 16px; padding: 0 4px; line-height: 1; }
.uc-file-item__remove:hover { color: var(--error, #ef4444); }

.uc-file-count { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: var(--bg-tertiary); border-top: 1px solid var(--gray-100); font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.uc-file-count__add { border: none; background: var(--primary-100); color: var(--primary-700); padding: 4px 10px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; cursor: pointer; }
.uc-file-count__add:hover { background: var(--primary-200); }

/* Overlay */
.uc-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.8); backdrop-filter: blur(4px); display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-lg); z-index: 10; gap: 12px; }
.uc-overlay.hidden { display: none; }
.uc-overlay__text { color: #fff; font-size: var(--text-sm); font-weight: 500; }
.uc-overlay__count { color: rgba(255,255,255,0.7); font-size: 12px; }
.uc-spinner { width: 44px; height: 44px; border: 4px solid rgba(255,255,255,0.25); border-top-color: #fff; border-radius: 50%; animation: uc-spin 0.8s linear infinite; }
@keyframes uc-spin { to { transform: rotate(360deg); } }
.uc-progress-bar { width: 200px; height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; overflow: hidden; }
.uc-progress-bar__fill { height: 100%; width: 0%; background: #fff; border-radius: 3px; transition: width 0.3s ease; }

/* Result list */
.uc-result-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); max-height: 300px; overflow-y: auto; }
.uc-result-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-tertiary); border-radius: var(--radius-md); border: 1px solid var(--gray-100); cursor: pointer; transition: all 0.15s; }
.uc-result-item:hover { border-color: var(--primary-300); background: var(--primary-50); }
.uc-result-item__icon { flex-shrink: 0; color: var(--text-secondary); }
.uc-result-item__name { flex: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-result-item__size { font-size: 11px; color: var(--text-tertiary); flex-shrink: 0; }
.uc-result-item__dl { font-size: 11px; font-weight: 600; color: var(--primary-700); background: var(--primary-100); padding: 3px 8px; border-radius: var(--radius-sm); display: flex; align-items: center; }

/* Format grid */
.uc-formats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

/* Shared styles */
.tc-breadcrumb { font-size: var(--text-xs); color: var(--text-tertiary); margin-bottom: var(--space-4); }
.tc-breadcrumb a { color: var(--text-tertiary); text-decoration: none; } .tc-breadcrumb a:hover { color: var(--primary-600); }
.tc-breadcrumb span { margin: 0 var(--space-1); } .tc-breadcrumb span:last-child { color: var(--text-primary); font-weight: 500; }
.tc-header { display: flex; align-items: flex-start; gap: var(--space-4); margin-bottom: var(--space-6); }
.tc-header__icon { flex-shrink: 0; margin-top: 2px; color: var(--primary-600); }
.tc-header__title { font-size: var(--text-2xl); font-weight: 700; margin: 0 0 var(--space-1); }
.tc-header__desc { font-size: var(--text-sm); color: var(--text-secondary); margin: 0; line-height: 1.5; }
.tc-sizes { display: flex; align-items: center; gap: var(--space-3); }
.tc-sizes__box { flex: 1; text-align: center; padding: var(--space-3); background: var(--bg-tertiary); border-radius: var(--radius-lg); border: 1px solid var(--gray-100); }
.tc-sizes__box--output { background: var(--primary-50); border-color: var(--primary-200); }
.tc-sizes__label { font-size: 10px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.tc-sizes__value { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); }
.tc-sizes__box--output .tc-sizes__value { color: var(--primary-700); }
.tc-sizes__arrow { font-size: var(--text-xl); color: var(--text-tertiary); flex-shrink: 0; }
.tc-fmt { padding: 9px 6px; font-size: 12px; font-weight: 600; text-align: center; background: var(--bg-tertiary); border: 2px solid transparent; border-radius: var(--radius-md); cursor: pointer; transition: all 0.15s; color: var(--text-secondary); }
.tc-fmt:hover { background: var(--gray-100); color: var(--text-primary); } .tc-fmt.active { background: var(--primary-100); border-color: var(--primary-500); color: var(--primary-700); }
.tc-target { display: flex; gap: 8px; }
.tc-target__field { flex: 1; display: flex; border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); overflow: hidden; }
.tc-target__field:focus-within { border-color: var(--primary-400); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.tc-target__input { flex: 1; border: none; padding: 10px 12px; font-size: 14px; font-weight: 600; text-align: center; background: var(--bg-primary); color: var(--text-primary); outline: none; min-width: 0; }
.tc-target__input::placeholder { font-weight: 400; color: var(--text-tertiary); }
.tc-target__unit { padding: 10px 14px; font-size: 12px; font-weight: 700; border: none; border-left: 1.5px solid var(--gray-200); background: var(--bg-tertiary); color: var(--text-secondary); }
.tc-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; }
.tc-actions { padding: 12px; display: flex; gap: 8px; background: var(--bg-secondary); border-top: 1px solid var(--gray-100); }
.tc-actions .btn { flex: 1; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tc-actions .btn svg { flex-shrink: 0; }
.tc-note { margin-top: var(--space-4); padding: 10px 14px; background: var(--bg-tertiary); border-radius: var(--radius-md); font-size: 12px; color: var(--text-tertiary); line-height: 1.5; display: flex; align-items: flex-start; gap: 8px; }
.tc-note svg { flex-shrink: 0; margin-top: 1px; }
#btn-convert { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#btn-convert svg { flex-shrink: 0; }
.tc-result { max-width: 480px; margin: 0 auto; padding: var(--space-6); }
.tc-result__header { text-align: center; margin-bottom: var(--space-6); }
.tc-result__icon { margin-bottom: var(--space-2); color: var(--success); }
.tc-result__title { font-size: var(--text-xl); font-weight: 700; color: var(--success); margin: 0 0 var(--space-2); }
.tc-result__meta { font-size: var(--text-sm); color: var(--text-secondary); margin: 0; }
.tc-result__file { display: flex; align-items: center; gap: 12px; padding: var(--space-4); background: var(--bg-tertiary); border-radius: var(--radius-lg); margin-bottom: var(--space-4); border: 1px solid var(--gray-100); }
.tc-result__file-icon { flex-shrink: 0; color: var(--text-tertiary); }
.tc-result__filename { font-weight: 600; font-size: 14px; word-break: break-all; }
.tc-result__filesize { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.tc-result__rename { margin-bottom: var(--space-4); }
.tc-result__rename label { font-size: 12px; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 6px; }
.tc-result__rename input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); font-size: 14px; background: var(--bg-primary); box-sizing: border-box; }
.tc-result__rename input:focus { outline: none; border-color: var(--primary-400); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.tc-result__actions { display: flex; gap: 10px; margin-bottom: var(--space-4); }
.tc-result__actions .btn { flex: 1; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tc-result__actions .btn svg { flex-shrink: 0; }
.tc-related { padding-top: var(--space-4); border-top: 1px solid var(--gray-100); }
.tc-related__title { font-size: 11px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: var(--space-3); }
.tc-related__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tc-related__grid a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; background: var(--bg-tertiary); border-radius: var(--radius-md); font-size: 13px; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: all 0.15s; border: 1px solid transparent; }
.tc-related__grid a svg { flex-shrink: 0; }
.tc-related__grid a:hover { background: var(--primary-50); color: var(--primary-700); border-color: var(--primary-200); }
.tc-faq { display: flex; flex-direction: column; gap: var(--space-3); }
.tc-faq details { background: var(--bg-secondary); border-radius: var(--radius-lg); border: 1px solid var(--gray-100); padding: var(--space-4); }
.tc-faq details[open] { border-color: var(--primary-200); }
.tc-faq summary { font-weight: 500; cursor: pointer; font-size: var(--text-sm); }
.tc-faq p { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; }

@media (max-width: 768px) {
    .tool-page__content { grid-template-columns: 1fr; }
    .tool-right-col { position: static; }
    .tc-header { gap: var(--space-3); } .tc-header__title { font-size: var(--text-xl); }
    .uc-formats { grid-template-columns: repeat(3, 1fr); }
    .tc-result { padding: var(--space-4); }
    .tc-related__grid { grid-template-columns: 1fr; }
}