/* Battle Page Styles */

.battle-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
}

/* Стартовый экран */
.battle-start {
    text-align: center;
    padding: 40px 20px;
}

.battle-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.battle-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.battle-hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
    color: #fff;
}

.battle-description {
    font-size: 18px;
    color: #999;
    margin-bottom: 40px;
    line-height: 1.6;
}

.battle-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
}

.feature-icon {
    font-size: 24px;
}

/* Арена битвы */
.battle-arena {
    padding: 20px 0;
}

.battle-header {
    text-align: center;
    margin-bottom: 40px;
}

.battle-header h2 {
    font-size: 36px;
    color: #fff;
    margin-bottom: 15px;
}

.battle-counter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 95, 61, 0.1);
    border-radius: 50px;
    border: 2px solid #ff5f3d;
}

.counter-label {
    color: #999;
    font-size: 14px;
}

.counter-value {
    color: #ff5f3d;
    font-size: 24px;
    font-weight: bold;
}

/* Ринг битвы */
.battle-ring {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.battle-movie {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.battle-movie:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 95, 61, 0.3);
}

.movie-poster-wrapper {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
}

.movie-poster {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    border-radius: 15px;
}


.movie-title {
    font-size: 20px;
    color: #fff;
    margin: 15px 0 10px 0;
    text-align: center;
    line-height: 1.3;
    flex-grow: 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.movie-meta {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    flex-grow: 0;
}

.meta-item {
    padding: 6px 16px;
    background: rgba(255, 95, 61, 0.15);
    border-radius: 20px;
    color: #ff8a65;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.vote-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #ff5f3d, #ff8a65);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 95, 61, 0.4);
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 95, 61, 0.6);
}

.vote-btn:active {
    transform: translateY(0);
}

.vote-icon {
    font-size: 20px;
}

.vote-text {
    font-size: 16px;
}

/* VS */
.battle-vs {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-text {
    font-size: 72px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #ff5f3d 0%, #ff8a65 50%, #ff5f3d 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 95, 61, 0.6);
    position: relative;
    padding: 20px 30px;
    animation: pulseGlow 2s ease-in-out infinite, gradientShift 3s ease infinite;
}

.vs-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 95, 61, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: ringPulse 2s ease-in-out infinite;
}

.vs-text::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 95, 61, 0.3);
    border-radius: 15px;
    z-index: -1;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(255, 95, 61, 0.5));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(255, 95, 61, 0.8));
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes ringPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }
}

/* Действия */
.battle-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Статистика */
.battle-stats {
    padding: 20px 0;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.stats-header h2 {
    font-size: 36px;
    color: #fff;
}

.stats-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.stats-section h3 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 20px;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    text-align: center;
    padding: 30px;
    background: rgba(255, 95, 61, 0.1);
    border-radius: 15px;
    border: 2px solid #ff5f3d;
}

.stat-value {
    font-size: 48px;
    font-weight: bold;
    color: #ff5f3d;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: #999;
}

.top-picks {
    display: grid;
    gap: 15px;
}

.pick-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.pick-poster {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 5px;
}

.pick-info {
    flex: 1;
}

.pick-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: 5px;
}

.pick-count {
    font-size: 14px;
    color: #ff5f3d;
}

/* Лидерборд */
.leaderboard {
    display: grid;
    gap: 15px;
}

.leader-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.leader-item:hover {
    transform: translateX(5px);
    background: rgba(255, 95, 61, 0.1);
}

