/* Основные стили для страниц расписания */
body {
    font-family: 'Arial', sans-serif;
    background: #f8fbff;
    color: #2c5282;
    margin: 0;
    padding: 20px;
}

.raspisanie-container {
    max-width: 1100px;
    margin: 0 auto;
    background: #eef4ff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Заголовки университета и семестра */
.raspisanie-container p[align="center"] strong,
.raspisanie-container p[align="Center"],
.raspisanie-container p[align="center"] {
    display: block;
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
    color: #1a3c87;
}

.raspisanie-container p[align="right"] {
    text-align: right;
    font-size: 14px;
    color: #000;
    margin: 5px 0;
}

/* Заголовок группы и недели */
.raspisanie-container font[size="5"],
.raspisanie-container font[size="6"] {
    display: block;
    text-align: center;
    margin: 30px 0 10px;
    font-weight: bold;
    color: #1a3c87 !important;
}

.raspisanie-container font[color="#ff00ff"] {
    font-size: 24px !important;
    color: #6b46c1 !important; /* Более современный фиолетовый */
}

/* Таблицы расписания */
.raspisanie-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    font-size: 14px;
}

.raspisanie-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #dde8ff;
    vertical-align: middle;
}

.raspisanie-table tr:first-child td { /* Шапка "Пары" и номера */
    background: #dde8ff;
    font-weight: bold;
    color: #1a3c87;
}

.raspisanie-table tr:nth-child(2) td { /* Время */
    background: #f0f5ff;
    font-weight: bold;
    font-size: 13px;
}

.raspisanie-table td font[size="1"] {
    font-size: 13px !important;
    line-height: 1.4;
}

/* Дни недели (жирный курсив) */
.raspisanie-table b i {
    font-size: 14px;
    color: #1a3c87;
}

/* Выделение выбранного дня */
.day-selected {
    background: #eef4ff !important;
}

/* Адаптивность для мобильных */
@media (max-width: 868px) {
    body {
        padding: 10px;
    }

    .raspisanie-container {
        padding: 15px;
        border-radius: 0;
    }

    /* Обертка для скролла таблиц */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-radius: 10px;
    }

    .raspisanie-table {
        display: table; /* Возвращаем table для корректного sticky */
        min-width: 600px; /* Минимальная ширина, чтобы данные не слипались */
        margin-bottom: 10px;
    }

    /* Фиксация первого столбца (Дни недели) */
    .raspisanie-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: #f0f5ff;
        box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    }

    .raspisanie-table td {
        padding: 8px;
        font-size: 12px;
        white-space: normal; /* Разрешаем перенос текста */
    }

    .raspisanie-container font[color="#ff00ff"] {
        font-size: 20px !important;
    }
}