/**
 * CLIP BATTLES - FLEXR/PiNG THEME STYLING
 * Complete styling for the Clip Battles system
 */

/* ================================================
 * BATTLES PAGE - MAIN LAYOUT
 * ================================================ */

.battles-page-wrapper {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
}

.battles-header {
    align-items: stretch;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(83, 52, 131, 0.3) 0%, rgba(155, 89, 182, 0.3) 100%);
    border: 2px solid #533483;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(83, 52, 131, 0.3);
    flex-direction: column;
}

.battles-header__top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.battles-stats-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stats-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-top: 35px;
}

.battles-icon {
    font-size: 48px;
    filter: drop-shadow(0 0 10px rgba(155, 89, 182, 0.5));
}

.battles-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.battles-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
    line-height: 1.2;
}

.battles-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 500;
}

.battles-header__stats {
    display: flex;
    gap: 15px;
}

.stat-box {
    text-align: center;
    padding: 14px 24px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 12px;
}

.stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.stat-value.win-loss-ratio {
    background: linear-gradient(135deg, #9b59b6 0%, #533483 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-value.fg-value {
    color: #FFD700;
}

/* ================================================
 * BATTLES NAV TABS
 * ================================================ */

.battles-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 30px;
    padding: 0;
    border-bottom: 2px solid rgba(83, 52, 131, 0.3);
    width: 100%;
}

.battles-nav__tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
    border-radius: 12px 12px 0 0;
    position: relative;
    white-space: nowrap;
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
}

.battles-nav__tab:hover {
    color: #9b59b6;
    background: rgba(155, 89, 182, 0.15);
}

.battles-nav__tab.active {
    color: #fff;
    border-bottom-color: #9b59b6;
    background: linear-gradient(135deg, rgba(83, 52, 131, 0.3) 0%, rgba(155, 89, 182, 0.3) 100%);
    box-shadow: 0 -4px 16px rgba(155, 89, 182, 0.2);
}

/* Responsive tabs for smaller screens */
@media (max-width: 768px) {
    .battles-nav__tab {
        padding: 10px 12px;
        font-size: 12px;
        gap: 5px;
        flex: 1 1 calc(50% - 4px);
    }
    
    .tab-icon {
        font-size: 14px;
    }
}

.battles-nav__tab.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #9b59b6, transparent);
}

.tab-icon {
    font-size: 16px;
}

/* ================================================
 * BATTLES GRID
 * ================================================ */

.battles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.battles-tab-pane {
    display: none;
}

.battles-tab-pane.active {
    display: block;
}

/* ================================================
 * BATTLE CARD (Inspired by stream-box)
 * ================================================ */

.battle-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #533483;
    border-radius: 20px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(83, 52, 131, 0.3);
}

.battle-card:hover {
    border-color: #9b59b6;
    box-shadow: 0 16px 64px rgba(155, 89, 182, 0.5);
    transform: translateY(-4px);
}

.battle-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-voting {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    animation: pulse 2s infinite;
}

.status-open {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.battle-type-tag {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, #533483 0%, #9b59b6 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.battle-card__header {
    margin-bottom: 20px;
}

.battle-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 5px 0;
}

.battle-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.battle-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    text-align: center;
    padding: 12px;
    background: rgba(83, 52, 131, 0.2);
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 12px;
}

.info-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
}

.info-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.info-value.entry-fee {
    color: #e74c3c;
}

.info-value.prize-pool {
    color: #FFD700;
}

.info-value.participants {
    color: #9b59b6;
}

.battle-progress {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.battle-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #9b59b6 0%, #533483 100%);
    transition: width 0.3s ease;
}

.battle-progress-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin: 0 0 15px 0;
}

.battle-card__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-battle-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #533483 0%, #9b59b6 100%);
    color: #fff;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(83, 52, 131, 0.3);
}

.btn-battle-action:hover {
    background: linear-gradient(135deg, #9b59b6 0%, #533483 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(155, 89, 182, 0.5);
    border-color: #9b59b6;
}

/* Remove Clip Button - Red Gradient */
.btn-remove-clip {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.3) !important;
}

.btn-remove-clip:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%) !important;
    box-shadow: 0 8px 24px rgba(231, 76, 60, 0.5) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

/* Override purple gradient for remove clip button */
button.btn-battle-action.btn-remove-clip,
a.btn-battle-action.btn-remove-clip {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.3) !important;
}

