/* 基础样式 */
* {
    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 {
    width: 100%;
    height: 60px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}

.nav {
    width: 100%;
    height: 100%;
}

.nav-content {
    width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-logo a {
    color: #333;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

.nav-menu {
    height: 100%;
}

.nav-menu ul {
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu ul li {
    list-style: none;
    margin: 0 15px;
}

.nav-menu ul li a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-menu ul li a:hover {
    color: #1890ff;
}

/* 主容器样式 */
.container {
    flex: 1;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    margin-top: 80px;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.usage-count {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.usage-label {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.usage-number {
    background: linear-gradient(45deg, #1890ff, #40a9ff);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
    animation: pulse 2s infinite;
}

/* 添加脉冲动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .usage-number {
        font-size: 1.1rem;
        padding: 3px 10px;
    }
    
    .usage-label {
        font-size: 1rem;
    }
}

/* 工具容器样式 */
.tool-container {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* 修改编辑器布局 */
.editor-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 设置行样式 */
.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* 数据输入区样式 */
.data-input {
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 12px;
    height: 100%;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.input-header h3 {
    font-size: 1.4rem;
    color: #2c3e50;
}

/* 工具栏样式 */
.toolbar {
    display: flex;
    gap: 0.8rem;
}

.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:hover {
    background: #e9ecef;
}

.tool-btn svg {
    width: 16px;
    height: 16px;
}

/* 表格样式 */
.data-table {
    max-height: 400px;  /* 限制表格高度 */
    overflow-y: auto;   /* 添加垂直滚动 */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    font-weight: 600;
    color: #2c3e50;
}

td input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 图表设置样式 */
.chart-settings {
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 12px;
    height: 100%;
}

.chart-settings h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.settings-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.settings-group label {
    min-width: 100px;
    color: #2c3e50;
}

.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.9rem;
}

/* 开关样式 */
.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: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 3rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.preview-header h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    font-weight: 600;
}

.chart-container {
    height: 700px !important;
    min-height: 700px;
    padding: 3rem 2rem;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 底部版权样式 */
.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;
}

/* 动画效果 */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .settings-row {
        grid-template-columns: 1fr;  /* 小屏幕时改为单列 */
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .editor-wrapper {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-menu ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu ul li {
        margin: 5px 10px;
    }
    
    .header {
        height: auto;
    }
    
    .container {
        margin-top: 120px;
    }
}

/* 修改删除按钮样式 */
.delete-btn {
    padding: 0.3rem 0.6rem !important;  /* 使用!important覆盖原有样式 */
    font-size: 0.8rem !important;
    white-space: nowrap;
}

.delete-btn svg {
    width: 12px !important;
    height: 12px !important;
}

/* 美化滚动条 */
.data-table::-webkit-scrollbar {
    width: 8px;
}

.data-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.data-table::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.data-table::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 添加右侧登录注册按钮样式 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-btn, .register-btn {
    text-decoration: none;
    font-size: 14px;
    padding: 6px 20px;
    border-radius: 4px;
    transition: all 0.3s;
}

.login-btn {
    color: #333;
}

.login-btn:hover {
    color: #1890ff;
}

.register-btn {
    color: #fff;
    background-color: #1890ff;
}

.register-btn:hover {
    background-color: #40a9ff;
}

/* 修改响应样式 */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-right {
        margin-top: 10px;
        margin-bottom: 5px;
    }
}

/* 广告位样式 */
.ad-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #eee;
}

.ad-wrapper {
    width: 100%;
    height: 120px;
    background: #f8f9fa;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ad-wrapper:hover {
    background: #f1f3f5;
    border-color: #dee2e6;
}

.ad-placeholder {
    color: #adb5bd;
    font-size: 16px;
    text-align: center;
}

/* 移除之前的图片相关样式 */
.ad-img, .ad-text {
    display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ad-wrapper {
        height: 100px;
        padding: 1rem;
    }
} 