/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff4655;
    --secondary-color: #1a1a2e;
    --background: #0f0f1e;
    --surface: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --border: #2a2a3e;
    --success: #4caf50;
    --warning: #ff9800;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* ==================== 头部 ==================== */
.header {
    background: var(--surface);
    padding: 2rem 0;
    border-bottom: 2px solid var(--primary-color);
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ==================== 加载状态 ==================== */
.loading {
    text-align: center;
    padding: 4rem 0;
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* ==================== 筛选器 ==================== */
.filters {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.stats {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
    color: var(--text-secondary);
    text-align: center;
}

/* ==================== 道具网格 ==================== */
.utilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.utility-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 2px solid var(--border);
}

.utility-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 70, 85, 0.3);
    border-color: var(--primary-color);
}

.utility-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--background);
}

.utility-info {
    padding: 1rem;
}

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

.utility-type {
    font-size: 1.5rem;
}

.utility-team {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.team-t {
    background: #ffa500;
    color: #000;
}

.team-ct {
    background: #1e90ff;
    color: #fff;
}

.utility-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.utility-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.utility-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.2rem 0.5rem;
    background: var(--background);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* ==================== 模态框 ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    background-color: var(--surface);
    margin: 2% auto;
    padding: 2rem;
    border-radius: 12px;
    max-width: 900px;
    position: relative;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--primary-color);
}

.detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-image {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.detail-image:hover {
    transform: scale(1.05);
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.command-box {
    background: var(--background);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    position: relative;
    margin-bottom: 1rem;
}

.copy-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #ff6675;
}

.copy-btn.copied {
    background: var(--success);
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--surface);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 4rem;
    border-top: 2px solid var(--border);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: #ff6675;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .logo {
        font-size: 1.8rem;
    }

    .utilities-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .modal-content {
        margin: 5% 10px;
        padding: 1.5rem;
    }

    .detail-images {
        grid-template-columns: 1fr;
    }
}


/* ==================== 详情页面样式 ==================== */
body.detail-page {
    background: var(--background);
}

#detail-view {
    min-height: 100vh;
    padding: 20px 0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    margin-bottom: 20px;
}

.btn-back:hover {
    border-color: var(--primary-color);
    transform: translateX(-5px);
}

.detail-header {
    margin-bottom: 30px;
}

.detail-title {
    font-size: 2.5rem;
    margin: 20px 0;
    color: var(--text-primary);
}

.detail-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.badge-type {
    background: var(--primary-color);
    color: white;
}

.badge-team {
    color: white;
}

.badge-throw {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.detail-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.detail-images-section h3,
.detail-info-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.detail-image-item h4 {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.detail-image {
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s;
    border: 2px solid var(--border);
}

.detail-image:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.detail-section {
    background: var(--surface);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.detail-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

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

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.command-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 15px;
}

.command-hint kbd {
    background: var(--background);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    font-family: monospace;
}

.coordinates {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coord-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.coord-item strong {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.coord-item span {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
}

/* 响应式设计 */
@media (min-width: 1024px) {
    .detail-body {
        grid-template-columns: 2fr 1fr;
    }
    
    .detail-images-section {
        grid-column: 1;
    }
    
    .detail-info-section {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 768px) {
    .detail-title {
        font-size: 1.8rem;
    }
    
    .detail-images {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}


/* ==================== 导航栏 ==================== */
.navbar {
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-logo:hover {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* ==================== 首页 ==================== */
.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: 40px 20px;
}

.home-title {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

.home-search-box {
    display: flex;
    gap: 10px;
    max-width: 600px;
    width: 100%;
    margin-bottom: 40px;
}

.home-search-input {
    flex: 1;
    padding: 18px 24px;
    font-size: 1.1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.home-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.home-search-btn {
    padding: 18px 36px;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.home-search-btn:hover {
    background: #ff6675;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 70, 85, 0.4);
}

.home-quick-links {
    display: flex;
    gap: 20px;
}

.quick-link-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 50px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.quick-link-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.quick-link-icon {
    font-size: 3rem;
}

.quick-link-text {
    font-size: 1.2rem;
    font-weight: 600;
}

/* ==================== 地图选择页 ==================== */
.page-header {
    text-align: center;
    margin: 40px 0;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.map-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.map-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.map-name {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.map-count {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ==================== 道具列表页 ==================== */
.utilities-filters {
    background: var(--surface);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

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

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-secondary);
}

.utilities-search-input {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.utilities-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.utilities-stats {
    text-align: center;
    padding: 15px;
    background: var(--background);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ==================== 图片查看器 ==================== */
.image-viewer-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.image-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--surface);
    border-bottom: 2px solid var(--border);
}

.image-viewer-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.image-viewer-close {
    font-size: 2.5rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
}

.image-viewer-close:hover {
    color: var(--primary-color);
}

.image-viewer-body {
    display: flex;
    height: calc(100% - 80px);
}

.image-viewer-canvas {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.image-container {
    position: relative;
    max-width: 100%;
    max-height: calc(100% - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#viewer-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
    transition: transform 0.3s;
    cursor: default;
    user-select: none;
}

.crosshair-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: none;
}

.crosshair-overlay.active {
    display: block;
}

.crosshair-overlay.fullscreen {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
}

.crosshair-overlay svg {
    display: block;
}

.zoom-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    background: var(--surface);
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.zoom-btn {
    padding: 8px 16px;
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 40px;
}

.zoom-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.zoom-level {
    min-width: 60px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

.crosshair-settings {
    width: 300px;
    background: var(--surface);
    border-left: 2px solid var(--border);
    padding: 30px;
    overflow-y: auto;
    display: none;
}

.crosshair-settings.active {
    display: block;
}

.crosshair-settings h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.setting-group select {
    width: 100%;
    padding: 10px;
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.setting-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.setting-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--background);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
}

.setting-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.setting-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 70, 85, 0.5);
}

.crosshair-style-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.style-btn {
    width: 60px;
    height: 60px;
    background: var(--background);
    border: 3px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.style-btn:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.style-btn.active {
    border-color: var(--primary-color);
    background: rgba(255, 70, 85, 0.1);
    box-shadow: 0 0 10px rgba(255, 70, 85, 0.5);
}

.style-icon {
    font-size: 2rem;
    color: var(--text-primary);
    line-height: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .home-title {
        font-size: 2.5rem;
    }
    
    .home-subtitle {
        font-size: 1.2rem;
    }
    
    .home-quick-links {
        flex-direction: column;
    }
    
    .quick-link-btn {
        width: 100%;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-link {
        font-size: 1rem;
    }
    
    .image-viewer-body {
        flex-direction: column;
    }
    
    .crosshair-settings {
        width: 100%;
        border-left: none;
        border-top: 2px solid var(--border);
        max-height: 40%;
    }
}
