/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 头部导航 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
  display: flex;
    justify-content: space-between;
  align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
  color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #667eea;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 2rem;
    margin: 1rem 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.card-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.card-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: #666;
    font-size: 1rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e8ed;
  border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  resize: vertical;
    min-height: 100px;
}

.form-error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
    font-size: 1rem;
  font-weight: 500;
    text-decoration: none;
    text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e1e8ed;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #333;
}

.btn-full-width {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 用户卡片样式 */
.user-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.user-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
}

.user-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
  background: #f8f9fa;
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid #e1e8ed;
}

.user-actions {
  display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
  display: flex;
  align-items: center;
    justify-content: center;
}

.btn-like {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

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

.btn-apply {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

/* 队伍卡片样式 */
.team-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.team-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.team-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-forming {
    background: #d4edda;
    color: #155724;
}

.status-full {
    background: #cce7ff;
    color: #004085;
}

.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.member-mini {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

/* 筛选器样式 */
.filters {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* 消息提示样式 */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
  font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.message-toast.info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.message-toast.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.message-toast.error {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.message-toast.warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #333;
}

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

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
  text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-primary {
    background: #667eea;
    color: white;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        text-align: center;
    }
    
    .card {
        padding: 1rem;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .team-members {
        grid-template-columns: 1fr;
    }
    
    .user-actions {
        justify-content: space-around;
    }
}

@media (max-width: 480px) {
    .card-title {
        font-size: 1.4rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 1rem;
        margin: 1rem;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; } 

/* 增强的响应式样式和用户体验改进 */

/* 更好的触摸目标大小 */
@media (max-width: 768px) {
    .action-btn {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .btn {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
    }
    
    .form-input, .form-select, .form-textarea {
        min-height: 48px;
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 改进的卡片间距 */
@media (max-width: 480px) {
    .user-card, .team-card {
        margin: 0.5rem 0;
        padding: 1rem;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .container {
        padding: 10px;
    }
}

/* 更好的模态框移动端体验 */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        width: calc(100% - 2rem);
    }
}

/* 改进的导航栏移动端布局 */
@media (max-width: 480px) {
    .nav-content {
        padding: 0 10px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .user-info span {
        font-size: 0.9rem;
    }
}

/* 改进的表单在小屏幕上的布局 */
@media (max-width: 768px) {
    .d-flex.gap-1 {
  flex-direction: column;
        gap: 0.5rem;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .justify-center {
        align-items: stretch;
    }
}

/* 状态指示器增强 */
.status-indicator {
    position: relative;
    display: inline-block;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

.status-indicator.offline::before {
    background: #6c757d;
    animation: none;
}

/* 改进的加载动画 */
.loading-container {
  display: flex;
  flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-dots {
    display: flex;
    gap: 4px;
    margin: 1rem 0;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: loading-bounce 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 改进的标签系统 */
.tag-group {
  display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.tag {
    transition: all 0.3s ease;
    cursor: default;
}

.tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tag.tag-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
}

.tag.tag-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
}

/* 更好的焦点指示器 */
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 改进的空状态设计 */
.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.empty-state-description {
    color: #666;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 2rem;
}

/* 改进的统计数字动画 */
.stat-number {
    transition: all 0.3s ease;
}

.stat-box:hover .stat-number {
    transform: scale(1.1);
    color: #5a67d8;
}

/* 更好的按钮悬停效果 */
.btn-like:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-skip:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.btn-apply:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

/* 成功状态动画 */
@keyframes success-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.success-animation {
    animation: success-shake 0.5s ease-in-out;
}

/* 改进的进度条 */
.progress-container {
    position: relative;
    margin: 1rem 0;
}

.progress-bar {
    background: #e1e8ed;
    border-radius: 10px;
    overflow: hidden;
    height: 12px;
    position: relative;
}

.progress-fill {
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 改进的通知样式 */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
    animation: notification-pulse 2s infinite;
}

@keyframes notification-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .tag {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #718096;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .btn,
    .modal,
    .message-toast {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 2px solid #333;
    }
    
    .tag {
        border: 1px solid currentColor;
    }
}

/* 减少动画支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 改进的工具提示 */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Firefox滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
} 