/* ============================================
   FACEIT-Inspired Enhancements
   Phase 1: Quick Polish for Professional Look
   ============================================ */

/* ============================================
   1. ENHANCED PRIMARY CTA (Join Lobby Button)
   ============================================ */

.btn-primary-hero {
    padding: 20px 60px;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF6A00 100%);
    box-shadow: 0 6px 20px rgba(255, 85, 0, 0.4);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary-hero:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary-hero:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 85, 0, 0.6);
}

.btn-primary-hero:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   2. IMPROVED STAT DISPLAYS
   ============================================ */

.stat-display {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-display:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 85, 0, 0.3);
}

.stat-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 10px rgba(255, 85, 0, 0.3);
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-highlight {
    color: var(--success-color);
}

.stat-warning {
    color: var(--warning-color);
}

/* ============================================
   3. ENHANCED CARD HOVER EFFECTS
   ============================================ */

.card-enhanced {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.card-enhanced:hover::before {
    left: 100%;
}

.card-enhanced:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 85, 0, 0.5);
}

/* ============================================
   4. PLAYER CARD IMPROVEMENTS
   ============================================ */

.player-card-enhanced {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.player-card-enhanced:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 85, 0, 0.3);
}

.player-card-enhanced.is-user {
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.2) 0%, rgba(255, 85, 0, 0.1) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 85, 0, 0.2);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #FF6A00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.player-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-color);
}

.player-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.status-icon {
    font-size: 18px;
}

.status-ready {
    color: var(--success-color);
}

.status-pending {
    color: var(--warning-color);
}

/* ============================================
   5. IMPROVED BUTTONS WITH GLOW
   ============================================ */

.btn-glow {
    box-shadow: 0 0 20px rgba(255, 85, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(255, 85, 0, 0.6);
}

/* ============================================
   6. ENHANCED TYPOGRAPHY
   ============================================ */

.heading-large {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.heading-medium {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.text-highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.text-mono {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* ============================================
   7. LOADING STATES & ANIMATIONS
   ============================================ */

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 85, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 85, 0, 0.8);
    }
}

.loading-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
}

/* ============================================
   8. PROGRESS INDICATORS
   ============================================ */

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 16px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #FF6A00);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 85, 0, 0.6);
}

.progress-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 600;
}

/* ============================================
   9. ENHANCED MODALS
   ============================================ */

.modal-enhanced .modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 33, 62, 0.98) 100%);
    border: 1px solid rgba(255, 85, 0, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ============================================
   10. RESPONSIVE IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    .btn-primary-hero {
        padding: 16px 40px;
        font-size: 18px;
        letter-spacing: 1px;
    }

    .stat-value {
        font-size: 36px;
    }

    .heading-large {
        font-size: 28px;
    }

    .player-card-enhanced {
        padding: 12px;
    }

    .player-avatar {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* ============================================
   11. DASHBOARD GRID IMPROVEMENTS
   ============================================ */

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

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

/* ============================================
   12. BADGE & LABEL ENHANCEMENTS
   ============================================ */

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(46, 204, 113, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.2);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.badge-danger {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.badge-primary {
    background: rgba(255, 85, 0, 0.2);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* ============================================
   13. LEADERBOARD ENHANCEMENTS
   ============================================ */

.leaderboard-row {
    transition: all 0.3s ease;
}

.leaderboard-row:hover {
    background: rgba(255, 85, 0, 0.1);
    transform: scale(1.02);
}

.leaderboard-row.is-user {
    background: rgba(255, 85, 0, 0.15);
    border-left: 3px solid var(--primary-color);
}

.place-1 .leaderboard-place {
    color: #FFD700;
    font-weight: 700;
    font-size: 18px;
}

.place-2 .leaderboard-place {
    color: #C0C0C0;
    font-weight: 700;
    font-size: 17px;
}

.place-3 .leaderboard-place {
    color: #CD7F32;
    font-weight: 700;
    font-size: 16px;
}

/* ============================================
   14. BACKGROUND TEXTURES & DEPTH
   ============================================ */

/* Subtle grid texture for hero sections */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px
        );
    opacity: 0.5;
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Header gradient accent */
.dashboard-header {
    position: relative;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-color) 50%,
        transparent 100%
    );
    opacity: 0.3;
}

/* ============================================
   15. SKELETON LOADERS (Loading States)
   ============================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 16px;
    margin: 8px 0;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin: 12px 0;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-button {
    height: 44px;
    width: 120px;
}

.skeleton-card {
    height: 120px;
    width: 100%;
}

/* ============================================
   16. IMPROVED CARD SHADOWS & DEPTH
   ============================================ */

/* Enhanced shadow system for depth */
.shadow-sm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shadow-md {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.shadow-lg {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.shadow-xl {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

/* Glow effects for interactive elements */
.glow-orange {
    box-shadow: 0 0 20px rgba(255, 85, 0, 0.3);
}

.glow-green {
    box-shadow: 0 0 20px rgba(0, 214, 50, 0.3);
}

/* ============================================
   17. SMOOTH PAGE TRANSITIONS
   ============================================ */

/* Fade-in animation for page load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.fade-in-delay {
    animation: fadeIn 0.5s ease-out 0.2s backwards;
}

/* ============================================
   18. RESPONSIVE ENHANCEMENTS
   ============================================ */

@media (max-width: 768px) {
    .btn-primary-hero {
        padding: 16px 40px;
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 36px;
    }
    
    .player-card-enhanced {
        padding: 12px 16px;
    }
}

/* ============================================
   19. FOCUS STATES FOR ACCESSIBILITY
   ============================================ */

.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary-hero:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* ============================================
   20. UTILITY CLASSES
   ============================================ */

.text-mono {
    font-family: 'Courier New', 'Courier', monospace;
}

.text-highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-muted {
    color: var(--text-muted);
}

.heading-large {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
}

.heading-medium {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
}

.heading-small {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Spacing utilities */
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mt-xl { margin-top: 32px; }

.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.mb-xl { margin-bottom: 32px; }

.p-sm { padding: 8px; }
.p-md { padding: 16px; }
.p-lg { padding: 24px; }
.p-xl { padding: 32px; }
