/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* 修复：添加overflow:hidden防止内容溢出 */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-header {
    border-radius: 0 !important; /* 修复：移除卡片头部圆角 */
    padding: 0;
}

/* 修复标签页样式问题 */
.nav-tabs {
    border-bottom: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-tabs .nav-link {
    color: rgba(255,255,255,0.7);
    border: none !important; /* 修复：强制移除所有边框 */
    border-radius: 0 !important; /* 修复：强制移除所有圆角 */
    padding: 1rem 1.2rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
}

.nav-tabs .nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
    border: none;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: white;
    border: none;
    border-radius: 0;
}

/* 修复：移除活动标签页的左上角圆角 */
.nav-tabs .nav-link.active:first-child {
    border-top-left-radius: 0 !important;
}

/* 换算器表单 */
.converter-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-control-lg, .form-select-lg {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
}

.form-control-lg:focus, .form-select-lg:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-lg {
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
}

/* 结果框 */
.result-box {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: #0d6efd;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 友情链接 */
.bg-light {
    background-color: #f1f3f5 !important;
}

.btn-outline-primary {
    border-radius: 20px;
    padding: 0.375rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.2);
}

/* 页脚 */
footer {
    margin-top: 2rem;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.75rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .result-box {
        font-size: 1.2rem;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}