/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量定义 - 优化版 */
:root {
    /* 主色调 - 现代蓝紫渐变 */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --info-color: #3b82f6;
    
    /* 背景色系 - 深色主题优化 */
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #2d3748;
    --bg-glass: rgba(255, 255, 255, 0.08);
    --bg-glass-hover: rgba(255, 255, 255, 0.12);
    --bg-glass-active: rgba(255, 255, 255, 0.16);
    
    /* 文字颜色 */
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    --text-accent: #ffd700;
    
    /* 边框和阴影 */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --border-active: rgba(255, 255, 255, 0.25);
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    
    /* 现代渐变 */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-danger: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* 动画 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 基础布局 */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* 背景粒子效果 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* 主容器 */
.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 4rem;
    animation: slideInDown 0.8s ease-out;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    opacity: 0.6;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.logo i {
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    position: relative;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.logo h1::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: white;
    border-radius: 2px;
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.02em;
    opacity: 0.9;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 40px rgba(99, 102, 241, 0.8);
    }
}

/* 玻璃拟态卡片 */
.glass-card {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-2xl);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.glass-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* 主要内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 搜索区域 */
.search-section {
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.search-card {
    position: relative;
    overflow: hidden;
}

.search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.search-card:hover::before {
    left: 100%;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.search-header i {
    color: var(--primary-color);
}

/* 搜索标签页 */
.search-tabs {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    border: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.875rem 2rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition);
    z-index: -1;
}

.tab-btn.active {
    color: #1a1a1a;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.tab-btn.active::before {
    left: 0;
    background: rgba(0, 0, 0, 0.05);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-glass);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.tab-btn:active {
    transform: translateY(0);
}

/* 搜索表单 */
.search-form {
    transition: var(--transition);
}

.search-form.hidden {
    display: none;
}

.batch-result.hidden {
    display: none;
}

.single-result.hidden {
    display: none;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.input-wrapper {
    flex: 1;
    position: relative;
    min-width: 300px;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition);
    outline: none;
    backdrop-filter: blur(10px);
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: var(--bg-glass-hover);
    transform: translateY(-1px);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    opacity: 0;
}

.input-wrapper:hover .clear-btn {
    opacity: 1;
}

.clear-btn:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

/* 搜索按钮 */
.search-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    background: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
    transition: var(--transition-slow);
}

.search-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    background: #f8f9fa;
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:active {
    transform: translateY(-1px) scale(0.98);
    background: #e9ecef;
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 26, 26, 0.3);
    border-top: 2px solid #1a1a1a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: var(--transition);
}

.search-btn.loading .loading-spinner {
    opacity: 1;
}

.search-btn.loading span {
    opacity: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 快捷IP按钮 */
.quick-ips {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quick-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.quick-ip-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.quick-ip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: var(--transition);
    z-index: -1;
}

.quick-ip-btn:hover {
    color: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.quick-ip-btn:hover::before {
    left: 0;
}

.quick-ip-btn.primary {
    background: white;
    color: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.quick-ip-btn.primary::before {
    background: rgba(0, 0, 0, 0.05);
}

.quick-ip-btn.primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    background: #f8f9fa;
}

/* 批量查询 */
.textarea-wrapper {
    position: relative;
}

.textarea-wrapper textarea {
    width: 100%;
    min-height: 180px;
    padding: 1.25rem;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    resize: vertical;
    outline: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.textarea-wrapper textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: var(--bg-glass-hover);
    transform: translateY(-1px);
}

.textarea-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.ip-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.batch-search-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.batch-search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
    transition: var(--transition-slow);
}

.batch-search-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    background: #f8f9fa;
}

.batch-search-btn:hover::before {
    left: 100%;
}

.batch-search-btn:active {
    transform: translateY(-1px) scale(0.98);
    background: #e9ecef;
}

.batch-search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
}

/* 结果显示区域 */
.results-section {
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.results-card {
    position: relative;
    min-height: 400px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: var(--transition);
    z-index: -1;
}

.action-btn:hover {
    color: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.action-btn:hover::before {
    left: 0;
}

.action-btn:active {
    transform: translateY(-1px) scale(1.05);
}

/* 单个结果显示 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.result-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.result-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.result-content h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.result-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* 地图容器 */
.map-container {
    position: relative;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.map {
    width: 100%;
    height: 100%;
}

.map-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
}

.map-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 批量结果显示 */
.batch-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.batch-summary h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    text-align: center;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.batch-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.batch-result-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: var(--transition);
}

.batch-result-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.batch-result-item.success {
    border-left: 4px solid var(--success-color);
}

.batch-result-item.error {
    border-left: 4px solid var(--danger-color);
}

.batch-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.batch-result-ip {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.batch-result-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.batch-result-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.batch-result-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.batch-result-details {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
}

.batch-info {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.batch-info h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.batch-info p {
    line-height: 1.6;
    font-size: 1rem;
}

/* 统计信息 */
.stats-section {
    animation: slideInUp 0.8s ease-out 0.6s both;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    text-align: left;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content h4 {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--success-color);
}

/* 历史记录侧边栏 */
.history-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.history-sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-sidebar {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-sidebar:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.history-list {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.empty-history {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-history i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.history-item {
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    background: var(--bg-glass);
    border-color: var(--border-hover);
}

.history-ip {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.history-location {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.history-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.clear-history-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--danger-color);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.clear-history-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 提示消息 */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    transform: translateX(400px);
    transition: var(--transition);
    animation: slideInRight 0.3s ease-out forwards;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--danger-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast.info {
    border-left: 4px solid var(--primary-color);
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast.info .toast-icon {
    color: var(--primary-color);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

/* 动画效果 */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        padding: 1.5rem;
    }
    
    .result-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        margin-bottom: 2rem;
    }
    
    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .search-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-tabs {
        justify-content: center;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-wrapper {
        min-width: auto;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .quick-ips {
        justify-content: center;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .history-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }
    
    .toast {
        min-width: auto;
        transform: translateY(-100px);
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .search-card,
    .results-card,
    .stat-card {
        padding: 1.5rem;
    }
    
    .search-header h2 {
        font-size: 1.25rem;
    }
    
    .results-header h3 {
        font-size: 1.125rem;
    }
    
    .map-container {
        height: 300px;
    }
    
    .batch-summary {
        grid-template-columns: 1fr;
    }
    
    .summary-item {
        padding: 1rem;
    }
    
    .summary-number {
        font-size: 1.5rem;
    }
}

/* 深色模式优化 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-glass: rgba(255, 255, 255, 0.05);
        --bg-glass-hover: rgba(255, 255, 255, 0.1);
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.3);
        --border-hover: rgba(255, 255, 255, 0.5);
        --text-secondary: #e2e8f0;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particles {
        display: none;
    }
}

/* 打印样式 */
@media print {
    .particles,
    .history-sidebar,
    .overlay,
    .toast-container,
    .search-btn,
    .quick-ip-btn,
    .batch-search-btn,
    .clear-history-btn {
        display: none !important;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .glass-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .result-item {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
    }
}

/* 辅助功能 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 焦点样式 */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* 加载状态 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 错误状态 */
.error-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* 成功状态 */
.success-bounce {
    animation: bounce 0.6s ease-in-out;
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    text-align: center;
    border-radius: var(--radius-md);
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 选择文本样式 */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
/* Logo图标样式 */
.logo-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 8px rgba(67, 233, 123, 0.3));
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 12px rgba(67, 233, 123, 0.5));
}

/* 响应式logo调整 */
@media (max-width: 768px) {
    .logo-icon {
        width: 28px;
        height: 28px;
        margin-right: 8px;
    }
}

