/* ================================================== */
/* МОДАЛЬНЫЕ ОКНА - ОБЩИЕ СТИЛИ */
/* ================================================== */

.student-details-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    backdrop-filter: blur(5px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-details-card {
    background: white;
    position: relative;
    width: 95%;
    max-width: 500px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s ease;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .student-details-card {
        width: 90%;
        max-width: 700px;
        max-height: 90vh;
        border-radius: 25px;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.student-details-header {
    background: linear-gradient(135deg, var(--primary-gold), var(--accent-gold));
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.student-details-header h3 {
    font-family: 'Raleway', sans-serif;
    font-weight: 900;
    font-size: 1.1em;
    margin: 0 0 3px 0;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.student-details-header p {
    font-family: 'Lato', sans-serif;
    font-size: 0.85em;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.close-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: white;
    font-size: 1.5em;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    font-weight: 700;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.student-details-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* ================================================== */
/* СТАТИСТИЧЕСКИЕ КАРТОЧКИ */
/* ================================================== */

.student-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

@media (min-width: 480px) {
    .student-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    text-align: center;
    padding: 12px 8px;
    background: rgba(217, 184, 110, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(217, 184, 110, 0.2);
}

.stat-value {
    font-family: 'Raleway', sans-serif;
    font-weight: 900;
    font-size: 1.5em;
    color: var(--primary-gold);
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    font-family: 'Lato', sans-serif;
    font-size: 0.7em;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.2;
}

@media (min-width: 400px) {
    .stat-value {
        font-size: 1.8em;
    }
    .stat-label {
        font-size: 0.75em;
    }
}

/* ================================================== */
/* ИСТОРИЯ СОРЕВНОВАНИЙ */
/* ================================================== */

.competitions-history {
    margin-top: 20px;
}

.competitions-history h4 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 1em;
    margin: 0 0 15px 0;
    color: rgba(0, 0, 0, 0.8);
}

.competition-item {
    background: rgba(217, 184, 110, 0.05);
    border-left: 4px solid var(--primary-gold);
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.competition-item:hover {
    background: rgba(217, 184, 110, 0.1);
    transform: translateX(3px);
}

.competition-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.competition-name {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 0.95em;
    color: rgba(0, 0, 0, 0.85);
}

.competition-place {
    font-size: 1.3em;
    flex-shrink: 0;
}

.competition-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.competition-detail {
    font-family: 'Lato', sans-serif;
    font-size: 0.8em;
    color: rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
}

/* ================================================== */
/* КНОПКИ ФИЛЬТРОВ */
/* ================================================== */

.period-tab-small {
    padding: 8px 12px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.75em;
    letter-spacing: 0.5px;
    text-align: center;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: rgba(0, 0, 0, 0.7);
}

.period-tab-small:hover {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

.period-tab-small.active {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: white;
    font-weight: 700;
}

.category-card {
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 18px 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Lato', sans-serif;
    text-align: center;
}

.category-card:hover {
    border-color: var(--primary-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 184, 110, 0.2);
}

.category-card.active {
    background: white;
    border: 2px solid var(--primary-gold);
}

/* ================================================== */
/* ТАБЛИЦА РЕЙТИНГОВ */
/* ================================================== */

.ratings-table-wrapper {
    overflow-x: auto;
    margin-top: 15px;
}

.ratings-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Lato', sans-serif;
}

.ratings-table thead {
    background: rgba(217, 184, 110, 0.1);
}

.ratings-table th {
    padding: 12px 8px;
    text-align: left;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 0.85em;
    color: rgba(0, 0, 0, 0.7);
    border-bottom: 2px solid var(--primary-gold);
}

.ratings-table td {
    padding: 12px 8px;
    font-size: 0.9em;
    color: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ratings-table tbody tr {
    transition: background 0.2s;
}

.ratings-table tbody tr:hover {
    background: rgba(217, 184, 110, 0.05);
}

/* Цвета для медалей в таблице attendance */
.medal-gold {
    color: #FFD700 !important;
    font-weight: 700;
}

.medal-silver {
    color: #C0C0C0 !important;
    font-weight: 700;
}

.medal-bronze {
    color: #CD7F32 !important;
    font-weight: 700;
}

.medal-total {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ================================================== */
/* СПИСОК УПРАЖНЕНИЙ */
/* ================================================== */

.exercise-category {
    margin-bottom: 25px;
}

.exercise-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--primary-gold), var(--accent-gold));
    border-radius: 12px;
    margin-bottom: 12px;
}

.exercise-category-icon {
    font-size: 1.5em;
}

.exercise-category-name {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 1em;
    color: white;
    flex: 1;
}

.exercise-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exercise-card {
    background: rgba(217, 184, 110, 0.05);
    border: 2px solid rgba(217, 184, 110, 0.2);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.exercise-card:hover {
    background: rgba(217, 184, 110, 0.1);
    border-color: var(--primary-gold);
    transform: translateX(3px);
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.exercise-name {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 0.95em;
    color: rgba(0, 0, 0, 0.85);
}

.exercise-best {
    font-family: 'Raleway', sans-serif;
    font-weight: 900;
    font-size: 1.1em;
    color: var(--primary-gold);
}

.exercise-stats {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.exercise-stat {
    font-family: 'Lato', sans-serif;
    font-size: 0.8em;
    color: rgba(0, 0, 0, 0.6);
}

/* ================================================== */
/* MOBILE OPTIMIZATIONS */
/* ================================================== */

@media (max-width: 767px) {
    .hide-mobile {
        display: none;
    }
}

/* ================================================== */
/* КАРТОЧКИ РЕЗУЛЬТАТОВ ТЕСТОВ */
/* ================================================== */

.test-result-card {
    background: rgba(217, 184, 110, 0.05);
    border: 1px solid rgba(217, 184, 110, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.test-result-card:hover {
    background: rgba(217, 184, 110, 0.1);
    border-color: rgba(217, 184, 110, 0.4);
}

.test-result-name {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.95em;
    color: rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

.test-result-values {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.test-best {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9em;
}

.test-last {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
}

