/* 通用响应式页面样式 */

/* 确保所有页面使用相同的字体和基础样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* 防止文本选择拖动时出现的虚线轮廓 */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #D3AF58;
    outline-offset: 2px;
}

/* 容器样式 - 确保所有页面内容宽度一致 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    transition: padding 0.3s ease;
}

/* 响应式容器调整 */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 10px;
    }
}

/* 页面标题区域 - 统一样式 */
.page-header {
    background: linear-gradient(135deg, #2E7D32, #388E3C);
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
    animation: fadeIn 0.5s ease-out;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
    animation: fadeIn 0.5s ease-out 0.2s both;
}

/* 主要内容区域 - 添加动画效果 */
.main-content {
    padding: 2rem 0;
    animation: fadeIn 0.6s ease-out;
}

/* 统一卡片样式 - 确保所有卡片风格一致 */
.card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    margin-bottom: 1.5rem;
}

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

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    color: #2E7D32;
    margin-bottom: 1rem;
    font-weight: bold;
}

/* 统一按钮样式 */
.btn {
    display: inline-block;
    background-color: #D3AF58;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    max-width: 100%;
    width: auto;
    box-sizing: border-box;
}

.btn:hover {
    background-color: #C29A47;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: #2E7D32;
}

.btn-primary:hover {
    background-color: #1B5E20;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #2E7D32;
    color: #2E7D32;
}

.btn-outline:hover {
    background-color: #2E7D32;
    color: white;
}

/* 统一表单样式 */
.form-section {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #D3AF58;
    box-shadow: 0 0 0 3px rgba(211, 175, 88, 0.2);
}

.form-control::placeholder {
    color: #9E9E9E;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.checkbox-group, .radio-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    margin-right: 0.5rem;
    transform: scale(1.2);
}

/* 统一页脚样式 - 确保所有页面页脚一致 */
footer {
    background-color: #2E7D32;
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.footer-col {
    min-width: 200px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-logo i {
    margin-right: 10px;
    color: #D3AF58;
    font-size: 1.8rem;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #D3AF58;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #D3AF58;
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 统一返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #D3AF58;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background-color: #C19A36;
}

/* 动画效果工具类 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { width: 0; left: 50%; }
    to { width: 100%; left: 0; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.scale-in {
    animation: scaleIn 0.4s ease-out forwards;
    opacity: 0;
    transform: scale(0.9);
}

/* 延迟动画类 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* 悬停效果 */
.hover-zoom { transition: transform 0.3s ease; }
.hover-zoom:hover { transform: scale(1.05); }

.hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-lift:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }

/* 响应式图片和媒体 */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* 响应式表格 */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

/* 响应式调整 - 大平板和小笔记本 */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .page-header p {
        font-size: 1.1rem;
    }
}

/* 响应式调整 - 平板设备 */
@media (max-width: 992px) {
    .page-header {
        padding: 2.5rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.65rem 1.3rem;
        font-size: 0.95rem;
    }
    
    .card-content {
        padding: 1.2rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
}

/* 响应式调整 - 小平板和大屏手机 */
@media (max-width: 768px) {
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
        min-width: 120px;
    }
    
    .form-control {
        padding: 0.7rem 0.9rem;
        font-size: 0.95rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

/* 响应式调整 - 手机设备 */
@media (max-width: 576px) {
    .page-header {
        padding: 1.5rem 0;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        min-width: auto;
        margin: 0.3rem 0;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .form-control {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .checkbox-group, .radio-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* 无障碍访问增强 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}