/* Контейнер */
.mt-container {
    width: 100%;
    max-width: 100%;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Элементы управления */
.mt-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Кнопки */
.mt-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
}

.mt-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.mt-btn.active {
    background: #2196F3;
}

/* Контейнер таблицы */
.mt-table-container {
    width: 100%;
    overflow: auto;
    margin-bottom: 20px;
    position: relative;
    max-height: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

/* Таблица */
.mt-table {
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    position: relative;
    min-width: min-content;
}

.mt-table th,
.mt-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
    transition: all 0.2s;
    min-width: 40px;
    height: 40px;
    box-sizing: border-box;
}

/* Заголовки столбцов (фиксированные) */
.mt-table thead th.column-header {
    background: #2196F3;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #ddd;
}

/* Угловая ячейка */
.mt-table thead th.corner-cell {
    background: #E65100;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 12;
}

/* Заголовки строк (фиксированные) */
.mt-table tbody th.row-header {
    background: #FF9800;
    color: white;
    font-weight: bold;
    position: sticky;
    left: 0;
    z-index: 11;
    border-right: 2px solid #ddd;
}

/* Обычные ячейки */
.mt-table td {
    background: white;
    position: relative;
}

/* Подсветка при наведении */
.mt-table td.highlight-row {
    background: #E3F2FD !important;
}

.mt-table td.highlight-column {
    background: #E3F2FD !important;
}

.mt-table th.highlight-row {
    background: #FFCC80 !important;
}

.mt-table th.highlight-column {
    background: #90CAF9 !important;
}

.mt-table td.highlight-both {
    background: #BBDEFB !important;
}

/* Секция поделиться */
.mt-share-section {
    text-align: center;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.mt-share-title {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.mt-share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Кнопки поделиться */
.mt-share-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: all 0.3s;
    font-size: 14px;
}

.mt-share-btn:hover {
    transform: scale(1.1);
}

.mt-share-vk {
    background: #4C75A3;
}

.mt-share-tg {
    background: #0088cc;
}

.mt-share-wa {
    background: #25D366;
}

.mt-share-copy {
    background: #9C27B0;
    font-size: 18px;
}

/* Уведомления */
.mt-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    background: #4CAF50;
    color: white;
    padding: 25px 35px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Адаптивные стили */

/* Desktop */
@media (max-width: 1024px) {
    .mt-table th,
    .mt-table td {
        padding: 10px;
        min-width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .mt-table-container {
        max-height: 500px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .mt-container {
        padding: 15px;
    }
    
    .mt-table th,
    .mt-table td {
        padding: 8px;
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .mt-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .mt-share-btn {
        width: 50px;
        height: 50px;
        font-size: 12px;
    }
    
    .mt-table-container {
        max-height: 400px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .mt-container {
        padding: 10px;
    }
    
    .mt-controls {
        gap: 5px;
    }
    
    .mt-btn {
        padding: 6px 12px;
        font-size: 11px;
        flex: 1;
        min-width: 60px;
    }
    
    .mt-table th,
    .mt-table td {
        padding: 4px;
        min-width: 25px;
        height: 25px;
        font-size: 10px;
    }
    
    .mt-share-buttons {
        gap: 10px;
    }
    
    .mt-share-btn {
        width: 45px;
        height: 45px;
        font-size: 11px;
    }
    
    .mt-notification {
        padding: 20px 25px;
        font-size: 16px;
    }
    
    .mt-table-container {
        max-height: 350px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .mt-table th,
    .mt-table td {
        padding: 3px;
        min-width: 22px;
        height: 22px;
        font-size: 9px;
    }
    
    .mt-share-btn {
        width: 40px;
        height: 40px;
        font-size: 10px;
    }
    
    .mt-table-container {
        max-height: 300px;
    }
}