/* public/static/css/base.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

header {
    top: 0;
    z-index: 1;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
}

.logo a {
    color: #4CAF50;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

nav a:hover {
    background-color: #f0f0f0;
    color: #4CAF50;
}

main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    min-height: calc(100vh - 180px);
}

footer {
    color: white;
    padding: 30px 20px;
    margin-top: 50px;
    text-align: center;
}

footer a {
    color: #4CAF50;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

/* Стили для страниц квизов */
.quiz-card {
    transition: transform 0.2s;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.quiz-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    border-radius: 0 0 20px 20px;
}

.quiz-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.badge {
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Прогресс бар */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    border-radius: 4px;
}

/* Карточка вопроса */
.question-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border-left: 4px solid #0d6efd;
}

/* Кнопки действий */
.btn-quiz {
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-quiz:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Анимация для таймера */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.timer-warning {
    animation: pulse 1s infinite;
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
}

/* Результаты */
.result-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.result-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: bold;
}

/* Адаптивность */
@media (max-width: 768px) {
    .quiz-header {
        padding: 25px 0;
        border-radius: 0 0 15px 15px;
    }

    .question-card {
        padding: 15px;
    }

    .timer {
        position: static;
        width: 100%;
        margin-bottom: 20px;
    }
}

/* ВРЕМЕННЫЙ ФИКС ДЛЯ МОДАЛЬНЫХ ОКОН */
.modal {
    z-index: 9999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: none !important;
}

.modal.show {
    display: block !important;
}

.modal-backdrop {
    z-index: 9998 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.modal-dialog {
    z-index: 10000 !important;
    position: relative !important;
    margin: auto !important;
    max-width: 500px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Принудительное отключение всех эффектов размытия и затемнений */
.modal-open {
    overflow: hidden !important;
}

.modal-open .room-container,
.modal-open .teams-section,
.modal-open .room-header,
.modal-open .stat-card {
    filter: none !important;
    opacity: 0.3 !important;
    pointer-events: none !important;
}


/* Исправляем позиционирование */
body.modal-open {
    padding-right: 0 !important;
    overflow: hidden !important;
}

/* Принудительное отображение модального окна */
.modal.fade .modal-dialog {
    pointer-events: all !important;
}

/* Исправляем форму */
#createTeamModal input,
#createTeamModal button,
#createTeamModal select,
#createTeamModal textarea {
    position: relative !important;
    z-index: 10001 !important;
    pointer-events: all !important;
}