.leader-rank {
    font-size: 32px;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

.leader-rank.gold { color: #FFD700; }
.leader-rank.silver { color: #C0C0C0; }
.leader-rank.bronze { color: #CD7F32; }
.leader-rank.default { color: #ff5f3d; }

.leader-poster {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 5px;
}

.leader-info {
    flex: 1;
}

.leader-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: 5px;
}

.leader-wins {
    font-size: 14px;
    color: #ff5f3d;
}

.stats-footer {
    text-align: center;
    margin-top: 40px;
}

.stats-info {
    font-size: 18px;
    color: #999;
    margin-bottom: 30px;
}

.stats-info strong {
    color: #ff5f3d;
    font-size: 24px;
}

/* Кнопки (единообразные со всем сайтом) */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.btn-large {
    padding: 18px 50px;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff5f3d 0%, #ff8a65 50%, #ff5f3d 100%);
    background-size: 200% auto;
    box-shadow: 0 8px 25px rgba(255, 95, 61, 0.5);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    animation: pulse 2s ease-in-out infinite;
    border-radius: 50px;
    color: white;
    border: none;
}

.btn-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.btn-large:hover {
    background-position: right center;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 95, 61, 0.7);
}

.btn-large:hover::before {
    left: 100%;
}

.btn-large:active {
    transform: translateY(-2px) scale(1.02);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(255, 95, 61, 0.5);
    }
    50% {
        box-shadow: 0 8px 35px rgba(255, 95, 61, 0.8);
    }
}

.btn-icon-arrow {
    font-size: 24px;
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-large:hover .btn-icon-arrow {
    transform: translateX(8px);
    animation: arrowBounce 0.6s ease infinite;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(8px);
    }
    50% {
        transform: translateX(14px);
    }
}

.btn-primary {
    background: linear-gradient(135deg, #ff5f3d, #ff8a65);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 95, 61, 0.4);
}

.btn-secondary {
    background: #3d3d3d;
    color: white;
}

.btn-secondary:hover {
    background: #4d4d4d;
}

.btn-outline {
    background: transparent;
    border: 2px solid #ff5f3d;
    color: #ff5f3d;
}

.btn-outline:hover {
    background: #ff5f3d;
    color: white;
}

/* Адаптив */
@media (max-width: 768px) {
    .battle-container {
        padding: 10px;
        padding-bottom: 20px;
    }
    
    .battle-hero {
        padding: 40px 20px;
    }
    
    .battle-hero h1 {
        font-size: 32px;
    }
    
    .battle-icon {
        font-size: 60px;
    }
    
    .battle-description {
        font-size: 16px;
    }
    
    .battle-features {
        flex-direction: column;
        gap: 15px;
    }
    
    .feature-item {
        font-size: 14px;
    }
    
    .battle-ring {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto 1fr;
        gap: 15px;
        align-items: start;
    }
    
    .battle-vs {
        grid-column: 1 / -1;
        order: -1;
        margin-bottom: 10px;
        padding: 15px 0;
        background: linear-gradient(135deg, rgba(255, 95, 61, 0.1) 0%, rgba(255, 138, 101, 0.1) 100%);
        border-radius: 15px;
        backdrop-filter: blur(10px);
    }
    
    .vs-text {
        font-size: 36px;
        margin: 0;
        writing-mode: horizontal-tb;
        transform: none;
        padding: 10px 20px;
    }
    
    .vs-text::before {
        width: 80px;
        height: 80px;
    }
    
    .vs-text::after {
        width: 70px;
        height: 70px;
        border-width: 2px;
    }
    
    .battle-header h2 {
        font-size: 22px;
    }
    
    .battle-counter {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .counter-value {
        font-size: 18px;
    }
    
    .battle-movie {
        min-height: auto;
        padding: 15px;
    }
    
    .movie-poster {
        height: 250px;
    }
    
    .movie-title {
        font-size: 14px;
        min-height: 40px;
        margin: 10px 0 8px 0;
    }
    
    .meta-item {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .vote-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .vote-text {
        font-size: 13px;
    }
    
    .vote-icon {
        font-size: 16px;
    }
    
    .battle-actions {
        flex-direction: row;
        gap: 10px;
    }
    
    .battle-actions .btn {
        flex: 1;
        font-size: 14px;
        padding: 10px 16px;
    }
    
    .stats-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-header h2 {
        font-size: 28px;
    }
    
    .stats-section {
        padding: 20px;
    }
    
    .stats-section h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .battle-container {
        padding: 5px;
        padding-bottom: 20px;
    }
    
    .battle-hero {
        padding: 30px 15px;
    }
    
    .battle-hero h1 {
        font-size: 28px;
    }
    
    .battle-description {
        font-size: 15px;
    }
    
    .battle-header h2 {
        font-size: 18px;
    }
    
    .battle-counter {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .counter-value {
        font-size: 16px;
    }
    
    .battle-ring {
        gap: 8px;
    }
    
    .battle-vs {
        padding: 12px 0;
        margin-bottom: 8px;
    }
    
    .vs-text {
        font-size: 28px;
        padding: 8px 15px;
    }
    
    .vs-text::before {
        width: 60px;
        height: 60px;
    }
    
    .vs-text::after {
        width: 50px;
        height: 50px;
    }
    
    .battle-movie {
        padding: 10px;
    }
    
    .movie-poster {
        height: 200px;
    }
    
    .movie-title {
        font-size: 13px;
        min-height: 35px;
        margin: 8px 0 6px 0;
    }
    
    .meta-item {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .vote-btn {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .vote-text {
        font-size: 12px;
    }
    
    .vote-icon {
        font-size: 14px;
    }
    
    .vs-text {
        font-size: 20px;
    }
    
    .battle-actions .btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .stat-value {
        font-size: 36px;
    }
}
