/**
 * Matches Archive - Modern Grid View
 * Modern card-based design for matches
 * @package team-exciting
 * @version 1.0.0
 */

/* ===================================
   MATCHES PAGE HEADER
   =================================== */

.trn-matches-page-header {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(138, 43, 226, 0.05));
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.trn-matches-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #00d9ff, #8a2be2, #00d9ff);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.trn-matches-page-header h1 {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #00d9ff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.trn-matches-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(0, 217, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.trn-stat-box:hover {
    transform: translateY(-5px);
    border-color: #00d9ff;
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
}

.trn-stat-box-value {
    font-size: 36px;
    font-weight: 900;
    color: #00d9ff;
    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;
}

/* ===================================
   SEARCH AND FILTERS
   =================================== */

.trn-matches-filters {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.trn-matches-search {
    position: relative;
    flex: 1;
    min-width: 280px;
    max-width: 500px;
}

.trn-matches-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
}

.trn-matches-search input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 30px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.trn-matches-search input:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.trn-matches-filter-btn {
    padding: 12px 25px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trn-matches-filter-btn:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: #00d9ff;
    color: #00d9ff;
}

.trn-matches-filter-btn.active {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(138, 43, 226, 0.1));
    border-color: #00d9ff;
    color: #00d9ff;
}

/* ===================================
   MATCHES GRID
   =================================== */

.trn-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* ===================================
   MATCH CARD
   =================================== */

.trn-match-card {
    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;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.trn-match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00d9ff, #8a2be2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.trn-match-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 70px rgba(0, 217, 255, 0.5);
    border-color: rgba(0, 217, 255, 0.5);
}

.trn-match-card:hover::before {
    transform: scaleX(1);
}

/* Card Header */
.trn-match-card-header {
    padding: 25px;
    background: linear-gradient(180deg, rgba(0, 217, 255, 0.05), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.trn-match-event-name {
    font-size: 14px;
    font-weight: 600;
    color: #00d9ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.trn-match-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0;
}

/* Match Status Badge */
.trn-match-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.trn-match-status-badge.status-scheduled {
    background: linear-gradient(135deg, #00d9ff, #0099cc);
    color: #000;
    border: 2px solid #00d9ff;
}

.trn-match-status-badge.status-live {
    background: linear-gradient(135deg, #ff3233, #cc0000);
    color: #fff;
    border: 2px solid #ff3233;
    animation: pulse 2s ease infinite;
}

.trn-match-status-badge.status-complete {
    background: linear-gradient(135deg, #38ff1e, #00a000);
    color: #000;
    border: 2px solid #38ff1e;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Match Competitors */
.trn-match-competitors {
    padding: 30px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.trn-match-competitor {
    flex: 1;
    text-align: center;
}

.trn-match-competitor-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.trn-match-competitor-score {
    font-size: 32px;
    font-weight: 900;
    color: #00d9ff;
}

.trn-match-vs {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Winner Indicator */
.trn-match-competitor.winner .trn-match-competitor-name {
    color: #38ff1e;
}

.trn-match-competitor.winner .trn-match-competitor-score {
    color: #38ff1e;
}

/* Match Meta */
.trn-match-meta {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.trn-match-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.trn-match-meta-item i {
    color: #00d9ff;
    font-size: 16px;
}

/* Card Footer */
.trn-match-card-footer {
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.trn-match-view-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(138, 43, 226, 0.1));
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 10px;
    color: #00d9ff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.trn-match-view-btn:hover {
    background: linear-gradient(135deg, #00d9ff, #8a2be2);
    border-color: #00d9ff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 217, 255, 0.4);
}

/* Empty State */
.trn-matches-empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(26, 26, 26, 0.5);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.trn-matches-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.trn-matches-empty-title {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

.trn-matches-empty-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.3);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .trn-matches-page-header h1 {
        font-size: 36px;
    }

    .trn-matches-page-header {
        padding: 30px 20px;
    }

    .trn-matches-stats-overview {
        flex-direction: column;
    }

    .trn-matches-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .trn-matches-search {
        max-width: 100%;
    }

    .trn-matches-grid {
        grid-template-columns: 1fr;
    }

    .trn-match-competitors {
        flex-direction: column;
        gap: 15px;
    }

    .trn-match-vs {
        transform: rotate(90deg);
    }

    .trn-match-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .trn-matches-page-header h1 {
        font-size: 28px;
    }

    .trn-stat-box-value {
        font-size: 28px;
    }

    .trn-match-competitor-score {
        font-size: 24px;
    }

    .trn-match-name {
        font-size: 16px;
    }
}
