/* 基础样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a6bff;
    --secondary-color: #45caff;
    --dark-color: #333;
    --light-color: #f4f6f9;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --background-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* 头部导航样式 */
header {
    background: var(--background-gradient);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    opacity: 0.85;
    padding: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav ul li a:hover, 
nav ul li a.active {
    opacity: 1;
    border-bottom: 2px solid white;
}

/* 首页英雄区域 */
.hero {
    background: var(--background-gradient);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* 工具卡片区域 */
.tools {
    padding: 4rem 0;
}

.tools h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    position: relative;
}

.tools h2:after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    margin: 0.5rem auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.tool-card p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.btn {
    display: inline-block;
    background: var(--background-gradient);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 107, 255, 0.3);
}

/* 页脚样式 */
footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav {
        margin-top: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0.5rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* 工具页面通用样式 */
.tool-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 800px;
}

.tool-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 107, 255, 0.2);
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.result-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* 特定工具样式 */
/* 进制转换工具 */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.result-item {
    background-color: var(--light-color);
    padding: 0.8rem;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

.result-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #666;
}

.result-value {
    font-size: 1.1rem;
    font-family: monospace;
    color: var(--primary-color);
    word-break: break-all;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.result-value:hover {
    background-color: rgba(74, 107, 255, 0.1);
}

.error {
    border-color: var(--danger-color) !important;
}

/* 时间戳转换工具 */
.converter-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group-text {
    background-color: #f0f0f0;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 5px 5px 0;
}

small {
    display: block;
    color: #666;
    margin-top: 0.3rem;
    font-size: 0.8rem;
}

/* 角度弧度转换工具 */
.common-angles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.common-angles button {
    background: var(--light-color);
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.common-angles button:hover {
    background: #e0e0e0;
}

.info-box {
    background-color: #f0f7ff;
    border: 1px solid #d0e3ff;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 2rem;
}

.info-box h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.tool-description {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* JSON检查工具样式 */
textarea.form-control {
    font-family: monospace;
    min-height: 200px;
    resize: vertical;
}

textarea.form-control.dragover {
    border: 2px dashed var(--primary-color);
    background-color: rgba(74, 107, 255, 0.05);
}

.json-output {
    background-color: var(--light-color);
    border-radius: 5px;
    padding: 1rem;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
}

.status-message {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.status-message.success {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: var(--success-color);
}

.status-message.error {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: var(--danger-color);
}

.error-line {
    background-color: rgba(220, 53, 69, 0.2);
    position: relative;
}

.error-highlight {
    color: var(--danger-color);
    font-weight: bold;
}

.line-numbers {
    color: #999;
    text-align: right;
    padding-right: 0.5rem;
    margin-right: 0.5rem;
    border-right: 1px solid #ddd;
    user-select: none;
} 