/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.logo a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    padding: 8px 0;
    position: relative;
}

.nav-link:hover {
    color: #3498db;
}

.nav-link.active {
    color: #3498db;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3498db;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #2c3e50;
    transition: all 0.3s ease;
}

/* 响应式导航栏 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0;
    }

    .nav-link {
        display: block;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* 转换器盒子样式 */
.converter-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.input-group, .result-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

select, input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

select:focus, input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.result-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.result {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #3498db;
    min-height: 50px;
    word-break: break-all;
    font-size: 18px;
    flex: 1;
}

.copy-button {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-button:hover {
    background-color: #e9ecef;
    border-color: #3498db;
}

.copy-button:active {
    transform: scale(0.95);
}

.copy-button svg {
    fill: #666;
    transition: fill 0.3s ease;
}

.copy-button:hover svg {
    fill: #3498db;
}

.copy-button .tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.copy-button:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.copy-button.success {
    background-color: #d4edda;
    border-color: #28a745;
}

.copy-button.success svg {
    fill: #28a745;
}

.copy-button.success .tooltip {
    background-color: #28a745;
}

/* 提示样式 */
.tips {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tips h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.tips ul {
    padding-left: 20px;
}

.tips li {
    margin-bottom: 5px;
    color: #555;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .converter-box, .tips {
        padding: 15px;
    }
    
    .result {
        font-size: 16px;
    }
}

/* 历史记录样式 */
.history-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.history-header h3 {
    color: #2c3e50;
    margin: 0;
}

.clear-button {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.clear-button:hover {
    background-color: #e9ecef;
    border-color: #dc3545;
    color: #dc3545;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3498db #f5f5f5;
}

/* 自定义滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
}

.history-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background-color: #f8f9fa;
}

.history-item .amount {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.history-item .capital {
    font-size: 14px;
    color: #666;
    word-break: break-all;
}

.history-item .time {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.no-history {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

/* 动画效果 */
@keyframes highlight {
    0% { background-color: #f9f9f9; }
    50% { background-color: #e3f2fd; }
    100% { background-color: #f9f9f9; }
}

.highlight {
    animation: highlight 1s ease;
}

/* 内容盒子样式 */
.content-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.content-box h2 {
    color: #2c3e50;
    margin: 20px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.content-box h2:first-child {
    margin-top: 0;
}

.content-box p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #444;
}

.content-box ul, .content-box ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.content-box li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #444;
}

/* 版本历史样式 */
.version-history .version {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.version-history .version:last-child {
    border-bottom: none;
}

.version-history h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* 页脚样式 */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 0 20px;
}

.footer-section {
    margin-bottom: 30px;
    min-width: 250px;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section p {
    margin-bottom: 8px;
    color: #ecf0f1;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3498db;
}

/* 友情链接样式 - 缩小版 */
.friend-links-section {
    background-color: #fff;
    padding: 10px 0;
    margin: 20px 0 5px 0; /* 上 右 下 左 */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.friend-links-section h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 8px;
    text-align: center;
    position: relative;
}

.friend-links-section h3:after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: #3498db;
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.links-container a {
    color: #666;
    text-decoration: none;
    padding: 3px 12px;
    border-radius: 15px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    border: 1px solid #eee;
    font-size: 12px;
    line-height: 1.2;
}

.links-container a:hover {
    background-color: #3498db;
    color: #fff;
    transform: translateY(-1px);
    border-color: #3498db;
    box-shadow: 0 1px 4px rgba(52, 152, 219, 0.2);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #bdc3c7;
    font-size: 14px;
}

/* 友情链接响应式设计 */
@media (max-width: 768px) {
    .friend-links {
        padding: 15px;
        margin: 15px 15px 0;
    }

    .links-container {
        gap: 10px;
    }

    .links-container a {
        padding: 4px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .links-container {
        flex-direction: column;
        align-items: center;
    }

    .links-container a {
        width: 80%;
        text-align: center;
        padding: 8px;
    }
}

/* 响应式设计补充 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 30px;
        width: 100%;
    }

    .content-box {
        padding: 15px;
    }
}

@media (max-width: 600px) {
    .history-box {
        padding: 15px;
    }
    
    .history-item {
        padding: 10px;
    }
    
    .history-item .amount {
        font-size: 14px;
    }
    
    .history-item .capital {
        font-size: 13px;
    }
    
    .history-list {
        max-height: 250px;
    }

    .content-box h2 {
        font-size: 20px;
    }
}

/* FAQ部分样式 */
.faq-section h3 {
    color: #2c3e50;
    margin: 20px 0 10px;
    font-size: 16px;
}

.faq-section p {
    margin-bottom: 15px;
    padding-left: 20px;
}