/* 基础样式 */
* {
    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%;
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu ul {
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.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;
}

/* 导航右侧按钮样式 */
.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;
}

/* 主容器样式 */
.container {
    flex: 1;
    max-width: 1800px;
    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;
}

/* 工具容器样式 */
.tool-container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    padding: 3rem 4rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* 编辑器部分样式 */
.editor-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.editor-container {
    background: #f8f9fa;
    padding: 2.5rem 3rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

textarea {
    width: 100%;
    min-height: 400px;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.8;
    resize: vertical;
    transition: all 0.3s;
    background: white;
}

textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
}

.editor-actions .secondary-btn {
    min-width: 110px;
}

/* 按钮样式 */
.secondary-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

.secondary-btn:nth-child(1) {
    background: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.secondary-btn:nth-child(1):hover {
    background: #fff7f6;
    color: #ff7875;
    border-color: #ff7875;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.2);
}

.secondary-btn:nth-child(2) {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.secondary-btn:nth-child(2):hover {
    background: #f0faff;
    color: #40a9ff;
    border-color: #40a9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
}

.secondary-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* 统计结果样式 */
.stats-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 2.5rem 3rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.stats-group {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
}

.stat-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: bold;
}

/* 使用说明样式 */
.tips-section {
    background: #f8f9fa;
    padding: 3rem;
    border-radius: 12px;
}

.tips-section h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.tips-content {
    color: #666;
}

.tips-content p {
    margin-bottom: 1rem;
}

.tips-note {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.tips-note ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.tips-note li {
    margin-bottom: 0.5rem;
}

/* 广告位样式 */
.ad-section {
    margin-top: 2rem;
    padding-top: 2rem;
    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-placeholder {
    color: #adb5bd;
    font-size: 16px;
}

/* 底部版权样式 */
.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 pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 移动端导航样式 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #333;
    z-index: 999;
}

/* 响应式设计 */
@media screen and (max-width: 1800px) {
    .container {
        max-width: 1600px;
    }
    
    .tool-container {
        max-width: 1400px;
    }
}

@media screen and (max-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .tool-container {
        max-width: 1200px;
    }

    .stats-group {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 1200px) {
    .container {
        max-width: 1100px;
    }
    
    .tool-container {
        padding: 2rem;
    }

    .editor-container,
    .stats-container {
        padding: 2rem;
    }
}

@media screen and (max-width: 768px) {
    .nav-content {
        padding: 0 15px;
        position: relative;
        justify-content: space-between;
    }

    .nav-logo {
        flex: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 998;
        overflow-y: auto;
    }

    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
        padding: 15px 0;
        margin: 0;
        height: auto;
    }

    .nav-menu ul li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-menu ul li a {
        padding: 15px 20px;
        display: block;
        text-align: left;
    }

    .stats-group {
        grid-template-columns: repeat(2, 1fr);
    }

    .editor-actions {
        flex-wrap: wrap;
    }

    .secondary-btn {
        flex: 1;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .tool-container {
        padding: 1.5rem;
    }

    .editor-container {
        padding: 1rem;
    }

    .stats-group {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }
}

/* 新增按钮样式 */
.format-btn {
    background: #f0f7ff;
    color: #2f54eb;
    border: 1px solid #adc6ff;
}

.format-btn:hover {
    background: #f7f9ff;
    color: #597ef7;
    border-color: #597ef7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 84, 235, 0.2);
}

.clear-format-btn {
    background: #f9f0ff;
    color: #722ed1;
    border: 1px solid #d3adf7;
}

.clear-format-btn:hover {
    background: #fcf7ff;
    color: #9254de;
    border-color: #9254de;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(114, 46, 209, 0.2);
}

.clear-empty-btn {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.clear-empty-btn:hover {
    background: #fff9f0;
    color: #ffa940;
    border-color: #ffa940;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(250, 140, 22, 0.2);
} 