/* 全域樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}
/* 頂部導航列 */
.top-nav {
    background: rgba(20, 20, 30, 0.95);
    border: 2px solid #4a4a6a;
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffd700;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
}
.nav-icon {
    font-size: 1.5em;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    flex-wrap: wrap;
}
.nav-link {
    display: block;
    padding: 10px 20px;
    color: #d0d0d0;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    border: 2px solid transparent;
    font-weight: 500;
}
.nav-link:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-color: #ffd700;
    transform: translateY(-2px);
}
.nav-link.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #764ba2;
}
/* 頁首 */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}
.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 20px rgba(255,215,0,0.3);
}
.header p {
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
/* 搜尋面板 */
.search-panel {
    background: rgba(30, 30, 40, 0.95);
    border: 2px solid #4a4a6a;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #e0e0e0;
}
.form-group input,
.form-group select {
    padding: 10px;
    border: 2px solid #3d3d5c;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(20, 20, 30, 0.8);
    color: #ffffff;
    transition: border-color 0.3s, background 0.3s;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(30, 30, 40, 0.9);
}
.form-group select option {
    background: #1a1a2e;
    color: #ffffff;
}
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-search {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    flex: 1;
    border: 2px solid #764ba2;
}
.btn-search:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-reset {
    background: #8b4513;
    color: white;
    flex: 0 0 auto;
    border: 2px solid #a0522d;
}
.btn-reset:hover {
    background: #a0522d;
}
/* 搜尋結果資訊 */
.results-info {
    color: white;
    margin-bottom: 15px;
    font-size: 18px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.results-info strong {
    color: #ffd700;
}
/* 物品網格 */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}
/* 物品卡片 */
.item-card {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.98) 0%, rgba(25, 25, 35, 0.98) 100%);
    border: 2px solid #4a4a6a;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
    position: relative;
    /* 微妙的網格紋理 */
    background-image: 
        linear-gradient(135deg, rgba(30, 30, 40, 0.98) 0%, rgba(25, 25, 35, 0.98) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
}
.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
}
.item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}
.item-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a4a6a, #2a2a4a);
    border: 2px solid #6a6a8a;
    flex-shrink: 0;
}
.item-name {
    font-weight: bold;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
/* 英雄模式標記（純綠色文字,與屬性加成相同） */
.heroic-tag {
    color: #1eff00;
    font-size: 13px;
    margin-top: 2px;
}

/* 陣營標記樣式 */
.faction-tag {
    display: inline-block;
    padding: 3px 10px;
    margin-top: 4px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 部落專屬 - 紅底白字 */
.faction-horde {
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.6);
}

/* 聯盟專屬 - 藍底白字 */
.faction-alliance {
    background: linear-gradient(135deg, #0047AB 0%, #1E90FF 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 71, 171, 0.6);
}

/* GM 指令複製按鈕 */
.copy-gm-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid #4a4a6a;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    color: #ffd700;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.copy-gm-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #764ba2;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}
.copy-gm-btn:active {
    transform: scale(0.95);
}
/* 複製通知 */
.copy-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.98), rgba(25, 25, 35, 0.98));
    color: #ffd700;
    padding: 15px 25px;
    border-radius: 10px;
    border: 2px solid #ffd700;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
    z-index: 9999;
    font-weight: bold;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-out;
}
.copy-notification.show {
    opacity: 1;
    transform: translateX(0);
}
.item-details {
    font-size: 13px;
    color: #d0d0d0;
    line-height: 1.6;
}
.item-details strong {
    color: #ffffff;
}
.item-section {
    border-top: 1px solid #3d3d5c;
    margin-top: 8px;
    padding-top: 8px;
}
/* 物品標記 */
.item-flag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.flag-primary {
    background: linear-gradient(135deg, #ff8000, #ff6600);
    color: white;
    border: 1px solid #cc6600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.flag-extra {
    background: linear-gradient(135deg, #0070dd, #0055aa);
    color: white;
    border: 1px solid #004488;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.item-description {
    font-style: italic;
    color: #ffd700;
    margin-top: 8px;
    font-size: 12px;
    border-top: 1px solid #3d3d5c;
    padding-top: 8px;
}
/* 特殊顏色 */
.text-green {
    color: #1eff00;
}
.text-blue {
    color: #0070dd;
}
.text-orange {
    color: #ff8000;
}
.text-yellow {
    color: #ffff00;
}
.text-red {
    color: #ff4040 !important;
}
.text-gray {
    color: #b0b0b0;
}
/* 沒有結果 */
.no-results {
    text-align: center;
    color: white;
    font-size: 20px;
    margin-top: 50px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
/* 分頁 */
.pagination {
    margin-top: 30px;
    padding: 20px;
    background: rgba(30, 30, 40, 0.95);
    border: 2px solid #4a4a6a;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}
.pagination-info {
    color: #d0d0d0;
    font-size: 14px;
}
.pagination-info strong {
    color: #ffd700;
}
.pagination-controls {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.page-btn {
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.2);
    color: #d0d0d0;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #4a4a6a;
    transition: all 0.3s;
    font-weight: 500;
}
.page-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #764ba2;
    transform: translateY(-2px);
}
.page-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 30, 0.8);
    color: #d0d0d0;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #4a4a6a;
    transition: all 0.3s;
    font-weight: 500;
}
.page-num:hover {
    background: rgba(102, 126, 234, 0.3);
    color: #ffd700;
    border-color: #ffd700;
}
.page-num.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #764ba2;
    font-weight: bold;
}
.page-dots {
    color: #6a6a8a;
    padding: 0 5px;
}
.pagination-jump {
    margin-top: 10px;
}
.page-btn-small {
    padding: 5px 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: 2px solid #764ba2;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}
.page-btn-small:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-1px);
}
/* 錯誤訊息 */
.error {
    background: rgba(139, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #8b0000;
}
/* 頁尾 */
.site-footer {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 2px solid #4a4a6a;
    background: rgba(20, 20, 30, 0.5);
    border-radius: 15px;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffd700;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
}
.footer-icon {
    font-size: 1.3em;
}
.footer-text {
    text-align: center;
    color: #d0d0d0;
    line-height: 1.8;
}
.footer-text p {
    margin: 5px 0;
}
.footer-since {
    color: #ffd700;
    font-weight: bold;
    font-size: 0.9em;
}
.footer-links {
    display: flex;
    gap: 15px;
    align-items: center;
}
.footer-link {
    color: #9090ff;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95em;
}
.footer-link:hover {
    color: #ffd700;
    text-decoration: underline;
}
.footer-separator {
    color: #4a4a6a;
}
/* 寶石插槽圖示 */
.socket-icon {
    display: inline-block;
    transform: scale(2.0);  /* 放大 2 倍，不影響行距 */
    transform-origin: center;
    line-height: 1;
    position: relative;
    top: -4px;
}
/* 插槽加成說明 */
.socket-bonus {
    color: #888888;
    font-size: 12px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}
/* 編輯插槽加成按鈕 */
.edit-socketbonus-btn {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s;
    color: #ffd700;
    line-height: 1;
}
.edit-socketbonus-btn:hover {
    background: #ffd700;
    color: #1a1a2e;
    transform: scale(1.15);
}
/* 主要屬性（白色文字） */
.primary-stat {
    color: #ffffff;
}
/* 次要屬性數值（綠色，提高優先級覆蓋 .item-details strong） */
.item-details .secondary-stat-value {
    color: #1eff00 !important;
}
/* 其他物品資訊 */
.item-info-extra {
    font-size: 12px;
}
/* 法術次要資訊（使用次數、冷卻時間） */
.spell-meta-info {
    font-size: 12px;
    margin-left: 10px;
}
/* 物品標記容器 */
.item-flags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}
/* 專業技能需求（紅色） */
.skill-requirement {
    color: #ff4040 !important;
    font-weight: bold;
}
/* 響應式設計 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .top-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        padding: 0 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-separator {
        display: none;
    }
    
    .pagination {
        padding: 15px;
    }
    
    .pagination-controls {
        gap: 3px;
    }
    
    .page-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .page-num {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .copy-notification {
        top: 60px;
        right: 10px;
        left: 10px;
        text-align: center;
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .copy-gm-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}