/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 主要内容 */
.main {
    min-height: calc(100vh - 140px);
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 工具区域 */
.tools-section {
    padding: 4rem 0;
}

.external-tools-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card.external {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    position: relative;
}

.tool-card.external::before {
    content: "外部";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.tool-card.external:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.tool-desc {
    color: #666;
    margin-bottom: 1.5rem;
}

.tool-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 25px;
    transition: transform 0.3s;
}

.tool-link:hover {
    transform: scale(1.05);
}

/* 关于区域 */
.about-section {
    background: white;
    padding: 4rem 0;
}

.about-text {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 页脚 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* 工具页面样式 */
.tool-page {
    padding: 2rem 0;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.tool-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s;
}

.btn:hover {
    transform: scale(1.05);
}

.btn-secondary {
    background: #6c757d;
}

.result-area {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    border: 2px solid #ddd;
    margin-top: 1rem;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 2rem;
}

.tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: color 0.3s, border-bottom 0.3s;
}

.tab.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        gap: 1rem;
    }
}

/* 颜色选择器样式 */
.color-picker-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.color-input {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.color-preview {
    width: 100px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 5px;
}

/* QR码样式 */
.qr-result {
    text-align: center;
    padding: 2rem;
}

.qr-code {
    margin: 1rem auto;
    max-width: 300px;
}

/* JSON编辑器样式 */
.json-editor {
    font-family: 'Courier New', monospace;
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 5px;
    min-height: 200px;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 5px;
    border-radius: 3px;
    transition: all 0.3s;
}

.strength-weak {
    background: #e53e3e;
}

.strength-medium {
    background: #dd6b20;
}

.strength-strong {
    background: #38a169;
}

/* 工具导航 */
.tool-nav {
    background: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tool-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 其他工具导航样式 */
.other-tools-section {
    background: #f8f9fa;
    padding: 3rem 0;
    border-top: 1px solid #dee2e6;
}

.other-tool-link {
    display: block;
    background: white;
    color: #333;
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
    font-weight: 500;
}

.other-tool-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}