/**
 * Players Archive - Modern Design
 * Coole Player Cards mit Avataren, Stats und Animationen
 * @package team-exciting
 * @version 1.0.0
 */

/* ===================================
   PLAYERS PAGE HEADER
   =================================== */

.trn-players-page-header {
    background: linear-gradient(135deg, rgba(255, 50, 51, 0.1), rgba(56, 255, 30, 0.05));
    border: 2px solid rgba(255, 50, 51, 0.2);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.trn-players-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #ff3233, #38ff1e, #ff3233);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.trn-players-page-header h1 {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #ff3233, #38ff1e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.trn-players-stats-overview {
    display: flex;
    gap: 30px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.trn-stat-box {
    flex: 1;
    min-width: 150px;
    background: rgba(26, 26, 26, 0.8);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 50, 51, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.trn-stat-box:hover {
    transform: translateY(-5px);
    border-color: #ff3233;
    box-shadow: 0 10px 30px rgba(255, 50, 51, 0.3);
}

.trn-stat-box-value {
    font-size: 36px;
    font-weight: 900;
    color: #ff3233;
    display: block;
    margin-bottom: 8px;
}

.trn-stat-box-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===================================
   HIDE OLD TABLE, SHOW GRID
   =================================== */

/* Don't hide table by default - JavaScript will hide it after transformation
.trn-players-table {
    display: none !important;
}
*/

/* ===================================
   PLAYERS GRID LAYOUT
   =================================== */

.trn-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
    padding-bottom: 50px;
}

/* ===================================
   PLAYER CARD DESIGN
   =================================== */

.trn-player-card {
    position: relative;
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.95), rgba(37, 37, 37, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.trn-player-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #ff3233, #38ff1e, #ff3233);
    background-size: 200% 200%;
    border-radius: 20px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    animation: borderGlow 3s ease infinite;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.trn-player-card:hover::before {
    opacity: 1;
}

.trn-player-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 70px rgba(255, 50, 51, 0.5);
}

/* ===================================
   PLAYER CARD HEADER
   =================================== */

.trn-player-card-header {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    overflow: hidden;
}

.trn-player-card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 50, 51, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.trn-player-card:hover .trn-player-card-header::after {
    opacity: 1;
}

/* ===================================
   PLAYER AVATAR
   =================================== */

.trn-player-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff3233, #38ff1e);
    padding: 4px;
    transition: all 0.4s ease;
    z-index: 2;
}

.trn-player-card:hover .trn-player-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 40px rgba(255, 50, 51, 0.6);
}

.trn-player-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.trn-player-avatar img,
.trn-player-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.trn-player-avatar-fallback {
    font-size: 48px;
    font-weight: 900;
    color: #ff3233;
    text-transform: uppercase;
}

/* Online Status Badge - Discord Colors */
.trn-player-status-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: #747f8d; /* Discord offline gray */
    border: 3px solid #1a1a1a;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(116, 127, 141, 0.6);
    z-index: 10;
    transition: all 0.3s ease;
}

/* Discord Online - Green */
.trn-player-status-badge.online {
    background: #43b581;
    box-shadow: 0 0 15px rgba(67, 181, 129, 0.8);
    animation: pulse 2s ease infinite;
}

/* Discord Idle - Yellow/Amber */
.trn-player-status-badge.idle {
    background: #faa61a;
    box-shadow: 0 0 15px rgba(250, 166, 26, 0.8);
    animation: pulse 2s ease infinite;
}

/* Discord Do Not Disturb - Red */
.trn-player-status-badge.dnd {
    background: #f04747;
    box-shadow: 0 0 15px rgba(240, 71, 71, 0.8);
}

