/* style.css - 样式文件 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #f0f0f0;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

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

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(76, 201, 240, 0.3);
}

.header p {
    color: #b0b0d0;
    font-size: 1.1rem;
}

/* 搜索表单样式 */
.search-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #a0a0c8;
    font-weight: 600;
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.search-type-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.search-type-option {
    flex: 1;
    min-width: 150px;
}

.search-type-option input[type="radio"] {
    display: none;
}

.search-type-option label {
    display: block;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
    color: #b0b0d0;
}

.search-type-option input[type="radio"]:checked + label {
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
    color: white;
    border-color: #4361ee;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.search-type-option label:hover {
    background: rgba(67, 97, 238, 0.2);
    border-color: rgba(67, 97, 238, 0.5);
}

.search-button {
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    margin-top: 20px;
    letter-spacing: 1px;
}

.search-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
}

.search-button:active {
    transform: translateY(0);
}

/* 消息提示样式 */
.message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.message.success {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border-left: 4px solid #2ecc71;
}

.message.error {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

/* 结果表格样式 */
.results-container {
    margin-top: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results-header h2 {
    font-size: 1.8rem;
    color: #4cc9f0;
}

.results-count {
    color: #a0a0c8;
    font-size: 1rem;
}

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 表头样式 - 三等分 */
.results-table th {
    padding: 18px 15px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(76, 201, 240, 0.3);
    width: 33.33%;
}

/* 第一列表头：怪物名称 - 蓝色 */
.results-table th:nth-child(1) {
    background: linear-gradient(90deg, rgba(67, 97, 238, 0.3), rgba(67, 97, 238, 0.2));
    color: #4cc9f0;
}

/* 第二列表头：物品名称 - 绿色 */
.results-table th:nth-child(2) {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.3), rgba(46, 204, 113, 0.2));
    color: #2ecc71;
}

/* 第三列表头：地图名称 - 紫色 */
.results-table th:nth-child(3) {
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.3), rgba(155, 89, 182, 0.2));
    color: #9b59b6;
}

/* 表格单元格基础样式 - 三等分 */
.results-table td {
    white-space: pre-line;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    word-wrap: break-word;
    word-break: break-word;
    width: 33.33%;
    vertical-align: top;
    line-height: 1.5;
}

/* 第一列单元格：怪物名称 - 蓝色系 */
.results-table td:nth-child(1) {
    background: linear-gradient(90deg, rgba(67, 97, 238, 0.08), rgba(67, 97, 238, 0.05));
    border-right: 1px solid rgba(67, 97, 238, 0.2);
}

/* 第二列单元格：物品名称 - 绿色系 */
.results-table td:nth-child(2) {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.08), rgba(46, 204, 113, 0.05));
    border-right: 1px solid rgba(46, 204, 113, 0.2);
}

/* 第三列单元格：地图名称 - 紫色系 */
.results-table td:nth-child(3) {
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.08), rgba(155, 89, 182, 0.05));
}

/* 奇偶行效果 */
.results-table tr:nth-child(even) td:nth-child(1) {
    background: linear-gradient(90deg, rgba(67, 97, 238, 0.12), rgba(67, 97, 238, 0.08));
}

.results-table tr:nth-child(even) td:nth-child(2) {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.12), rgba(46, 204, 113, 0.08));
}

.results-table tr:nth-child(even) td:nth-child(3) {
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.12), rgba(155, 89, 182, 0.08));
}

/* 悬停效果 */
.results-table tr:hover td:nth-child(1) {
    background: linear-gradient(90deg, rgba(67, 97, 238, 0.18), rgba(67, 97, 238, 0.12));
}

.results-table tr:hover td:nth-child(2) {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.18), rgba(46, 204, 113, 0.12));
}

.results-table tr:hover td:nth-child(3) {
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.18), rgba(155, 89, 182, 0.12));
}

/* 圆角处理 */
.results-table tr:first-child th:first-child {
    border-top-left-radius: 10px;
}

.results-table tr:first-child th:last-child {
    border-top-right-radius: 10px;
}

.results-table tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.results-table tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.page-button {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #b0b0d0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-button:hover {
    background: rgba(67, 97, 238, 0.2);
    color: white;
}

.page-button.active {
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
    color: white;
    border-color: #4361ee;
}

.page-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 无结果样式 */
.no-results {
    text-align: center;
    padding: 50px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-top: 20px;
}

.no-results i {
    font-size: 4rem;
    color: #a0a0c8;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #a0a0c8;
}

.no-results p {
    color: #8888aa;
    font-size: 1.1rem;
}

/* 页脚样式 */
.footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #8888aa;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .search-form {
        padding: 20px;
    }
    
    .search-type-container {
        flex-direction: column;
    }
    
    .search-type-option {
        min-width: 100%;
    }
    
    .results-table {
        display: block;
        overflow-x: auto;
    }
    
    .results-table th,
    .results-table td {
        padding: 12px 10px;
        font-size: 0.9rem;
        min-width: 120px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* 高亮搜索关键词 */
.highlight {
    background-color: rgba(76, 201, 240, 0.3);
    padding: 2px 4px;
    border-radius: 4px;
    color: #4cc9f0;
    font-weight: 600;
    display: inline;
}

/* 响应式小屏幕下的列宽度调整 */
@media (max-width: 480px) {
    .results-table td {
        min-width: 100px;
        padding: 10px 8px;
        font-size: 0.85rem;
    }
}