button.btn-battle-action.btn-remove-clip:hover,
a.btn-battle-action.btn-remove-clip:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%) !important;
    box-shadow: 0 8px 24px rgba(231, 76, 60, 0.5) !important;
}

.btn-view-entries {
    background: linear-gradient(135deg, rgba(83, 52, 131, 0.3) 0%, rgba(155, 89, 182, 0.3) 100%);
    border: 2px solid #533483;
}

/* ================================================
 * SUBMIT CLIP MODAL
 * ================================================ */

.battle-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.battle-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.battle-modal__content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #533483;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 100000;
}

.battle-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #533483;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.modal-close {
    width: 40px;
    height: 40px;
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
    border-radius: 50%;
    color: #e74c3c;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

.battle-modal__body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(83, 52, 131, 0.2);
    border: 2px solid #533483;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #9b59b6;
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.3);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.entry-fee-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    color: #FFD700;
    font-size: 15px;
}

.notice-icon {
    font-size: 24px;
}

.fee-explanation {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 10px 0 0 0;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-submit {
    background: linear-gradient(135deg, #533483 0%, #9b59b6 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(83, 52, 131, 0.3);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(155, 89, 182, 0.5);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ================================================
 * VOTING MODAL
 * ================================================ */

.voting-modal__content {
    max-width: 1200px;
}

.voting-progress {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.voting-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
}

.voting-clip {
    background: rgba(83, 52, 131, 0.2);
    border: 2px solid #533483;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.voting-clip:hover {
    border-color: #9b59b6;
    box-shadow: 0 8px 24px rgba(155, 89, 182, 0.3);
}

.clip-video {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
}

.clip-video iframe {
    width: 100%;
    display: block;
}

.clip-meta {
    margin-bottom: 15px;
}

.clip-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.clip-game {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 12px 0;
}

.clip-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clip-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #533483;
}

.clip-username {
    font-size: 14px;
    font-weight: 600;
    color: #9b59b6;
}

.btn-vote {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-vote:hover {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.5);
}

.vote-icon {
    font-size: 20px;
}

.voting-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.vs-text {
    font-size: 32px;
    font-weight: 800;
    color: #9b59b6;
    text-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
}

.voting-actions {
    margin-top: 20px;
    text-align: center;
}

.btn-skip-matchup {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-skip-matchup:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.voting-complete-state {
    text-align: center;
    padding: 60px 20px;
}

.complete-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.complete-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px 0;
}

.complete-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 30px 0;
}

.btn-done {
    padding: 14px 40px;
    background: linear-gradient(135deg, #533483 0%, #9b59b6 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-done:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(155, 89, 182, 0.5);
}

/* ================================================
 * RIGHT SIDEBAR - BATTLE WIDGET
 * ================================================ */

.ping-battle-widget {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #533483;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(83, 52, 131, 0.3);
}

.ping-battle-widget .widget-header {
    border-bottom: 2px solid #533483;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.ping-battle-widget .widget-header h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.battle-widget-card {
    background: rgba(83, 52, 131, 0.2);
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 15px;
    padding: 15px;
    position: relative;
}

.battle-widget-card.your-battle {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.2) 0%, rgba(83, 52, 131, 0.2) 100%);
    border: 2px solid #9b59b6;
}

.battle-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #9b59b6 0%, #533483 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.5);
}

