/* 基础样式 */
* {
    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;
}

/* 转换器部分样式 */
.converter-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.input-section {
    background: #f8f9fa;
    padding: 2.5rem 3rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group label {
    color: #2c3e50;
    font-weight: 500;
    font-size: 1.1rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 1rem;
    color: #666;
    font-size: 1.2rem;
}

input[type="text"] {
    width: 100%;
    padding: 1rem 1rem 1rem 2.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.2rem;
    transition: all 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

/* 结果区域样式 */
.result-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-group label {
    color: #2c3e50;
    font-weight: 500;
    font-size: 1.1rem;
}

.result-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    min-height: 60px;
    border: 1px solid #e8e8e8;
    font-size: 1.2rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.result-box .placeholder {
    color: #adb5bd;
    font-size: 1rem;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.primary-btn,
.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;
    flex: 1;
}

.primary-btn {
    background: linear-gradient(45deg, #1890ff, #40a9ff);
    color: white;
}

.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;
}

.secondary-btn:hover {
    background: #fafafa;
    color: #1890ff;
    border-color: #1890ff;
    transform: translateY(-1px);
}

/* 历史记录样式 */
.history-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 2rem;
}

.history-section h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #f0f0f0;
}

.history-amount {
    color: #666;
}

.history-text {
    color: #2c3e50;
    font-weight: 500;
}

.empty-history {
    color: #adb5bd;
    text-align: center;
    padding: 2rem;
}

/* 使用说明样式 */
.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;
    }
}

@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;
    }

    .converter-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .input-section,
    .history-section {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .tool-container {
        padding: 1.5rem;
    }

    input[type="text"] {
        font-size: 1rem;
        padding: 0.8rem 0.8rem 0.8rem 2rem;
    }

    .currency-symbol {
        font-size: 1rem;
    }

    .result-box {
        font-size: 1rem;
        padding: 1rem;
    }
}

/* 数字对照表样式 */
.number-table {
    background: #f8f9fa;
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.number-table h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.table-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.number-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.number-item:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.digit {
    font-size: 1.1rem;
    color: #666;
    min-width: 60px;
}

.chinese {
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 500;
}

.copy-btn {
    margin-left: auto;
    padding: 4px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    background: white;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .number-table {
        padding: 1.5rem;
    }

    .table-container {
        padding: 1rem;
    }

    .number-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .number-item {
        padding: 0.8rem;
    }

    .digit {
        font-size: 1rem;
        min-width: 50px;
    }

    .chinese {
        font-size: 1.1rem;
    }

    .copy-btn {
        padding: 3px 8px;
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 480px) {
    .number-grid {
        grid-template-columns: 1fr;
    }
} 