.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.table-row {
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background-color: #f9fafb;
}

.input-field {
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Select2 样式覆盖 */
.select2-container--default .select2-selection--single {
    height: 42px;
    padding: 4px;
    border-color: #d1d5db;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

/* 隐藏select2的清除按钮 */
.select2-container--default .select2-selection--single .select2-selection__clear {
    display: none !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #3b82f6;
}

.select2-dropdown {
    border-color: #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 9999 !important; /* 确保下拉菜单显示在最上层 */
}

/* 确保所有Select2容器都有正确的宽度 */
.select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

/* 确保Select2下拉菜单正确显示 */
.select2-dropdown-responsive {
    max-width: 100%;
    width: auto !important;
}

/* 修复Select2下拉菜单在某些情况下的显示问题 */
.select2-results {
    max-height: 300px;
    overflow-y: auto;
}

.select2-results__options {
    max-height: 250px !important;
    overflow-y: auto !important;
}

/* 确保所有Select2选择框都有一致的样式 */
.player-select + .select2-container--default .select2-selection--single {
    height: 42px;
    padding: 4px;
    border-color: #d1d5db;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    background-color: #fff;
}

/* 确保所有Select2选择框的箭头都正确显示 */
.player-select + .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
    position: absolute;
    top: 0;
    right: 8px;
}

/* 确保所有Select2选择框的文本都正确显示 */
.player-select + .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 34px;
    padding-left: 8px;
    padding-right: 20px;
    color: #374151;
}

/* 调整表格列宽度 */
#playerTable th:first-child,
#playerTable td:first-child {
    width: 40%;
}

#playerTable th:nth-child(2),
#playerTable td:nth-child(2) {
    width: 50%;
}

#playerTable th:nth-child(3),
#playerTable td:nth-child(3) {
    width: 10%;
}

/* 玩家头像样式 */
.player-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    vertical-align: middle;
    display: inline-block;
    border: none;
}

/* Pro/Pro Max/Evil 用户标识样式已移至 index.html 中统一管理 */
/* 这样避免样式冲突，便于维护 */



/* 自定义Select2选项样式 */
.select2-results__option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.select2-results__option:hover {
    background-color: #f3f4f6;
}

.select2-selection__rendered {
    display: flex !important;
    align-items: center;
    padding-left: 8px !important;
}

/* 自定义玩家选项样式 */
.player-option {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.player-option-name {
    font-weight: 500;
    color: #374151;
}

/* 移动设备响应式样式 */
@media (max-width: 640px) {
    /* 页面标题 */
    h1.text-4xl {
        font-size: 1.75rem;
    }
    
    /* 按钮样式 */
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    /* 表格样式 */
    #playerTable th, #playerTable td {
        padding: 0.5rem 0.75rem;
    }
    
    /* 表格按钮区域 */
    .flex.flex-wrap.gap-4 {
        flex-direction: column;
        width: 100%;
    }
    
    .flex.flex-wrap.gap-4 button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* 输入框和下拉框 */
    .input-field, .select2-container {
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    /* 调整Select2在移动设备上的显示 */
    .select2-container {
        width: 100% !important;
    }
    
    /* 调整卡片内边距 */
    .card {
        padding: 1rem;
    }
    
    /* 调整网格布局 */
    .grid.grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* 针对特小屏幕的优化 */
@media (max-width: 360px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    h1.text-4xl {
        font-size: 1.5rem;
    }
    
    #playerTable th, #playerTable td {
        padding: 0.4rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* 确保容器在所有设备上居中 */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 确保表格在移动设备上可滚动 */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

/* 优化触摸交互 */
button, .select2-selection, input {
    touch-action: manipulation;
} 