/* Competitive Features Styles */

/* Bottom-right Notifications */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    pointer-events: none;
}

.notification-item {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideInNotification 0.3s ease-out;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.notification-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
}

.notification-item.achievement::before {
    background: #ffc107;
}

.notification-item.leaderboard::before {
    background: #0dcaf0;
}

.notification-item.trade::before {
    background: #1de9b6;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.notification-icon.achievement { background: #ffc107; }
.notification-icon.leaderboard { background: #0dcaf0; }
.notification-icon.trade { background: #1de9b6; }
.notification-icon.system { background: #6c757d; }

.notification-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-strong);
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.notification-message {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 8px;
}

.notification-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
}

@keyframes slideInNotification {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutNotification {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-item.removing {
    animation: slideOutNotification 0.3s ease-in forwards;
}

/* Right-side Competitive Panel */
.competitive-panel {
    position: fixed;
    top: 80px;
    right: 0;
    width: 380px;
    height: calc(100vh - 80px);
    background: rgba(19, 23, 30, 0.95);
    backdrop-filter: blur(8px);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
}

.competitive-panel.collapsed {
    transform: translateX(100%);
}

.competitive-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-darker);
}

.competitive-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-strong);
}

.competitive-panel-title i {
    color: var(--accent);
}

.competitive-panel-toggle {
    position: fixed;
    top: 96px;
    right: 380px;
    z-index: 1001;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-right: 0;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px 0 0 6px;
    transition: right 0.3s ease, background-color 0.2s;
    height: 48px;
    display: flex;
    align-items: center;
}

.competitive-panel-toggle:hover {
    background: var(--bg-lighter);
    color: var(--text-main);
}

.competitive-panel-toggle i {
    transition: transform 0.3s ease;
}

.competitive-panel-toggle.collapsed {
    right: 0;
}

.competitive-panel-toggle.collapsed i {
    transform: rotate(180deg);
}

.competitive-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.competitive-section {
    background: rgba(33, 38, 45, 0.5);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.competitive-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-strong);
}

.competitive-section-header i {
    color: var(--accent);
    font-size: 12px;
}

.your-rank-badge {
    margin-left: auto;
    background: var(--accent);
    color: var(--bg-darkest);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Mini Leaderboard */
.leaderboard-mini {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard-row.you {
    background: rgba(29, 233, 182, 0.1);
    border: 1px solid rgba(29, 233, 182, 0.3);
}

.leaderboard-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.leaderboard-rank.gold { background: #ffc107; color: #000; }
.leaderboard-rank.silver { background: #C0C0C0; color: #000; }
.leaderboard-rank.bronze { background: #CD7F32; color: #fff; }
.leaderboard-rank.other { background: var(--bg-dark); color: var(--text-main); }

.leaderboard-user {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.leaderboard-username {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-strong);
    font-weight: 500;
}

.leaderboard-username.you::after {
    content: ' (You)';
    color: var(--accent);
    font-weight: 600;
}

.leaderboard-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-main);
}

.leaderboard-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
}

.leaderboard-pnl.positive { color: #1de9b6; }
.leaderboard-pnl.negative { color: #ff4d4f; }

/* Live Trades Mini */
.live-trades-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.live-trade-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.live-trade-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.live-trade-icon.buy { background: rgba(29, 233, 182, 0.2); color: #1de9b6; }
.live-trade-icon.sell { background: rgba(255, 77, 79, 0.2); color: #ff4d4f; }

.live-trade-user {
    color: var(--text-strong);
    font-weight: 500;
    flex: 1;
}

.live-trade-details {
    color: var(--text-main);
    font-size: 11px;
}

/* Custom Scrollbar for Competitive Panel */
.competitive-panel-content::-webkit-scrollbar {
    width: 6px;
}

.competitive-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.competitive-panel-content::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.competitive-panel-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent);
}

/* Tournament Stats Mini */
.tournament-stats-mini {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-main);
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-strong);
    font-weight: 600;
}

/* Your Performance */
.your-performance {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.performance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.performance-row:last-child {
    border-bottom: none;
}

.performance-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-main);
}

.performance-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-strong);
    font-weight: 600;
}

.performance-value.positive { color: #1de9b6; }
.performance-value.negative { color: #ff4d4f; }

/* Mobile Overlay */
.competitive-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.competitive-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .competitive-panel {
        width: 340px;
    }

    .competitive-panel-toggle:not(.collapsed) {
        right: 340px;
    }
}

@media (max-width: 768px) {
    .competitive-panel {
        width: 100%;
        height: 100vh;
        top: 0;
        transform: translateX(100%);
    }
    
    .competitive-panel.active {
        transform: translateX(0);
    }
    
    .notification-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Animation for leaderboard changes */
.leaderboard-row.updated {
    animation: highlightRow 0.5s ease;
}

@keyframes highlightRow {
    0%, 100% { background: rgba(255, 255, 255, 0.02); }
    50% { background: rgba(29, 233, 182, 0.2); }
}

/* Pulse animation for live indicators */
.live-indicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
} 