/* 基础样式 */
* {
    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: 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;
}

/* 工具容器样式 */
.tool-container {
    background: white;
    padding: 4rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* 计算器部分样式 */
.calculator-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.input-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-group,
.precision-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label,
.precision-group label {
    color: #2c3e50;
    font-weight: 500;
}

input[type="number"],
select {
    padding: 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.primary-btn,
.secondary-btn {
    padding: 0.8rem 1.2rem;
    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;
}

.primary-btn {
    background: linear-gradient(45deg, #1890ff, #40a9ff);
    color: white;
    flex: 2;
}

.primary-btn:hover {
    background: linear-gradient(45deg, #40a9ff, #69c0ff);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.secondary-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e8e8e8;
    flex: 1;
}

.secondary-btn:hover {
    background: #fafafa;
    color: #1890ff;
    border-color: #1890ff;
    transform: translateY(-1px);
}

/* 结果区域样式 */
.result-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.result-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-group h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.result-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    font-size: 1.2rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-box .placeholder {
    color: #adb5bd;
    font-size: 1rem;
}

.result-details {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.detail-label {
    color: #6c757d;
}

.detail-value {
    font-weight: 500;
}

/* 使用说明样式 */
.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: 1400px) {
    .container {
        max-width: 1200px;
    }
}

@media screen and (max-width: 1200px) {
    .nav-content {
        width: 100%;
        padding: 0 2rem;
    }

    .tool-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;
    }

    .calculator-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .button-group {
        flex-wrap: wrap;
    }

    .primary-btn,
    .secondary-btn {
        flex: 1 1 calc(50% - 0.5rem);
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .tool-container {
        padding: 1.5rem;
    }

    .input-section,
    .result-section {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }

    .result-box {
        font-size: 1rem;
        padding: 1rem;
    }
} 