/* ===== 团队竞赛邀请弹窗样式 ===== */
.team-invite-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.team-invite-overlay.show {
    opacity: 1;
    visibility: visible;
}

.team-invite-modal {
    position: relative;
    width: 85%;
    max-width: 300px;
    background: #fcf7e7;
    border-radius: 14px;
    padding-top: 35px;
    padding-left: 18px;
    padding-right: 18px;
    padding-bottom: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(211, 77, 61, 0.12);
    border: 1px solid #F6E1C4;
    transform: scale(0.9) translateY(15px);
    transition: transform 0.3s ease;
}

.team-invite-overlay.show .team-invite-modal {
    transform: scale(1) translateY(0);
}

.team-invite-banner {
    position: absolute;
    top: -8px;/*间隔*/
    left: -2px;
    right: -2px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.team-banner-img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.team-invite-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D34D3D;
    transition: transform 0.2s ease, color 0.2s ease;
    z-index: 20;
}

.team-invite-close svg {
    width: 22px;
    height: 22px;
}

.team-invite-close:hover {
    transform: rotate(90deg);
    color: #B33A3A;
}

.team-invite-close:active {
    transform: scale(0.9);
}

.team-invite-content {
    margin-top: 8px;
}

.team-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 4px;
    margin-bottom: 18px;
}

.team-name-label {
    font-size: 15px;
    font-weight: 900;
    color: #5C2B11;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.team-name-input {
    flex: 1;
    height: 38px;
    max-width: 140px;
    background: white;
    border: 2px solid #EACFA5;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #5C2B11;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.team-name-input:focus {
    border-color: #D34D3D;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 0 2px rgba(211, 77, 61, 0.12);
}

.team-name-input::placeholder {
    color: #C4A882;
    font-size: 12px;
}

.team-action-panel {
    background: #FFF0D8;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid #F6E6D1;
    margin-bottom: 18px;
}

.team-random-btn {
    background: linear-gradient(180deg, #E8A030 0%, #C97820 100%);
    background-color: #db8d2e;
    color: white;
    padding: 9px 16px;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 0 #A85816;
    transition: all 0.15s ease;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.team-random-btn:hover {
    filter: brightness(1.05);
}

.team-random-btn:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #A85816;
}

.team-divider {
    width: 24px;
    height: 2px;
    background: #E1C9A5;
    flex-shrink: 0;
}

.team-add-friend {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.2s ease;
}

.team-add-friend:hover .team-add-icon {
    transform: scale(1.08);
}

.team-add-icon {
    width: 44px;
    height: 44px;
    background: #FFF8EE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #F4E3C8;
    transition: transform 0.2s ease;
}

.team-add-icon svg {
    width: 20px;
    height: 20px;
}

.team-add-text {
    font-size: 13px;
    font-weight: 700;
    color: #5C2B11;
}

.team-start-btn {
    width: 100%;
    height: 46px;
    background: linear-gradient(180deg, #E83C25 0%, #CC2310 100%);
    background-color: #d32f13;
    color: white;
    border: 1px solid #F25C46;
    border-radius: 24px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 3px;
    cursor: pointer;
    box-shadow: 0 3px 0 #961A0C;
    transition: all 0.15s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-start-btn:hover {
    filter: brightness(1.03);
}

.team-start-btn:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #961A0C;
}

/* ===== 匹配成功的队友信息样式 ===== */
.team-teammate-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    cursor: default;
    padding: 4px;
}

.team-teammate-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4CAF50;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.team-teammate-name {
    font-size: 12px;
    font-weight: 700;
    color: #5C2B11;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 表单验证样式 ===== */

/* 输入框错误状态 */
.team-name-input.error {
    border-color: #E53935 !important;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.05),
        0 0 0 3px rgba(229, 57, 53, 0.15) !important;
    animation: shake 0.5s ease;
}

/* 震动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* 队友区域抖动提示 */
.team-action-panel.error-shake {
    animation: shake 0.5s ease;
    border-color: #E53935 !important;
}

/* ===== Toast 提示组件样式 (标准手机APP风格) ===== */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    pointer-events: none;
}

.toast-message {
    background: rgba(0, 0, 0, 0.75);
    color: #FFF;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.25s ease-out;
    max-width: 280px;
    min-width: 160px;
    text-align: center;
    line-height: 1.5;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-text {
    line-height: 1.4;
}
