/*
 * battles.css - Battle-spezifische Styles für Rocket100 NFT Battle Mini App
 * Enthält: Battle Cards, Participants, Voting, History, Leaderboard
 */

/* --- Battle Cards --- */
.battle-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 18px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.battle-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        var(--shadow-glow) rgba(6, 110, 225, 0.3);
}

.battle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.battle-id {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: var(--accent-cyan);
    text-shadow: 0 0 8px var(--accent-cyan);
}

.battle-status {
    padding: 6px 12px;
    border-radius: 15px;
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
}

.status-waiting {
    background: linear-gradient(135deg, var(--accent-gold), #FFA500);
    color: var(--dark-bg);
    box-shadow: var(--shadow-glow) rgba(255, 215, 0, 0.4);
    animation: waitingPulse 2s ease-in-out infinite;
}

.status-active {
    background: linear-gradient(135deg, var(--accent-green), #20c997);
    color: var(--dark-bg);
    box-shadow: var(--shadow-glow) rgba(0, 255, 127, 0.4);
    animation: activePulse 1.5s ease-in-out infinite;
}

.status-completed {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: var(--text-primary);
}

.battle-card .battle-join-btn {
    background: linear-gradient(135deg, var(--accent-green), #20c997);
    color: var(--dark-bg);
    border: 2px solid transparent;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    width: 100%;
    margin-top: 10px;
    box-shadow: 
        var(--shadow-soft),
        var(--shadow-glow) rgba(0, 255, 127, 0.4);
}

.battle-card .battle-join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        var(--shadow-glow) rgba(0, 255, 127, 0.8);
    border-color: var(--accent-cyan);
}

.battle-card .battle-join-btn:active {
    transform: translateY(-1px);
}

.battle-card .battle-join-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.battle-card .battle-join-btn:hover::before {
    left: 100%;
}

/* --- Battle Participants --- */
.battle-participants {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.participant {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    gap: 0;
    justify-content: flex-start;
}

.participant-nft {
    width: 150px;
    height: 187.5px;
    border-radius: 20px;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--primary-blue);
    box-shadow: 
        var(--shadow-soft),
        var(--shadow-glow) rgba(6, 110, 225, 0.5);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    aspect-ratio: 0.8 !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 15px;
}

.participant-nft:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.6),
        var(--shadow-glow) rgba(6, 110, 225, 0.8);
    border-color: var(--accent-cyan);
}

.participant-profile-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-gold);
    background: var(--glass-bg);
}

.battle-card .participant-profile-photo {
    width: 72px !important;
    height: 72px !important;
    border: 3px solid var(--accent-gold) !important;
    margin: 8px 0 !important;
}

.participant-name {
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 600;
}

.participant-power {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    color: var(--accent-green);
    font-weight: 700;
    text-shadow: 0 0 8px var(--accent-green);
}

.vs-divider {
    font-family: 'Orbitron', monospace;
    font-size: 22px;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 
        0 0 12px var(--accent-gold),
        0 0 20px var(--accent-gold);
    animation: vsGlow 2s ease-in-out infinite;
}

/* --- NFT Placeholder for Waiting Battles --- */
.participant-nft-placeholder {
    width: 100%;
    aspect-ratio: 0.8;
    border-radius: 15px;
    background: linear-gradient(135deg, 
        rgba(128, 128, 128, 0.3) 0%, 
        rgba(64, 64, 64, 0.4) 50%, 
        rgba(128, 128, 128, 0.3) 100%
    );
    border: 2px dashed var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'Orbitron', monospace;
    text-align: center;
    line-height: 1.4;
    animation: placeholderPulse 2s ease-in-out infinite;
    margin-bottom: 15px;
}

.participant .empty-profile-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
    animation: placeholderPulse 2s ease-in-out infinite;
}

/* --- Voting Section --- */
.battle-voting {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.vote-header {
    text-align: center;
    margin-bottom: 15px;
}

.time-left {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    color: var(--accent-gold);
    font-weight: 700;
    text-shadow: 0 0 12px var(--accent-gold);
    animation: timeCountdown 1s ease-in-out infinite;
}

.vote-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.vote-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: var(--text-primary);
    border: 2px solid transparent;
    padding: 12px;
    border-radius: 10px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow) rgba(6, 110, 225, 0.6);
    border-color: var(--accent-cyan);
}

.vote-btn:active {
    transform: scale(0.98);
}

.vote-btn.voted {
    background: linear-gradient(135deg, var(--accent-green), #20c997);
    box-shadow: var(--shadow-glow) rgba(0, 255, 127, 0.4);
    animation: votedGlow 2s ease-in-out infinite;
}

.vote-count {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* --- Final Score Styles (für Battle History) --- */
.final-score {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px 0;
    gap: 15px;
}

.score-item {
    text-align: center;
    flex: 1;
}

.score-points {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    font-weight: 900;
    color: var(--accent-cyan);
    text-shadow: 0 0 12px var(--accent-cyan);
}

.score-vs {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 900;
    color: var(--text-secondary);
}

/* --- Battle Duration Styles --- */
.battle-duration {
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
    opacity: 0.8;
}

/* --- Battle History --- */
.history-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 18px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.history-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        var(--shadow-glow) rgba(6, 110, 225, 0.2);
}

.history-card.winner-challenger {
    border-left: 3px solid var(--accent-green);
    background: rgba(0, 255, 127, 0.05);
}

.history-card.winner-opponent {
    border-left: 3px solid var(--accent-green);
    background: rgba(0, 255, 127, 0.05);
}

.history-card.winner-tie {
    border-left: 3px solid var(--accent-gold);
    background: rgba(255, 215, 0, 0.05);
}

.battle-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.battle-date {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    color: var(--text-muted);
}

/* --- Leaderboard --- */
.leaderboard-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.leaderboard-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-glow) rgba(6, 110, 225, 0.3);
    border-color: var(--primary-blue);
}

.leaderboard-card .user-profile-image,
.leaderboard-item .user-profile-image {
    width: 80px !important;
    height: 80px !important;
    border: 3px solid var(--accent-gold) !important;
}

.rank {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 12px var(--accent-gold);
    margin-right: 15px;
    min-width: 40px;
}

.rank.gold {
    color: var(--accent-gold);
    text-shadow: 0 0 15px var(--accent-gold);
}

.rank.silver {
    color: #C0C0C0;
    text-shadow: 0 0 15px #C0C0C0;
}

.rank.blue {
    color: #CD7F32;
    text-shadow: 0 0 15px #CD7F32;
}

.player-info {
    flex: 1;
    margin-left: 15px;
}

.player-name {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 600;
}

.player-stats {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.player-points {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-green);
    text-shadow: 0 0 8px var(--accent-green);
}
