/* ============================================
СТИЛИ ДЛЯ ИГРЫ В КАРТОЧКИ
============================================ */

/* Общие стили карточек */
.card-game-card {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Статусы игровых сессий */
.session-status-waiting {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.session-status-progress {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.session-status-completed {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* Карточки для ответов */
.answer-card {
    border-left: 4px solid #007bff;
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
}

.answer-card.answered {
    border-left-color: #28a745;
    background: linear-gradient(to right, #d4edda 0%, #ffffff 100%);
}

/* Карточки для проверки */
.check-card {
    border-left: 4px solid #ffc107;
    background: linear-gradient(to right, #fff3cd 0%, #ffffff 100%);
}

.check-card.checked {
    border-left-color: #6c757d;
    background: linear-gradient(to right, #e2e3e5 0%, #ffffff 100%);
}

/* Рейтинг звездочками */
.star-rating {
    display: inline-flex;
    gap: 5px;
}

.star-rating i {
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.5rem;
}

.star-rating i:hover {
    transform: scale(1.2);
}

/* Прогресс игры */
.game-progress {
    position: relative;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
}

.game-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Участники игры */
.participant-card {
    border: 2px solid transparent;
    transition: all 0.3s;
}

.participant-card.active {
    border-color: #007bff;
    background: #e7f3ff;
}

.participant-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Анимация появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease;
}

/* Кнопки действий */
.action-btn {
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Бейджи статусов */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-invited {
    background: #fff3cd;
    color: #856404;
}

.status-joined {
    background: #d1ecf1;
    color: #0c5460;
}

.status-ready {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #e2e3e5;
    color: #383d41;
}

.status-waiting {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #d1ecf1;
    color: #0c5460;
}

/* Правильный/неправильный ответ */
.answer-correct {
    border-left: 5px solid #28a745;
    background: #d4edda;
}

.answer-incorrect {
    border-left: 5px solid #dc3545;
    background: #f8d7da;
}

/* Загрузка */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #6c757d;
    margin-bottom: 10px;
}

.empty-state p {
    color: #adb5bd;
}

/* Адаптивность */
@media (max-width: 768px) {
    .participant-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Скролл для карточек */
.cards-scroll-container {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.cards-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.cards-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cards-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.cards-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Таймер (для будущего функционала) */
.game-timer {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.game-timer.warning {
    color: #ffc107;
    animation: pulse 1s infinite;
}

.game-timer.danger {
    color: #dc3545;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Результаты игры */
.results-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin: 40px 0;
}

.podium-place {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    min-width: 120px;
}

.podium-place.first {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    height: 200px;
    font-size: 1.5rem;
}

.podium-place.second {
    background: linear-gradient(135deg, #c0c0c0 0%, #d3d3d3 100%);
    height: 150px;
    font-size: 1.3rem;
}

.podium-place.third {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a759 100%);
    height: 120px;
    font-size: 1.1rem;
}

/* Feedback форма */
.feedback-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.feedback-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Кнопки рейтинга */
.rating-buttons .btn {
    min-width: 50px;
}

.rating-buttons .btn-check:checked + .btn {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
}

/* Подсказки */
.hint-tooltip {
    position: relative;
    cursor: help;
}

.hint-tooltip:hover::after {
    content: attr(data-hint);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 0.85rem;
    z-index: 1000;
}

/* Font Awesome для карточек */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');
