* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Экран входа */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #667eea;
    text-shadow: none;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form input {
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
}

/* Шапка приложения */
.app-header {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 15px 0;
    margin-bottom: 20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    min-height: 60px;
}

.header-content h1 {
    font-size: 2rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
    min-width: 0;
    flex: 1;
    margin: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.header-content h1:hover {
    opacity: 0.8;
}

.header-content h1 i {
    margin-right: 8px;
    display: inline-block;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.user-name {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.user-name i {
    margin-right: 5px;
    flex-shrink: 0;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* Главное приложение */
.main-app {
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.card h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Сессии */
.sessions-list {
    max-height: 400px;
    overflow-y: auto;
}

.session-item {
    background: #f7fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.session-item:hover {
    background: #edf2f7;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.session-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.session-date {
    color: #718096;
    font-size: 0.9rem;
}

.session-players {
    color: #4a5568;
    font-size: 0.9rem;
}

.join-btn {
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.join-btn:hover {
    background: #38a169;
}

/* Кнопки */
.btn-primary, .btn-secondary, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 0;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* Выбор игр */
.games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.game-card {
    background: #f7fafc;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
}

.game-card:hover {
    background: #edf2f7;
    border-color: #667eea;
}

.game-card h4 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.game-card p {
    color: #718096;
    font-size: 0.9rem;
}

/* История */
.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 3px solid #48bb78;
}

.history-winner {
    font-weight: 600;
    color: #2d3748;
}

.history-date {
    color: #718096;
    font-size: 0.9rem;
}

/* Кнопка показа всей истории */
.history-list .btn-secondary {
    min-width: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Стили для бейджа "Вы в игре" */
.in-session-badge {
    background: #48bb78;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
    font-weight: 500;
}

/* Игровая страница */
.game-page {
    padding: 0;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 100%;
}

.game-page .app-header {
    margin-bottom: 0;
    width: 100%;
}

.game-page .game-content {
    padding: 0 20px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.game-header {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    padding: 30px;
}

.game-page .game-header {
    margin: 20px auto;
    margin-bottom: 30px;
    max-width: 1200px;
    width: calc(100% - 40px);
}

.game-info h2 {
    margin: 0 0 10px 0;
    color: #2d3748;
    font-size: 2rem;
}

.game-title-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.game-title-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
}

.rounds-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.rounds-counter:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.rounds-counter i {
    color: #667eea;
    font-size: 1.2rem;
}

.rounds-counter span {
    color: #2d3748;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

/* Анимация кости */
@keyframes diceRoll {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(270deg); }
    100% { transform: rotate(360deg); }
}

.dice-rolling {
    animation: diceRoll 0.6s ease-in-out;
}

/* Подсказка для счетчика раундов */
.rounds-tooltip {
    position: fixed;
    background: #2d3748;
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    max-width: 250px;
    word-wrap: break-word;
    white-space: normal;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.rounds-tooltip.show {
    opacity: 1;
}

/* Золотое уведомление о победе */
.notification.victory {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 50%, #f6ad55 100%);
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 25px 35px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(246, 173, 85, 0.5), 0 0 30px rgba(246, 173, 85, 0.3);
    animation: victoryAnimation 3s ease-in-out;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    text-align: center;
    min-width: 320px;
    max-width: 90vw;
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.notification.victory::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #f6ad55, #ed8936, #f6ad55, #ed8936);
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 2s ease-in-out infinite;
}

.notification.victory .victory-icon {
    font-size: 2.5rem;
    animation: crownBounce 1s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.notification.victory .victory-text {
    font-size: 1.4rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes victoryAnimation {
    0% { 
        transform: translate(-50%, -50%) scale(0.3) rotate(-10deg); 
        opacity: 0; 
    }
    15% { 
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg); 
        opacity: 1; 
    }
    30% { 
        transform: translate(-50%, -50%) scale(0.95) rotate(-2deg); 
    }
    45% { 
        transform: translate(-50%, -50%) scale(1.05) rotate(1deg); 
    }
    60% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
        opacity: 1; 
    }
}

@keyframes borderGlow {
    0%, 100% { 
        background: linear-gradient(45deg, #f6ad55, #ed8936, #f6ad55, #ed8936);
        filter: brightness(1);
    }
    50% { 
        background: linear-gradient(45deg, #ed8936, #f6ad55, #ed8936, #f6ad55);
        filter: brightness(1.2);
    }
}

@keyframes crownBounce {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-5px) scale(1.1); }
}

@keyframes textPulse {
    0%, 100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); }
    50% { text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.3); }
}

.game-info p {
    margin: 0 0 20px 0;
    color: #718096;
    font-size: 1.1rem;
}

.game-controls {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.game-controls .btn-secondary,
.game-controls .btn-danger {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.players-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.players-section h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player-section {
    background: #f7fafc;
    border-radius: 15px;
    padding: 20px;
    border-left: 4px solid #667eea;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    overflow-x: auto;
}

.player-section.current-player {
    background: #e6fffa;
    border-left-color: #48bb78;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.2);
}

.player-info {
    margin-bottom: 15px;
}

.player-name {
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.wins-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff3cd;
    border: 2px solid #f6ad55;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    margin-left: 8px;
}

.wins-counter:hover {
    background: #ffeaa7;
    border-color: #ed8936;
}

.wins-counter i {
    color: #f6ad55;
    font-size: 1rem;
}

.wins-counter span {
    color: #2d3748;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Подсказка для счетчика побед */
.wins-tooltip {
    position: fixed;
    background: #2d3748;
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    max-width: 250px;
    word-wrap: break-word;
    white-space: normal;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.wins-tooltip.show {
    opacity: 1;
}

.player-game-board {
    margin-top: 15px;
    padding: 5px;
}

.player-game-board .dice-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

.player-game-board .dice-button {
    width: 100%;
    aspect-ratio: 1;
    min-width: 40px;
    min-height: 40px;
    max-width: 80px;
    max-height: 80px;
    border: none;
    border-radius: 8px;
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: white;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-game-board .dice-button.interactive {
    cursor: pointer;
}

.player-game-board .dice-button.readonly {
    cursor: default;
    opacity: 0.8;
}

.player-game-board .dice-button.red {
    background: #e53e3e;
}

.player-game-board .dice-button.red.interactive:hover {
    background: #c53030;
}

.player-game-board .dice-button.green {
    background: #48bb78;
}

.player-game-board .dice-button.green.interactive:hover {
    background: #38a169;
}

.player-game-board .dice-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.player-game-board .dice-button.disabled:hover {
    background: inherit;
}

.game-board {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.game-board h3 {
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 1.5rem;
    text-align: center;
}

.dice-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.dice-button {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 10px;
    font-size: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: white;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dice-button.red {
    background: #e53e3e;
}

.dice-button.red:hover {
    background: #c53030;
}

.dice-button.green {
    background: #48bb78;
}

.dice-button.green:hover {
    background: #38a169;
}

.dice-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dice-button.disabled:hover {
    background: inherit;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #48bb78;
    color: white;
}

.notification.error {
    background: #e53e3e;
    color: white;
}

.notification.info {
    background: #4299e1;
    color: white;
}

/* Анимации */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Стили для игры Манчкин */
.munchkin-current-player {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.munchkin-current-player h3 {
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Секция урона */
.munchkin-damage-section {
    margin-bottom: 40px;
}

.munchkin-damage-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.munchkin-damage-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.munchkin-btn-damage {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.munchkin-btn-damage.minus {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.munchkin-btn-damage.minus:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.4);
}

.munchkin-btn-damage.plus {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.munchkin-btn-damage.plus:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

.munchkin-btn-damage:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.munchkin-btn-damage:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.munchkin-damage-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 300px;
}

.munchkin-damage-label {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 10px;
    font-weight: 600;
}

.munchkin-damage-value {
    font-size: 8rem;
    font-weight: 900;
    color: #e53e3e;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    line-height: 1;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Секция уровня */
.munchkin-level-section {
    margin-bottom: 20px;
}

.munchkin-level-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 400px;
    margin: 0 auto;
}

.munchkin-btn-level {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
}

.munchkin-btn-level:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(246, 173, 85, 0.4);
}

.munchkin-btn-level:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.munchkin-btn-level:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.munchkin-level-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.munchkin-level-label {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 5px;
    font-weight: 600;
}

.munchkin-level-value {
    font-size: 3rem;
    font-weight: 800;
    color: #f6ad55;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    line-height: 1;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Секция кнопки смерти */
.munchkin-death-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.munchkin-btn-death {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(45, 55, 72, 0.3);
}

.munchkin-btn-death:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 55, 72, 0.4);
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.munchkin-btn-death:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(45, 55, 72, 0.3);
}

.munchkin-btn-death i {
    font-size: 1rem;
}

.munchkin-btn-disagree {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.munchkin-btn-disagree:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

.munchkin-btn-disagree:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.munchkin-btn-disagree i {
    font-size: 1rem;
}

/* История изменений */
.munchkin-history {
    margin-top: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.munchkin-history-label {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 8px;
    font-weight: 600;
    text-align: center;
}

.munchkin-history-log {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    min-height: 24px;
}

.munchkin-history-item {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-block;
}

.munchkin-history-item.positive {
    color: #48bb78;
}

.munchkin-history-item.negative {
    color: #e53e3e;
}

.munchkin-history-item.level {
    color: #f6ad55;
    background: rgba(246, 173, 85, 0.1);
    border: 1px solid rgba(246, 173, 85, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
}

.munchkin-history-item.death {
    color: #2d3748;
    background: rgba(45, 55, 72, 0.1);
    border: 1px solid rgba(45, 55, 72, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 1rem;
}

/* Другие игроки */
.munchkin-other-players {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.munchkin-other-players h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.munchkin-players-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.munchkin-player-item {
    background: #f7fafc;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
}

.munchkin-player-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.munchkin-player-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.munchkin-player-stat-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.munchkin-player-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.munchkin-player-stat-value.damage {
    color: #e53e3e;
}

.munchkin-player-stat-value.level {
    color: #f6ad55;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .app-header {
        padding: 12px 0;
    }
    
    .header-content {
        padding: 0 15px;
        gap: 10px;
        min-height: 50px;
    }
    
    .header-content h1 {
        font-size: 1.4rem;
        line-height: 1.1;
    }
    
    .header-content h1 i {
        margin-right: 6px;
    }
    
    /* Убираем адаптивный текст - показываем полный заголовок */
    .header-content h1 .full-title {
        display: inline;
    }
    
    .header-content h1::before {
        content: none;
    }
    
    .user-info {
        flex-basis: 100%;
        order: 2;
        justify-content: center;
        margin-top: 5px;
        gap: 8px;
    }
    
    .user-name {
        font-size: 1rem;
        max-width: 120px;
    }
    
    .btn-logout {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .game-page {
        padding: 10px;
    }
    
    .game-page .game-header {
        margin: 10px auto;
        margin-bottom: 20px;
        width: calc(100% - 20px);
    }
    
    .session-info-row {
        grid-template-columns: 1fr auto;
        gap: 10px;
        align-items: flex-start;
    }
    
    .session-info-row p {
        font-size: 1rem;
    }
    
    .game-page .game-content {
        padding: 0 10px 10px 10px;
    }
    
    .game-header {
        padding: 20px;
    }
    
    .game-info h2 {
        font-size: 1.5rem;
    }
    
    .game-info p {
        font-size: 1rem;
    }
    
    .game-title-row {
        grid-template-columns: 1fr auto;
        gap: 10px;
        align-items: flex-start;
    }
    
    .rounds-counter {
        flex-shrink: 0;
    }
    
    .game-controls {
        gap: 8px;
    }
    
    .game-controls .btn-secondary,
    .game-controls .btn-danger {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .players-section {
        padding: 20px;
    }
    
    .player-game-board .dice-buttons {
        gap: 6px;
    }
    
    .player-game-board .dice-button {
        font-size: clamp(1.4rem, 4.5vw, 2rem);
    }
    
    .dice-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .dice-button {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        max-width: 400px;
        padding: 20px;
    }
    
    /* Адаптивность кнопок создания и удаления сессий */
    .card > div[style*="flex"] {
        flex-direction: column;
        gap: 8px;
    }
    
    .card > div[style*="flex"] button {
        width: 100%;
        justify-content: center;
    }
    
    .rounds-tooltip {
        font-size: 0.95rem;
        font-weight: 500;
        padding: 10px 12px;
        max-width: 200px;
    }
    
    .wins-counter {
        padding: 3px 6px;
        margin-left: 6px;
    }
    
    .wins-counter i {
        font-size: 0.9rem;
    }
    
    .wins-counter span {
        font-size: 0.8rem;
    }
    
    .notification.victory {
        min-width: 280px;
        font-size: 1.2rem;
        padding: 20px 25px;
    }
    
    .notification.victory .victory-icon {
        font-size: 2rem;
    }
    
    .notification.victory .victory-text {
        font-size: 1.2rem;
    }
    
    /* Адаптивность для игры Манчкин */
    .munchkin-current-player {
        padding: 15px;
    }
    
    .munchkin-damage-controls {
        gap: 15px;
    }
    
    .munchkin-damage-display {
        min-width: 200px;
    }
    
    .munchkin-damage-value {
        font-size: 6rem;
        min-height: 100px;
    }
    
    .munchkin-btn-damage {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .munchkin-level-controls {
        gap: 25px;
    }
    
    .munchkin-level-value {
        font-size: 2.5rem;
        min-height: 50px;
    }
    
    .munchkin-btn-level {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .munchkin-other-players {
        padding: 15px;
    }
    
    .munchkin-player-stat-value {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 10px 0;
    }
    
    .header-content {
        padding: 0 10px;
        gap: 8px;
        min-height: 45px;
        flex-wrap: wrap;
    }
    
    .header-content h1 {
        font-size: 1.1rem;
        line-height: 1.1;
        flex-basis: 100%;
        order: 1;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .header-content h1 i {
        margin-right: 5px;
    }
    
    .user-info {
        flex-basis: 100%;
        order: 2;
        justify-content: center;
        margin-top: 5px;
        gap: 6px;
    }
    
    .user-name {
        font-size: 0.9rem;
        max-width: 100px;
    }
    
    .btn-logout {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    .btn-logout i {
        margin-right: 3px;
    }
    
    .game-page {
        padding: 0;
    }
    
    .game-page .game-header {
        margin: 5px auto;
        margin-bottom: 15px;
        width: calc(100% - 10px);
    }
    
    .session-info-row {
        grid-template-columns: 1fr auto;
        gap: 8px;
        align-items: flex-start;
    }
    
    .session-info-row p {
        font-size: 0.9rem;
    }
    
    .game-page .game-content {
        padding: 0 5px 5px 5px;
    }
    
    .game-header {
        padding: 15px;
    }
    
    .game-info h2 {
        font-size: 1.3rem;
    }
    
    .game-title-row {
        gap: 8px;
    }
    
    .rounds-counter {
        flex-shrink: 0;
        padding: 6px 10px;
    }
    
    .rounds-counter i {
        font-size: 1rem;
    }
    
    .rounds-counter span {
        font-size: 0.8rem;
    }
    
    .players-section {
        padding: 15px;
    }
    
    .player-game-board .dice-buttons {
        gap: 4px;
    }
    
    .player-game-board .dice-button {
        font-size: clamp(1.2rem, 5.5vw, 1.6rem);
    }
    
    .btn-primary, .btn-secondary, .btn-danger {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .game-controls .btn-secondary,
    .game-controls .btn-danger {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    /* Адаптивность кнопок создания и удаления сессий */
    .card > div[style*="flex"] {
        flex-direction: column;
        gap: 6px;
    }
    
    .card > div[style*="flex"] button {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .rounds-tooltip {
        font-size: 0.9rem;
        font-weight: 500;
        padding: 8px 10px;
        max-width: 180px;
    }
    
    .wins-counter {
        padding: 2px 4px;
        margin-left: 4px;
    }
    
    .wins-counter i {
        font-size: 0.8rem;
    }
    
    .wins-counter span {
        font-size: 0.7rem;
    }
    
    .notification.victory {
        min-width: 250px;
        font-size: 1.1rem;
        padding: 18px 20px;
    }
    
    .notification.victory .victory-icon {
        font-size: 1.8rem;
    }
    
    .notification.victory .victory-text {
        font-size: 1.1rem;
    }
    
    /* Адаптивность для игры Манчкин */
    .munchkin-current-player {
        padding: 15px;
    }
    
    .munchkin-damage-controls {
        gap: 15px;
    }
    
    .munchkin-damage-display {
        min-width: 200px;
    }
    
    .munchkin-damage-value {
        font-size: 6rem;
        min-height: 100px;
    }
    
    .munchkin-btn-damage {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .munchkin-level-controls {
        gap: 25px;
    }
    
    .munchkin-level-value {
        font-size: 2.5rem;
        min-height: 50px;
    }
    
    .munchkin-btn-level {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .munchkin-other-players {
        padding: 15px;
    }
    
    .munchkin-player-stat-value {
        font-size: 1.2rem;
    }
    
    /* Адаптивность для спора */
    .disagreement-overlay {
        padding: 35px 15px 25px 15px;
        max-width: 95%;
    }
    
    .disagreement-content h2 {
        font-size: 1.8rem;
    }
    
    .disagreement-content p {
        font-size: 1rem;
    }
    
    .btn-disagree-confirm {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 160px;
    }
    
    .swords-animation {
        width: 180px;
        top: 20px;
    }
    
    .sword {
        width: 90px;
        height: 22px;
    }
    
    .sword-left {
        left: 60px;
        transform-origin: 38px 11px;
    }
    
    .sword-right {
        right: 60px;
        transform-origin: 52px 11px;
    }
    
    .disagreement-content {
        margin-top: 25px;
    }
    
    .disagreement-players {
        gap: 8px;
    }
    
    .disagreement-player {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Скроллбары */
.sessions-list::-webkit-scrollbar,
.history-list::-webkit-scrollbar {
    width: 8px;
}

.sessions-list::-webkit-scrollbar-track,
.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.sessions-list::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.sessions-list::-webkit-scrollbar-thumb:hover,
.history-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 

/* Модальное окно спора */
.disagreement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: disagreementAppear 0.5s ease-out;
}

.disagreement-overlay {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-radius: 20px;
    padding: 50px 40px 40px 40px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 3px solid #dc2626;
    animation: disagreementSlide 0.8s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
}

.swords-animation {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 60px;
    z-index: 10002;
}

.sword {
    position: absolute;
    width: 120px;
    height: 30px;
    top: 15px;
}

.sword-left {
    left: 70px;
    transform-origin: 50px 15px;
    animation: swordSlideLeftNew 1.2s ease-out;
    animation-fill-mode: forwards;
}

.sword-right {
    right: 70px;
    transform-origin: 70px 15px;
    animation: swordSlideRightNew 1.2s ease-out;
    animation-fill-mode: forwards;
}

.sword-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.disagreement-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
    margin-top: 40px;
}

.disagreement-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #dc2626;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: disagreementPulse 2s ease-in-out infinite;
}

.disagreement-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #f7fafc;
}

.disagreement-players {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.disagreement-player {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.disagreement-player.agreed {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.2);
}

.disagreement-player.current {
    border-color: #f6ad55;
    background: rgba(246, 173, 85, 0.2);
}

.btn-disagree-confirm {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.4);
    text-transform: uppercase;
    min-width: 200px;
    justify-content: center;
}

.btn-disagree-confirm:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5);
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

.btn-disagree-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.disagreement-result {
    margin-top: 30px;
    padding: 20px;
    background: rgba(246, 173, 85, 0.1);
    border-radius: 12px;
    border: 2px solid #f6ad55;
}

.disagreement-result h3 {
    color: #f6ad55;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.disagreement-result p {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f6ad55;
    margin-bottom: 20px;
}

/* Анимации для спора */
@keyframes disagreementAppear {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

@keyframes disagreementSlide {
    from {
        transform: scale(0.5) rotate(-5deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes swordSlideLeftNew {
    0% {
        transform: translateX(-200px) rotate(-90deg);
        opacity: 0;
    }
    60% {
        transform: translateX(10px) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translateX(0) rotate(45deg);
        opacity: 1;
    }
}

@keyframes swordSlideRightNew {
    0% {
        transform: translateX(200px) rotate(90deg);
        opacity: 0;
    }
    60% {
        transform: translateX(-10px) rotate(-45deg);
        opacity: 1;
    }
    100% {
        transform: translateX(0) rotate(-45deg);
        opacity: 1;
    }
}

@keyframes disagreementPulse {
    0%, 100% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        transform: scale(1);
    }
    50% {
        text-shadow: 2px 2px 8px rgba(220, 38, 38, 0.8), 0 0 20px rgba(220, 38, 38, 0.5);
        transform: scale(1.05);
    }
}

.session-info-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.session-info-row p {
    margin: 0;
    color: #718096;
    font-size: 1.1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
} 