/* General Body and HTML Styling */
html {
    scroll-behavior: smooth;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}
body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    background-color: #f4f7f6;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
    padding-top: 70px; /* Adjust for fixed navbar height */
    padding-bottom: 30px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
p {
    margin-bottom: 1rem;
    color: #555;
}
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}
.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}
.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.2);
}

/* Forms */
.form-control {
    border-radius: 0.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

/* Navbar specific styles (already in header, but could be here too) */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}
.navbar-brand img {
    margin-right: 0.5rem;
}

/* Footer specific styles */
.footer {
    background-color: #2c3e50 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    padding-top: 3rem;
    padding-bottom: 3rem;
    box-shadow: 0 -2px 4px rgba(0,0,0,.05);
}
.footer h5 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.footer ul {
    padding-left: 0;
    list-style: none;
}
.footer ul li {
    margin-bottom: 0.75rem;
}
.footer ul li a {
    color: rgba(255, 255, 255, 0.6) !important;
}
.footer ul li a:hover {
    color: #fff !important;
    text-decoration: underline;
}
.footer .social-icons a {
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}
.footer .social-icons a:hover {
    color: #007bff !important;
}
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}
#back-to-top:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
}

/* Utility Classes */
.text-primary { color: #007bff !important; }
.bg-primary { background-color: #007bff !important; }
.text-secondary { color: #6c757d !important; }
.bg-secondary { background-color: #6c757d !important; }
.text-white-50 { color: rgba(255, 255, 255, 0.6) !important; }
.text-decoration-none { text-decoration: none !important; }
.shadow { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }
.rounded-circle { border-radius: 50% !important; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .navbar-brand { font-size: 1.25rem; }
    .footer .col-md-2, .footer .col-md-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
    .footer .text-md-start, .footer .text-md-end {
        text-align: center !important;
    }
    .footer .social-icons {
        margin-top: 1rem;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
