/* teams.css - 队伍页面专用样式 */

/* 搜索控件样式 */
.search-section {
    margin-bottom: 2.5rem;
    text-align: center;
}

.search-form {
    display: inline-block;
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.search-input {
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1.1rem;
    min-width: 200px;
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-input:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.2);
    transform: translateY(-2px);
}

.search-btn {
    background: linear-gradient(135deg, #ff6600, #ff8c00);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.search-btn {
    background: linear-gradient(135deg, #ff6600, #ff8c00);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.search-btn:hover {
    background: linear-gradient(135deg, #e55a00, #e67e22);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

.clear-search-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* 模块头部样式 */
.section-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin: 0 0 1.5rem 0;
    font-size: 1.4rem;
    text-align: center;
    box-shadow: 0 3px 8px rgba(255, 107, 107, 0.25);
    line-height: 1.3;
}

/* 队伍卡片网格布局 */
.favorite-teams-grid,
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.favorite-team-card {
    border: 2px solid #ff6b6b;
    background: #fff0f0;
}

/* 队伍卡片样式 */
.team-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
    border-color: #ff6600;
}

/* 队伍头部样式 */
.team-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.team-logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.team-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.2;
}

.team-header-info {
    flex: 1;
}

.team-short-name {
    color: #6c757d;
    font-size: 0.8rem;
}

/* 队伍信息样式 */
.team-info {
    flex: 1;
}

.team-info p {
    margin: 0.3rem 0;
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.3;
}

.team-info strong {
    color: #495057;
}

/* 队伍统计样式 */
.team-stats {
    border-top: 1px solid #f0f0f0;
    padding-top: 0.5rem;
}

.team-stats h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #495057;
    font-weight: 600;
}

.team-stats p {
    margin: 0.2rem 0;
    font-size: 0.8rem;
    color: #6c757d;
}

/* 队伍操作按钮样式 */
.team-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex; /* 确保按钮是行内flex布局 */
    align-items: center; /* 垂直居中对齐 */
    justify-content: center; /* 水平居中对齐 */
    text-align: center; /* 文字居中 */
    line-height: 1.2; /* 调整行高 */
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* 队伍卡片基础样式 */
.team-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-color: #ffa500;
}

/* 关注按钮样式 */
.favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid #ffa500;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffa500, #ffb84d);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    justify-content: center; /* 水平居中对齐 */
    text-align: center; /* 文字居中 */
    line-height: 1.2; /* 调整行高 */
}

.favorite-btn:hover {
    background: linear-gradient(135deg, #ffb84d, #ffa500);
    transform: translateY(-1px);
    box-shadow: 0 1px 4px rgba(255, 165, 0, 0.3);
}

.favorite-btn.favorited {
    background: #fff9e6;
    border-color: #ffa500;
    color: #ffa500;
}

.favorite-btn.favorited:hover {
    background: #fff4d4;
    border-color: #e69500;
}

.favorite-btn:disabled {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
}

.favorite-icon {
    font-size: 0.8rem;
}

.favorite-text {
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .favorite-teams-grid,
    .teams-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .search-input-group {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .search-input {
        min-width: auto;
        width: 100%;
        max-width: none;
        font-size: 1rem;
        padding: 0.8rem 1rem;
        flex: 1;
    }
    
    .search-btn,
    .clear-search-btn {
        padding: 0.8rem 1rem;
        font-size: 1rem;
        white-space: nowrap;
        min-width: 60px;
    }
    
    /* 移动端关注按钮优化 */
    .favorite-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        display: inline-flex !important; /* 确保移动端也是行内flex布局 */
        align-items: center !important; /* 垂直居中对齐 */
        justify-content: center !important; /* 水平居中对齐 */
        text-align: center !important; /* 文字居中 */
        line-height: 1.2 !important; /* 调整行高 */
    }
    
    .favorite-text {
        display: none;
    }
    
    /* 队伍卡片移动端优化 - 紧凑布局 */
    .team-card {
        padding: 0.8rem !important;
        margin-bottom: 0.5rem !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 0.8rem !important;
        min-height: auto !important;
    }
    
    .team-card .team-header {
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
        width: auto !important;
    }
    
    .team-card .team-logo {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 0 !important;
        margin-right: 0.5rem !important;
    }
    
    .team-card .team-header-info {
        min-width: 0 !important;
    }
    
    .team-card .team-header-info h3 {
        font-size: 0.9rem !important;
        margin-bottom: 0.2rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .team-card .team-header-info .team-short-name {
        font-size: 0.75rem !important;
        color: #6c757d !important;
    }
    
    .team-card .team-info,
    .team-card .team-stats {
        display: none !important; /* 移动端隐藏详细信息 */
    }
    
    .team-card .team-actions {
        flex-direction: row !important;
        gap: 0.4rem !important;
        margin-top: 0.5rem !important;
        flex-wrap: wrap !important;
    }
    
    .team-card .team-actions .btn,
    .team-card .team-actions .favorite-btn {
        width: auto !important;
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
        min-width: auto !important;
        flex: 1 !important;
        justify-content: center !important;
        display: inline-flex !important; /* 确保按钮是行内flex布局 */
        align-items: center !important; /* 垂直居中对齐 */
        text-align: center !important; /* 文字居中 */
        line-height: 1.2 !important; /* 调整行高 */
    }
    
    /* 关注按钮移动端格式统一 */
    .team-card .favorite-btn {
        border-radius: 8px !important;
        background: linear-gradient(135deg, #ffa500, #ffb84d) !important;
        border: 1px solid #ffa500 !important;
    }
    
    .team-card .favorite-btn.favorited {
        background: #fff9e6 !important;
        border-color: #ffa500 !important;
        color: #ffa500 !important;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .search-input {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .search-btn,
    .clear-search-btn {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
}

/* 无数据样式 */
.no-data {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Toast消息样式 */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Toast消息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

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

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #333;
}