/* Стили для плавающей кнопки выбора семестра */
.floating-semester-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #084298;
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(74, 111, 165, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    z-index: 200;
    opacity: 0.7;
    transition: var(--transition);
}

.floating-semester-btn:hover {
    opacity: 0.9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 111, 165, 0.4);
}

.floating-semester-btn.active {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 111, 165, 0.5);
}

.semester-dropdown {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 220px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 199;
    opacity: 0;
    visibility: hidden;
}

.semester-dropdown.open {
    max-height: 400px;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
}

.semester-option {
    padding: 0.6rem 0.7rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.semester-option:hover {
    background-color: #f8f9fa;
}

.semester-option.active {
    background-color: #cfe2ff;
    font-weight: 600;
}

.semester-option-name {
    flex: 1;
    font-size: 0.9rem;
}

.semester-option-number {
    background-color: #084298;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-left: 10px;
}

.semester-option.active .semester-option-number {
    background-color: #0d6efd;
}

.subjects-header {
    padding: 1.5rem;
    background: #084298;
    color: white;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.selected-semester-info {
    flex: 1;
    min-width: 250px;
}

.selected-semester {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.semester-date {
    font-size: 0.95rem;
    opacity: 0.9;
}

.stats {
    display: flex;
    gap: 25px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

.subjects-list {
    padding: 1rem;
}

/* Стили для карточек дисциплин */
.subject-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    border-left: 4px solid #3d8bfd;
    transition: var(--transition);
}

.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.subject-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #eaeaea;
}

.subject-title {
    font-weight: 700;
    font-size: 1rem;
    flex: 1;
    line-height: 1.4;
    color: #2c3e50;
}

.subject-marks {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 120px;
}

.mark {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.mark-empty {
    background-color: #f1aeb5;
    color: #dc3545;
}

.mark-passed {
    background-color: #a3cfbb;
    color: #198754;
}

.mark-good {
    background-color: #fecba1;
    color: #ca6510;
}

.mark-satisfactory {
    background-color: #f1aeb5;
    color: #721c24;
}

.mark-other {
    background-color: #e9ecef;
    color: #6c757d;
}

.credits-badge {
    background-color: #e9ecef;
    color: #495057;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.subject-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 5px;
    font-size: 0.9rem;
}

.subject-detail-item {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.subject-detail-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.subject-detail-value {
    font-weight: 500;
    color: #495057;
}

.type-exam {
    color: #4a6fa5;
    font-weight: 600;
}

.type-credit {
    color: #198754;
    font-weight: 600;
}

.no-data {
    padding: 3rem 1rem;
    text-align: center;
    color: #777;
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #4a6fa5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Адаптивность */
@media (max-width: 768px) {            
    .subjects-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .selected-semester-info {
        text-align: center;
    }
    
    .stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .subject-card-header {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 5px;
    }
    
    .subject-marks {
        align-items: flex-start;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .subject-details-grid {
        grid-template-columns: 1fr;
    }

    .subject-detail-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .floating-semester-btn {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .semester-dropdown {
        right: 20px;
        width: 200px;
    }
}

@media (max-width: 480px) {
    .floating-semester-btn {
        bottom: 15px;
        right: 15px;
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .semester-dropdown {
        right: 15px;
        width: 200px;
        bottom: 85px;
    }
    
    .stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stat-value {
        font-size: 1.2rem;
        margin-right: 10px;
    }
    
    .subject-card {
        padding: 1.2rem;
    }
}