/* assets/css/main.css */
/* 主样式文件 */

/* 全局变量 */
:root {
    --primary-color: #4361ee;
    --secondary-color: #6c757d;
    --success-color: #06d6a0;
    --info-color: #118ab2;
    --warning-color: #ffd166;
    --danger-color: #ef476f;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    padding-bottom: 70px; /* 底部导航栏高度 */
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #3a0ca3);
    color: white;
    padding: 2rem 1rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.hero-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-badges .badge {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.25rem 0.75rem;
}

.hero-icon {
    font-size: 3rem;
    opacity: 0.7;
}

/* 区块样式 */
.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 工具网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .tools-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.tool-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.tool-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.25rem;
}

.tool-card.tool-beian .tool-icon {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.tool-card.tool-ping .tool-icon {
    background: rgba(6, 214, 160, 0.1);
    color: var(--success-color);
}

.tool-card.more-tools .tool-icon {
    background: rgba(108, 117, 125, 0.1);
    color: var(--secondary-color);
}

.tool-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tool-desc {
    font-size: 0.75rem;
    color: var(--secondary-color);
    line-height: 1.3;
}

/* 快速工具区域 */
.quick-tool-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 热门标签 */
.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 20px;
    text-decoration: none;
    color: var(--primary-color);
    border: 1px solid #e9ecef;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 使用指南 */
.tutorial-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .tutorial-steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: 700;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-desc {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0 1rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.75rem;
}

/* 工具页面样式 */
.tool-page-container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-header {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tool-icon-wrapper {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 侧边栏工具列表 */
.tools-list-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    border-radius: var(--border-radius);
    transition: var(--transition);
    margin-bottom: 0.5rem;
}

.tools-list-item:hover {
    background: #f8f9fa;
}

.tool-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
}

.tool-info {
    flex: 1;
}

/* 相关工具 */
.related-tool-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
    transition: var(--transition);
    text-align: center;
}

.related-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.related-tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

/* 颜色类 */
.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }

.bg-warning { background-color: var(--warning-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-purple { background-color: #7b2cbf !important; }
.bg-teal { background-color: #20c997 !important; }
.bg-orange { background-color: #fb8500 !important; }
.bg-indigo { background-color: #3a0ca3 !important; }

.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }

.bg-opacity-10 { opacity: 0.8; }
/* 添加到 assets/css/main.css 的末尾 */

/* 工具列表页面样式 */
.tools-page .main-container {
    padding-top: 0;
}

.tools-page-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 分页样式 */
.pagination-container {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.pagination {
    justify-content: center;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: white;
}

/* 搜索框样式 */
.tools-search-box {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.tools-search-box .input-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.tools-search-box .form-control {
    border: none;
    padding: 0.75rem 1rem;
}

.tools-search-box .btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
}

/* 工具详情卡片样式 */
.tool-detail-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.tool-detail-header {
    padding: 2rem;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.tool-detail-body {
    padding: 2rem;
}

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

.stat-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .tool-card-horizontal .card-body {
        padding: 1rem;
    }
    
    .tool-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .tool-action {
        width: 100%;
    }
    
    .tool-action .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-stats .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .tools-info-section .row {
        flex-direction: column;
        gap: 1rem;
    }
}
/* 添加到 assets/css/main.css */

/* WHOIS工具特定样式 */
.summary-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.summary-card {
    min-width: 120px;
    text-align: center;
    transition: var(--transition);
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.summary-label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1rem;
}

.status-indicator {
    transition: var(--transition);
}

.status-indicator:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.status-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* 域名过期提醒 */
.alert-expiring {
    border-left: 4px solid var(--warning-color);
}

.alert-expired {
    border-left: 4px solid var(--danger-color);
}

/* 相关工具按钮组 */
.related-tools .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .summary-cards {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .summary-card {
        min-width: 100%;
    }
    
    .related-tools .row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .related-tools .col-sm-6,
    .related-tools .col-md-3 {
        width: 100%;
    }
}
/* 添加到 assets/css/main.css */

/* IP查询工具特定样式 */
.status-card {
    transition: var(--transition);
    height: 100%;
}

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

.status-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-card {
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.location-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.location-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-item {
    padding: 0.5rem;
    border-radius: 8px;
    background: white;
    border: 1px solid #e9ecef;
}

.quick-ips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-ips .btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
}

/* 原始数据样式 */
.raw-data-section pre {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 4px;
    padding: 1rem;
}

.raw-data-section .token.property {
    color: #9cdcfe;
}

.raw-data-section .token.string {
    color: #ce9178;
}

.raw-data-section .token.number {
    color: #b5cea8;
}

.raw-data-section .token.keyword {
    color: #569cd6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .quick-ips {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .quick-ips .btn {
        width: 100%;
        justify-content: center;
    }
    
    .status-card, .location-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .location-details .row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .location-details .col-md-3,
    .location-details .col-6 {
        width: 100%;
    }
}