/* assets/css/style.css - Пользовательские стили */

/* Общие стили */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Стили для сайдбара */
.sidebar {
    background: url(/assets/img/bg2.jpeg);
    position: sticky;
    background-size: contain;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link {
    border-radius: 5px;
    margin: 2px 10px;
    padding: 8px 10px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: #0d6efd;
}

/* Основная область контента */
.content-area {
    flex: 1;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Карточки модулей и заданий */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 180px;
    object-fit: cover;
}

.progress {
    height: 10px;
    border-radius: 5px;
}

/* Стили для прогресса */
.progress-card {
    position: relative;
    padding: 20px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.circle-progress {
    width: 120px;
    height: 120px;
    position: relative;
    margin: 0 auto;
}

.circle-progress canvas {
    position: absolute;
    top: 0;
    left: 0;
}

.circle-progress .percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
}

/* Стили для лидерборда */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.leaderboard-item:hover {
    transform: translateX(5px);
}

.leaderboard-position {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
}

.leaderboard-item:nth-child(1) .leaderboard-position {
    background-color: #ffc107;
}

.leaderboard-item:nth-child(2) .leaderboard-position {
    background-color: #6c757d;
}

.leaderboard-item:nth-child(3) .leaderboard-position {
    background-color: #cd7f32;
}

.leaderboard-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-points {
    font-weight: bold;
    color: #0d6efd;
}

/* Анимации для бейджей */
@keyframes badgeAnimation {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.badge-item {
    animation: badgeAnimation 0.5s forwards;
}

/* Стили для перетаскиваемых заданий */
.draggable-item {
    cursor: move;
    background-color: #f8f9fa;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 2px solid #dee2e6;
    transition: background-color 0.3s;
}

.draggable-item:hover {
    background-color: #e9ecef;
}

.draggable-container {
    min-height: 50px;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    border: 2px dashed #dee2e6;
    margin-bottom: 20px;
}

/* Стили для модальных окон */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.modal-header {
    background-color: #f8f9fa;
}

/* Стили для детского интерфейса */
.btn {
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
}

.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-warning {
    background-color: #f6c23e;
    border-color: #f6c23e;
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-info {
    background-color: #36b9cc;
    border-color: #36b9cc;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        z-index: 1000;
        width: 100% !important;
        height: auto;
        bottom: 0;
        top: auto;
    }
    
    .sidebar .nav {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .sidebar .nav-link {
        margin: 2px 5px;
        white-space: nowrap;
    }
    
    .content-area {
        margin-bottom: 60px;
    }
    
    .sidebar > div > div:first-child,
    .sidebar > div > div:last-child {
        display: none;
    }
}