.your-clip-preview {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.your-clip-preview img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.clip-stats {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 8px;
}

.votes-for,
.votes-against {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.battle-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.battle-info > div {
    text-align: center;
}

.battle-info .label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.battle-info .amount {
    display: block;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.battle-info .prize-pool {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-view-battle,
.btn-enter-battle {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #533483 0%, #9b59b6 100%);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-view-battle:hover,
.btn-enter-battle:hover {
    background: linear-gradient(135deg, #9b59b6 0%, #533483 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(155, 89, 182, 0.5);
}

.view-all-battles {
    display: block;
    text-align: center;
    color: #9b59b6;
    text-decoration: none;
    margin-top: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-battles:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
}

/* ================================================
 * LEFT SIDEBAR - XP BAR
 * ================================================ */

.sidebar__xp-bar-container {
    padding: 15px;
    margin: 10px 0;
    background: rgba(83, 52, 131, 0.2);
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 12px;
}

.xp-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.xp-level {
    font-size: 14px;
    font-weight: 800;
    color: #9b59b6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.xp-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.xp-amount {
    font-weight: 700;
    color: #fff;
}

.xp-unit {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.xp-text.max-rank {
    color: #FFD700;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* XP Progress Bar Canvas Styling */
.xp-progress-bar {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.xp-progress-bar canvas {
    display: block;
}

/* ================================================
 * PROFILE BATTLE STATS
 * ================================================ */

.profile-battle-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #533483;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.profile-battle-stats .stat-item {
    text-align: center;
}

.profile-battle-stats .stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.profile-battle-stats .stat-value {
    display: block;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.profile-battle-stats .win-loss-ratio {
    background: linear-gradient(135deg, #9b59b6 0%, #533483 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================================
 * CLIPS GRID (Profile Tab)
 * ================================================ */

.clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.clip-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #533483;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.clip-card:hover {
    border-color: #9b59b6;
    box-shadow: 0 8px 32px rgba(155, 89, 182, 0.4);
    transform: translateY(-4px);
}

.clip-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.clip-status-badge.status-active {
    background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    color: #fff;
}

.clip-status-badge.status-voting {
    background: linear-gradient(135deg, #ffd93d 0%, #fdcb6e 100%);
    color: #000;
}

.clip-status-badge.status-won {
    background: linear-gradient(135deg, #ffd93d 0%, #fdcb6e 100%);
    color: #000;
}

.clip-status-badge.status-lost {
    background: linear-gradient(135deg, #636e72 0%, #2d3436 100%);
    color: #fff;
}

.clip-status-badge.status-completed {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: #fff;
}

.clip-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.clip-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clip-card:hover .clip-overlay {
    opacity: 1;
}

.btn-watch-clip {
    padding: 10px 20px;
    background: linear-gradient(135deg, #533483 0%, #9b59b6 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-watch-clip:hover {
    transform: scale(1.1);
}

.clip-placement-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    z-index: 10;
}

.placement-1 {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.5);
    color: #000;
}

.placement-2 {
    background: linear-gradient(135deg, #95a5a6 0%, #bdc3c7 100%);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.5);
    color: #000;
}

.placement-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e67e22 100%);
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.5);
    color: #fff;
}

.clip-info {
    padding: 15px;
}

.clip-info .clip-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.clip-info .clip-game {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 12px 0;
}

.clip-info .clip-stats {
    display: flex;
    gap: 15px;
    justify-content: space-around;
}

.clip-info .stat {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* ================================================
 * LEADERBOARD TABLE
 * ================================================ */

.leaderboard-table {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #533483;
    border-radius: 15px;
    padding: 15px;
    overflow-x: auto;
    max-width: 100%;
}

.leaderboard-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.leaderboard-table thead th {
    padding: 10px 6px;
    background: rgba(83, 52, 131, 0.3);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-table thead th:nth-child(1) { width: 8%; }
.leaderboard-table thead th:nth-child(2) { width: 25%; }
.leaderboard-table thead th:nth-child(3) { width: 12%; }
.leaderboard-table thead th:nth-child(4) { width: 12%; }
.leaderboard-table thead th:nth-child(5) { width: 10%; }
.leaderboard-table thead th:nth-child(6) { width: 18%; }
.leaderboard-table thead th:nth-child(7) { width: 15%; }

.leaderboard-table tbody tr {
    border-bottom: 1px solid rgba(83, 52, 131, 0.3);
    transition: all 0.3s ease;
}

.leaderboard-table tbody tr:hover {
    background: rgba(155, 89, 182, 0.1);
}

.leaderboard-table tbody td {
    padding: 10px 6px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.rank-cell {
    font-size: 16px;
    font-weight: 800;
    color: #9b59b6;
}

.player-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #533483;
}

.player-name {
    font-weight: 600;
}

.wl-ratio {
    color: #9b59b6;
    font-weight: 700;
}

/* ================================================
 * EMPTY STATE
 * ================================================ */

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state__icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state__title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
}

.empty-state__text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ================================================
 * LOADING SPINNER
 * ================================================ */

.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

/* ================================================
 * RESPONSIVE DESIGN
 * ================================================ */

@media (max-width: 1024px) {
    .battles-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .battles-header__stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .voting-grid {
        grid-template-columns: 1fr;
    }
    
    .voting-vs {
        order: 2;
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .battles-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-battle-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .battle-info-grid {
        grid-template-columns: 1fr;
    }
}