/* Offline - Gray */
.trn-player-status-badge.offline {
    background: #747f8d;
    box-shadow: none;
    animation: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ===================================
   PLAYER CARD BODY
   =================================== */

.trn-player-card-body {
    padding: 25px;
    text-align: center;
}

.trn-player-name {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.trn-player-card:hover .trn-player-name {
    color: #ff3233;
    text-shadow: 0 0 20px rgba(255, 50, 51, 0.6);
}

/* Discord Username */
.trn-player-discord-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-weight: 500;
}

.trn-player-discord-name svg {
    width: 16px;
    height: 16px;
    fill: #5865F2; /* Discord Blurple */
    opacity: 0.8;
}

.trn-player-discord-name:hover {
    color: rgba(255, 255, 255, 0.9);
}

.trn-player-discord-name:hover svg {
    opacity: 1;
}

/* Game Status */
.trn-player-game-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #5865F2;
    margin-bottom: 12px;
    text-transform: none;
    letter-spacing: 0.5px;
    animation: gameGlow 2s ease infinite;
}

@keyframes gameGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(88, 101, 242, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(88, 101, 242, 0.4);
    }
}

.trn-player-game-status i {
    color: #5865F2;
    font-size: 14px;
}

.trn-player-rank {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(56, 255, 30, 0.15);
    border: 1px solid rgba(56, 255, 30, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #38ff1e;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.trn-player-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.trn-player-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.trn-player-meta-item i {
    color: #ff3233;
}

/* ===================================
   PLAYER STATS
   =================================== */

.trn-player-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trn-player-stat {
    text-align: center;
    transition: all 0.3s ease;
}

.trn-player-stat:hover {
    transform: scale(1.1);
}

.trn-player-stat-value {
    font-size: 24px;
    font-weight: 900;
    color: #ff3233;
    display: block;
    margin-bottom: 5px;
}

.trn-player-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================
   PLAYER CARD FOOTER
   =================================== */

.trn-player-card-footer {
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trn-player-teams {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.trn-player-team-badge {
    padding: 4px 12px;
    background: rgba(255, 50, 51, 0.15);
    border: 1px solid rgba(255, 50, 51, 0.3);
    border-radius: 12px;
    font-size: 11px;
    color: #ff3233;
    transition: all 0.3s ease;
}

.trn-player-team-badge:hover {
    background: rgba(255, 50, 51, 0.3);
    transform: translateY(-2px);
}

.trn-player-view-profile {
    padding: 8px 20px;
    background: linear-gradient(135deg, #ff3233, #cc0000);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.trn-player-view-profile:hover {
    background: linear-gradient(135deg, #cc0000, #ff3233);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 50, 51, 0.4);
    color: #fff;
}

/* ===================================
   LOADING STATE
   =================================== */

.trn-players-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 20px;
}

.trn-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 50, 51, 0.2);
    border-top-color: #ff3233;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.trn-loading-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===================================
   EMPTY STATE
   =================================== */

.trn-players-empty {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.trn-players-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.trn-players-empty-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
}

.trn-players-empty-text {
    font-size: 16px;
    margin-bottom: 30px;
}

/* ===================================
   FILTERS & SEARCH
   =================================== */

.trn-players-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.trn-players-search {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.trn-players-search input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(255, 50, 51, 0.2);
    border-radius: 30px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.trn-players-search input:focus {
    outline: none;
    border-color: #ff3233;
    box-shadow: 0 0 20px rgba(255, 50, 51, 0.3);
}

.trn-players-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
}

.trn-players-filter-btn {
    padding: 15px 30px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(255, 50, 51, 0.2);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trn-players-filter-btn:hover,
.trn-players-filter-btn.active {
    background: rgba(255, 50, 51, 0.2);
    border-color: #ff3233;
    color: #fff;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1024px) {
    .trn-players-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }

    .trn-players-page-header h1 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .trn-players-grid {
        grid-template-columns: 1fr;
    }

    .trn-players-stats-overview {
        flex-direction: column;
    }

    .trn-players-filters {
        flex-direction: column;
    }

    .trn-players-search {
        width: 100%;
    }

    .trn-players-page-header {
        padding: 30px 20px;
    }

    .trn-players-page-header h1 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .trn-player-avatar {
        width: 100px;
        height: 100px;
    }

    .trn-player-name {
        font-size: 20px;
    }

    .trn-player-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}
