/*
 * formats.css — стили страницы форматов UniConvert.
 * Используется: formats.html.
 */

/* ── Герой ───────────────────────────────────────────────────────────────────── */
.formats-hero {
    text-align: center;
    padding: 20px 0 40px;
}
.formats-hero h1 {
    color: white;
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.formats-hero p {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
}

/* ── Фильтр-табы ─────────────────────────────────────────────────────────────── */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}
.filter-tab {
    padding: 10px 24px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.1);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
.filter-tab:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}
.filter-tab.active {
    background: white;
    color: #764ba2;
    border-color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ── Поиск ───────────────────────────────────────────────────────────────────── */
.search-wrap {
    max-width: 420px;
    margin: 0 auto 35px;
    position: relative;
}
.search-wrap i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
}
.formats-search {
    width: 100%;
    padding: 13px 20px 13px 46px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.12);
    color: white;
    font-size: 1rem;
    outline: none;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
    transition: all 0.3s ease;
}
.formats-search::placeholder { color: rgba(255,255,255,0.55); }
.formats-search:focus {
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.2);
}

/* ── Секции ─────────────────────────────────────────────────────────────────── */
.formats-section {
    margin-bottom: 40px;
    transition: opacity 0.3s ease;
}
.section-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.95;
}
.section-title i { font-size: 1.2rem; }

/* ── Карточки форматов ───────────────────────────────────────────────────────── */
.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}
.format-card {
    background: rgba(255,255,255,0.93);
    border-radius: 16px;
    padding: 20px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.format-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--card-color, #764ba2);
    border-radius: 16px 16px 0 0;
}
.format-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    border-color: var(--card-color, #764ba2);
}
.format-card.selected {
    border-color: var(--card-color, #764ba2);
    box-shadow: 0 0 0 3px rgba(118,75,162,0.2), 0 12px 30px rgba(0,0,0,0.2);
    transform: translateY(-5px);
}
.format-card.hidden { display: none; }

.format-ext {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--card-color, #764ba2);
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.format-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.format-desc {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}
.format-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
}
.format-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
    background: rgba(118,75,162,0.1);
    color: var(--card-color, #764ba2);
    opacity: 0.85;
}

/* ── Панель конвертации ──────────────────────────────────────────────────────── */
.convert-panel {
    display: none;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 28px 30px;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    animation: panelSlide 0.35s ease;
    border-left: 5px solid #764ba2;
}
.convert-panel.visible { display: block; }

@keyframes panelSlide {
    from { opacity: 0; transform: translateY(-15px); }
    to   { opacity: 1; transform: translateY(0); }
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.panel-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}
.panel-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}
.panel-close:hover { background: #f0f0f0; color: #333; }
.panel-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 16px;
}
.convert-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.convert-target-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(118,75,162,0.3);
}
.convert-target-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(118,75,162,0.5);
    color: white;
}
.convert-target-btn.future-btn {
    background: #e0e0e0;
    color: #888;
    box-shadow: none;
    cursor: not-allowed;
}
.convert-target-btn.future-btn:hover { transform: none; }
.convert-target-btn i { font-size: 0.9rem; }

/* ── Матрица совместимости ───────────────────────────────────────────────────── */
.matrix-section {
    background: rgba(255,255,255,0.93);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    overflow-x: auto;
}
.matrix-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}
.matrix-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 24px;
}
.matrix-table {
    border-collapse: collapse;
    min-width: 100%;
    font-size: 0.82rem;
}
.matrix-table th {
    padding: 8px 12px;
    text-align: center;
    font-weight: 700;
    color: #764ba2;
    background: rgba(118,75,162,0.06);
    border: 1px solid #ececec;
    white-space: nowrap;
}
.matrix-table th.row-header {
    text-align: left;
    color: #555;
    background: #fafafa;
    min-width: 80px;
}
.matrix-table td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #ececec;
    transition: background 0.2s;
}
.matrix-table td.row-label {
    font-weight: 700;
    color: #764ba2;
    background: rgba(118,75,162,0.04);
    text-align: left;
}
.matrix-table tr:hover td { background: rgba(118,75,162,0.04); }
.matrix-table tr:hover td.row-label { background: rgba(118,75,162,0.1); }
.cell-yes { color: #2e7d32; font-size: 1rem; text-decoration: none; }
.cell-no  { color: #e0e0e0; font-size: 0.8rem; }
.cell-same { color: #bbb; }

/* ── Статистика ──────────────────────────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}
.stat-card {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}
.stat-card:hover { background: rgba(255,255,255,0.25); transform: translateY(-3px); }
.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Нет результатов ─────────────────────────────────────────────────────────── */
.formats-section.hidden { display: none; }
.no-results {
    text-align: center;
    color: rgba(255,255,255,0.7);
    padding: 40px;
    display: none;
    font-size: 1.1rem;
}
.no-results.visible { display: block; }

/* ── Тёмная тема ─────────────────────────────────────────────────────────────── */
[data-theme="dark"] .format-card { background: rgba(30,30,50,0.97); }
[data-theme="dark"] .format-desc { color: #a0a0b8; }
[data-theme="dark"] .format-name { color: #6060a0; }
[data-theme="dark"] .format-tag  { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .convert-panel { background: rgba(25,25,45,0.98); border-left-color: #7c3aed; }
[data-theme="dark"] .panel-title   { color: #e0e0e0; }
[data-theme="dark"] .panel-subtitle { color: #6060a0; }
[data-theme="dark"] .panel-close   { color: #6060a0; }
[data-theme="dark"] .panel-close:hover { background: #2d2d4e; color: #e0e0e0; }
[data-theme="dark"] .matrix-section { background: rgba(25,25,45,0.98); }
[data-theme="dark"] .matrix-title   { color: #e0e0e0; }
[data-theme="dark"] .matrix-table th { background: rgba(124,58,237,0.15); border-color: #2d2d4e; color: #a78bfa; }
[data-theme="dark"] .matrix-table th.row-header { background: #1a1a30; color: #8080b0; }
[data-theme="dark"] .matrix-table td { border-color: #2d2d4e; }
[data-theme="dark"] .matrix-table td.row-label { background: rgba(124,58,237,0.08); color: #a78bfa; }
[data-theme="dark"] .matrix-table tr:hover td { background: rgba(124,58,237,0.06); }
[data-theme="dark"] .matrix-table tr:hover td.row-label { background: rgba(124,58,237,0.15); }
[data-theme="dark"] .cell-no { color: #2d2d4e; }
[data-theme="dark"] .convert-target-btn.future-btn { background: #2d2d4e; color: #8080b0; }
