/* 战队风采页面样式 */
.teams-container {
    width: 100vw;
    max-width: 100vw;
    margin: 0 calc(-50vw + 50%);
    padding: 40px 20px;
    background-color: transparent;
    min-height: 80vh;
}

.teams-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.teams-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.teams-header h2 {
    color: #1e3a8a;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-homepage-btn {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.team-homepage-btn:hover {
    text-decoration: underline;
}

.team-showcase-panel {
    display: flex;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    min-height: 400px;
}

.team-status { display: none; margin: auto; color: #667b6a; }
.team-showcase-panel.is-empty .team-status { display: block; }
.team-showcase-panel.is-empty .team-poster-container,
.team-showcase-panel.is-empty .team-players-wrapper { display: none; }

.team-poster-container {
    flex: 1;
    min-height: 400px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-poster-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 改为 contain 保证完整显示海报 */
}

.team-players-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 40px; /* 为左右箭头留出空间 */
    background-color: #f8fafc;
}

.team-players-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
    align-content: start;
    min-height: 400px;
}

.player-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--box-shadow-sm);
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-nav-btn:hover {
    background: var(--primary-color);
    color: white;
}

.player-nav-btn.prev {
    left: 0;
}

.player-nav-btn.next {
    right: 0;
}

.player-nav-btn:disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #eee;
}

.players-pagination {
    text-align: center;
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 成绩与口号弹窗样式 */
.team-stats-card {
    max-width: 600px;
    width: 90%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
    padding: 0;
}

.team-stats-card .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.team-stats-card .modal-close:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
}

.stats-header {
    background: linear-gradient(135deg, var(--theme-blue, #1d4e89), var(--accent-color, #133863));
    color: #fff;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.stats-header h3 {
    margin: 0;
    font-size: 32px;
    font-family: "STXingkai", "Xingkai SC", serif;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.stats-slogan {
    font-size: 18px;
    font-style: italic;
    opacity: 0.95;
    letter-spacing: 1px;
}

.stats-body {
    padding: 30px;
    background: #fdfdfd;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table th, .stats-table td {
    padding: 16px;
    border-bottom: 1px dashed #eaeaea;
    text-align: left;
    font-size: 16px;
}

.stats-table th {
    color: #666;
    font-weight: 500;
    width: 40%;
    padding-left: 20px;
}

.stats-table td {
    color: #333;
    font-weight: 600;
}

.stats-table tr:last-child th,
.stats-table tr:last-child td {
    border-bottom: none;
}

.player-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #ffffff;
    color: #1e293b;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px;
}

.player-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #93c5fd;
    background: linear-gradient(to bottom right, #ffffff, #eff6ff);
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #3b82f6;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    opacity: 0.8;
}

.player-position-tag {
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.player-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f172a;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.player-real-name {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.teams-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    margin-top: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
}

.team-icon-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 14px 28px;
    border-radius: 40px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.team-icon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15);
    border-color: #bfdbfe;
    background: #eff6ff;
}

.team-icon-card.active {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.team-name-text {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.team-icon-card:hover .team-name-text {
    color: #1d4ed8;
}

.team-icon-card.active .team-name-text {
    color: #ffffff;
}

/* ---------------- 3D翻转卡片与弹窗 ---------------- */
#team-stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.flip-modal-content {
    position: relative;
    background: transparent !important;
    box-shadow: none !important;
    max-width: 600px;
    width: 90%;
    padding: 0;
    border-radius: 20px;
    margin: 0 auto;
}

.flip-modal-content .close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.flip-modal-content .close-modal:hover {
    color: #cbd5e1;
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 450px;
    perspective: 1000px; /* 3D透视效果 */
    border-radius: 20px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.flip-card-inner.is-flipped {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}

/* 正面样式：深色背景，突出Logo */
.flip-card-front {
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
    color: white;
}

.flip-card-front img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    padding: 10px;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    margin-bottom: 25px;
}

.flip-card-front h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slogan-text {
    font-size: 18px;
    font-style: italic;
    color: #cbd5e1;
    line-height: 1.5;
    max-width: 80%;
}

/* 背面样式：浅色背景，展示数据 */
.flip-card-back {
    background: #ffffff;
    color: #333;
    transform: rotateY(180deg);
}

.flip-card-back h2 {
    font-size: 24px;
    color: #1e3a8a;
    margin-bottom: 30px;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 10px;
}

.stats-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stats-flex-row {
    display: flex;
    justify-content: space-around;
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.stat-item {
    text-align: center;
}

.stat-title {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rank-badge {
    background: #fef08a;
    color: #b45309;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.rank-box {
    background: #fef08a;
    color: #b45309;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
    display: inline-block;
    border: 2px solid #fde047;
}

/* ---------------- 科技感翻转提示胶囊 ---------------- */
.flip-hint-wrapper {
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    animation: floatHint 3s ease-in-out infinite;
}

@keyframes floatHint {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.flip-hint-line {
    height: 1px;
    width: 80px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5));
}
.flip-hint-line:last-child {
    background: linear-gradient(270deg, transparent, rgba(255,255,255,0.5));
}

.flip-hint-capsule {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 12px 8px 20px;
    border-radius: 30px;
    margin: 0 15px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.flip-hint-wrapper:hover .flip-hint-capsule {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

.flip-hint-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin-right: 12px;
    letter-spacing: 1px;
}

.flip-icon-box {
    width: 28px;
    height: 28px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a8a;
    font-size: 12px;
}

.flip-icon-box i {
    animation: spinSlow 4s linear infinite;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 背面时的幽灵模式 */
.flip-hint-wrapper.is-dark .flip-hint-line {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.2));
}
.flip-hint-wrapper.is-dark .flip-hint-line:last-child {
    background: linear-gradient(270deg, transparent, rgba(0,0,0,0.2));
}
.flip-hint-wrapper.is-dark .flip-hint-capsule {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0,0,0,0.1);
}
.flip-hint-wrapper.is-dark .flip-hint-text {
    color: #475569;
}
.flip-hint-wrapper.is-dark .flip-icon-box {
    background: #1e3a8a;
    color: #ffffff;
}

