/* ===== CSS ДЛЯ СТРАНИЦЫ ИГРЫ "КРЕСТИКИ-НОЛИКИ" ===== */

/* Хлебные крошки */
.breadcrumbs {
    padding: 1.5rem 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.breadcrumbs .container {
    font-size: 0.9rem;
    color: #666;
}

.breadcrumbs a {
    color: #597d89;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #4a6a75;
    text-decoration: underline;
}

.breadcrumbs span {
    color: #2c3e50;
    font-weight: 600;
}

/* Контейнер для всей игры */
.tic-tac-toe-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Заголовок страницы */
.game-title-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(89, 125, 137, 0.1) 0%, rgba(200, 228, 237, 0.2) 100%);
    border-radius: 15px;
    border-left: 5px solid #597d89;
    border-right: 5px solid #597d89;
}

.game-title {
    font-size: 2.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.game-subtitle {
    font-size: 1.3rem;
    color: #4a6a75;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Основной контент игры в две колонки */
.game-main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

/* Левая колонка: игровое поле */
.game-area {
    background: #f6fafb;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
}

/* Правая колонка: информация о персонажах и статистика */
.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Панель выбора персонажей */
.character-selection {
    background: white;
    border-radius: 15px;
    padding: 1.8rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.character-selection h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.4rem;
}

/* Вертикальное расположение персонажей */
.character-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.character-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    gap: 1rem;
}

.character-option:hover {
    transform: translateY(-3px);
    border-color: #c8e4ed;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.character-option.selected {
    border-color: #597d89;
    background: rgba(89, 125, 137, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(89, 125, 137, 0.2);
}

.character-icon {
    font-size: 2.5rem;
    color: #597d89;
    min-width: 60px;
    text-align: center;
}

.character-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.character-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.3;
}

/* Блок с текущим ходом */
.current-turn {
    background: linear-gradient(135deg, #597d89 0%, #4a6a75 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(89, 125, 137, 0.3);
}

.current-turn-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.current-player {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.current-symbol {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

/* Счетчик раундов и статистика */
.game-stats {
    background: white;
    border-radius: 15px;
    padding: 1.8rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #597d89;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.3rem;
}

.round-progress {
    margin-top: 1.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #597d89, #4a6a75);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 5px;
}

/* Игровое поле */
.game-board-container {
    max-width: 500px;
    margin: 0 auto;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 12px;
    margin: 2rem auto;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.cell {
    aspect-ratio: 1;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 3.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cell:hover {
    background: #e9ecef;
    transform: scale(1.03);
}

.cell.x {
    color: #2c3e50;
}

.cell.o {
    color: #597d89;
}

.cell.winning {
    background: linear-gradient(135deg, rgba(89, 125, 137, 0.2), rgba(200, 228, 237, 0.3));
    border-color: #597d89;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(89, 125, 137, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(89, 125, 137, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(89, 125, 137, 0); }
}

/* Панель управления */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Сообщение о победе/окончании игры */
.game-message {
    text-align: center;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 600px;
    border-radius: 15px;
    display: none;
}

.game-message.win {
    background: linear-gradient(135deg, rgba(89, 125, 137, 0.1), rgba(200, 228, 237, 0.2));
    border: 2px solid #597d89;
    display: block;
}

.game-message.draw {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.1), rgba(233, 236, 239, 0.2));
    border: 2px solid #6c757d;
    display: block;
}

.game-message h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.game-message p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #4a6a75;
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.final-stat {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.final-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #597d89;
}

.final-stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.3rem;
}

/* БЛОК ДЛЯ ФРАЗ ПЕРСОНАЖЕЙ */
.character-phrases-container {
    max-width: 600px;
    margin: 2rem auto 0 auto;
}

.phrase-box {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 2px solid #e9ecef;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.phrase-icon {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 40px;
    height: 40px;
    background: #597d89;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(89, 125, 137, 0.3);
}

.phrase-text {
    font-size: 1rem;
    line-height: 1.5;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    font-style: italic;
}

.phrase-character {
    text-align: right;
    font-size: 0.9rem;
    color: #597d89;
    font-weight: 600;
    margin-top: auto;
}

/* Блок с кнопками внизу страницы */
.game-bottom-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem;
    background: #f6fafb;
    border-radius: 15px;
}

.bottom-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.bottom-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #597d89;
}

.bottom-button i {
    font-size: 2.5rem;
    color: #597d89;
    margin-bottom: 1rem;
}

.bottom-button h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.bottom-button p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Декоративные элементы */
.mirror-pattern {
    text-align: center;
    margin: 2rem 0;
    color: #597d89;
    opacity: 0.7;
    font-size: 1.2rem;
}

.mirror-pattern::before {
    content: "◈ ◈ ◈ ◈ ◈";
    letter-spacing: 10px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .game-main-content {
        grid-template-columns: 1fr;
    }
    
    .game-board {
        max-width: 400px;
    }
    
    .cell {
        font-size: 2.8rem;
    }
    
    .game-bottom-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .game-title {
        font-size: 2.2rem;
    }
    
    .game-subtitle {
        font-size: 1.1rem;
    }
    
    .character-options {
        flex-direction: column;
    }
    
    .character-option {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .game-bottom-buttons {
        grid-template-columns: 1fr;
    }
    
    .final-stats {
        grid-template-columns: 1fr;
    }
    
    .game-board {
        max-width: 350px;
        padding: 15px;
    }
    
    .cell {
        font-size: 2.5rem;
    }
    
    .phrase-box {
        padding: 1.2rem;
        min-height: 100px;
    }
    
    .phrase-text {
        font-size: 0.9rem;
    }
    
    .breadcrumbs {
        padding: 1rem 0;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.8rem;
    }
    
    .game-board {
        max-width: 300px;
        grid-gap: 8px;
    }
    
    .cell {
        font-size: 2rem;
    }
    
    .current-symbol {
        font-size: 2rem;
    }
    
    .character-icon {
        font-size: 2rem;
    }
    
    .phrase-box {
        padding: 1rem;
        min-height: 90px;
    }
    
    .phrase-text {
        font-size: 0.85rem;
    }
    
    .phrase-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .game-bottom-buttons {
        padding: 1rem;
    }
    
    .bottom-button {
        padding: 1rem;
    }
    
    .bottom-button i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .breadcrumbs .container {
        font-size: 0.8rem;
    }
}

/* Стили для кнопок (взяты из index.css) */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #597d89;
    color: white;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #4a6a75;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #597d89;
    color: #597d89;
}

.btn-secondary:hover {
    background-color: #597d89;
    color: white;
}

.btn-pulse {
    animation: pulse 2s infinite;
    font-size: 1.1rem;
    padding: 15px 40px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(89, 125, 137, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(89, 125, 137, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(89, 125, 137, 0);
    }
}