/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 2rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(45deg, #2980b9, #3498db, #2980b9);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 3s ease infinite;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    color: #34495e;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 主容器样式 */
.container {
    flex: 1;
    margin: 2rem auto;
    padding: 0 2rem;
    max-width: 1200px;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.usage-count {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* 工具容器样式 */
.tool-container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.editor-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 数据编辑区样式 */
.input-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
}

/* 数据输入区域样式 */
.data-input {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.input-header h3 {
    font-size: 1.4rem;
    color: #2c3e50;
}

.toolbar {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.tool-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #2c3e50;
}

.tool-btn svg {
    width: 16px;
    height: 16px;
}

.tool-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.tool-btn.primary {
    background: #3498db;
    color: white;
}

.tool-btn.primary:hover {
    background: #2980b9;
}

/* 数据表格样式 */
.data-table {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.data-table::-webkit-scrollbar {
    width: 6px;
}

.data-table::-webkit-scrollbar-track {
    background: transparent;
}

.data-table::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

/* 表格样式优化 */
.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    z-index: 1;
}

/* 输入框样式优化 */
.category-input, 
.value-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.category-input:focus,
.value-input:focus {
    border-color: #3498db;
    outline: none;
}

/* 复选框组样式 */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.checkbox-group span {
    font-size: 0.9rem;
    color: #34495e;
}

/* 删除按钮样式优化 */
.delete-btn {
    padding: 0.4rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #e74c3c;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    opacity: 1;
    background: #fee5e3;
    border-radius: 4px;
}

/* 图表设置样式 */
.chart-settings {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-settings h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.settings-group {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
}

.settings-group label {
    min-width: 80px;
    color: #34495e;
    font-weight: 500;
}

.settings-group input[type="text"],
.settings-group input[type="number"],
.settings-group select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* 颜色选择器样式 */
.color-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 范围滑块样式 */
input[type="range"] {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    outline: none;
}

#barWidthValue {
    min-width: 3rem;
    text-align: right;
    color: #666;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3498db;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 预览区样式 */
.preview-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
}

.preview-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.chart-container {
    background: white;
    border-radius: 8px;
    height: 500px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .input-section {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
} 

/* 底部版权样式 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #2980b9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer {
        padding: 1rem 0;
        margin-top: 2rem;
    }

    .footer-content {
        padding: 0 1rem;
    }
} 