/* --- 基本重置与全局设置 --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Microsoft YaHei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: #333;
    background-color: #f4f6f8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: #0056b3;
    transition: color 0.3s ease;
}

a:hover {
    color: #c00;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-style: none;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* 辅助类 */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.text-center {
    text-align: center;
}

/* --- 头部 Header --- */
.site-header {
    background-color: #ffffff;
    padding: 10px 0;
    border-bottom: 1px solid #e7e7e7;
    z-index: 1000;
}

.site-header.sticky {
    position: sticky;
    top: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

#logo-img {
    max-height: 40px;
    margin-right: 10px;
}

.logo-link {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}
.logo-link:hover {
    color: #c00;
    text-decoration: none;
}

/* 主导航 */
.main-navigation {
     margin-left: auto;
     margin-right: 20px;
}

.main-navigation ul {
    display: flex;
    gap: 25px;
}

.main-navigation ul li a {
    color: #333;
    font-weight: 500;
    padding: 10px 5px;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.main-navigation ul li a:hover,
.main-navigation ul li a.active {
    color: #c00;
}

.main-navigation ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5px;
    right: 5px;
    height: 3px;
    background-color: #c00;
    border-radius: 1.5px;
}

/* 头部操作按钮 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions button {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #555;
    padding: 5px;
}
.header-actions button:hover {
    color: #c00;
}

.mobile-menu-btn {
    display: none; /* Hidden by default */
}

/* 移动端导航容器 */
.mobile-nav-container {
    display: none; /* Controlled by JS */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border-top: 1px solid #eee;
    z-index: 999;
}
.mobile-nav-container.open {
    display: block; /* Make visible when open */
    max-height: 500px; /* Adjust as needed */
}

.mobile-navigation ul {
    padding: 10px 0;
}

.mobile-navigation ul li a {
    display: block;
    padding: 12px 20px;
    color: #333;
    font-weight: 500;
    text-decoration: none;
}
.mobile-navigation ul li a:hover,
.mobile-navigation ul li a.active {
    background-color: #f8f8f8;
    color: #c00;
}


/* --- 页面主体布局 --- */
.page-wrapper {
    margin-top: 30px;
    margin-bottom: 40px;
}

.main-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) 1fr;
    gap: 30px;
}

#main-content, .sidebar {
    min-width: 0;
}

/* 区块通用样式 */
main > section, .widget {
    background-color: #ffffff;
    padding: 25px 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.section-title, .widget-title {
    font-size: 1.6rem;
    color: #c00;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.widget-title {
    font-size: 1.3rem;
    text-align: left;
    margin-bottom: 20px;
    border-bottom-color: #c00;
}

/* --- Hero Section --- */
.hero {
    /* Apply background image as requested */
    /* Note: The image is small. 'contain' prevents stretching/tiling */
    /* Added a semi-transparent overlay and fallback color */
    background:
        linear-gradient(rgba(5, 5, 5, 0.1), rgba(5, 5, 5, 0.1)), /* White overlay */
        url('./images/logo.png') center center / contain no-repeat, /* Logo image */
        #e9f5ff; 
    text-align: center;
	background-size: cover;
    padding: 60px 40px;
    border-radius: 8px;
    position: relative; /* Needed if you add absolutely positioned elements inside */
}

.hero-content-inner {
     position: relative; /* To ensure text is above potential pseudo-elements */
     z-index: 1;
}

.hero-content-inner h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #be0000;
    font-weight: 700;
}

.hero-content-inner p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #fff;
}

/* --- 按钮样式 --- */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    border: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5;
    vertical-align: middle;
}

.primary-btn {
    background-color: #c00;
    color: #fff;
}
.primary-btn:hover {
    background-color: #a00;
    color: #fff;
    text-decoration: none;
}

.secondary-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}
.secondary-btn:hover {
    background-color: #e0e0e0;
    color: #333;
    text-decoration: none;
}

.small-btn {
    padding: 6px 15px;
    font-size: 0.9rem;
}

/* --- 充值区域 Recharge Section --- */
.recharge-section .section-title {
    text-align: left;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 20px;
}

.recharge-container {
    display: flex;
    gap: 30px;
    margin-top: 10px;
}

.recharge-form {
    flex: 2;
    background-color: #fdfdfd;
    padding: 25px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.recharge-info {
    flex: 1;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #555;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="password"]
{
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus {
    border-color: #c00;
    outline: none;
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.1);
}

/* Style for invalid inputs */
.form-group input.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}
.form-group input.invalid:focus {
    border-color: #dc3545;
}

.form-hint {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

/* Error Message Styling */
.error-message {
    color: #dc3545;
    font-size: 0.85em;
    display: none; /* Initially hidden */
    min-height: 1.2em;
    margin-top: 4px;
}

/* Captcha */
.captcha-wrapper {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.captcha-wrapper input[type="text"] {
    flex-grow: 1;
}
.captcha-container {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
#captchaCanvas {
    display: block;
    background-color: #eee;
}
.refresh-captcha {
    background-color: #f8f9fa;
    border: none;
    border-left: 1px solid #ccc;
    padding: 0 10px;
    font-size: 1.1rem;
    color: #555;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.refresh-captcha:hover {
    background-color: #e9ecef;
}
.refresh-captcha i {
    line-height: 1;
}


.submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Recharge Info Cards */
.recharge-info .card {
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
}
.recharge-info .card:last-child {
     margin-bottom: 0;
}

.recharge-info .card h3 {
    margin: 0 0 15px 0;
    color: #c00;
    font-size: 1.15em;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.recharge-info .card h3 i {
    flex-shrink: 0;
}
.recharge-info .card ul {
    padding-left: 5px;
}
.recharge-info .card li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}
.recharge-info .card li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: #c00;
    font-weight: bold;
}
.purchase-options ul {
     margin: 10px 0;
}
.purchase-options li {
    padding-left: 25px;
}
.purchase-options li i {
    position: absolute;
    left: 0;
    top: 3px;
    margin-right: 8px;
    color: #666;
    width: 18px;
    text-align: center;
}
.promotion-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
    color: #0056b3;
    font-size: 0.9rem;
}
.promotion-link i {
    margin-left: 5px;
    font-size: 0.8em;
}

/* --- Features Section (Our Advantages) --- */
.features .section-title { /* Uses global style */ }

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-card {
    padding: 25px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.feature-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.feature-card .icon {
    font-size: 2.5rem;
    color: #c00;
    margin-bottom: 15px;
    line-height: 1;
    flex-shrink: 0;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
     flex-shrink: 0;
}

.feature-card p {
    color: #666;
    font-size: 0.9rem;
    flex-grow: 1;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .feature-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Download App Section --- */
.download-app {
    background-color: #e9f5ff;
    padding: 40px 30px;
    border-radius: 8px;
}
.download-content {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}
.download-info { flex: 1; }
.download-info h2 {
    font-size: 1.7rem;
    color: #0056b3;
    margin-bottom: 10px;
    font-weight: 600;
}
.download-info p {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 20px;
}
.app-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}
.app-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}
.app-features i {
    color: #28a745;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}
.download-btn {
    display: flex;
    align-items: center;
    background-color: #333;
    color: #fff;
    padding: 10px 18px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    min-width: 140px;
}
.download-btn:hover {
    background-color: #555;
    color: #fff;
    text-decoration: none;
}
.download-btn i {
    font-size: 1.8rem;
    margin-right: 10px;
    line-height: 1;
}
.download-btn span {
    line-height: 1.2;
    font-size: 0.9rem;
    text-align: left;
}
.app-qrcode {
    text-align: center;
    flex-shrink: 0;
}
.app-qrcode img {
    max-width: 150px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    padding: 5px;
    background-color: #fff;
    border-radius: 4px;
}
.app-qrcode p {
    font-size: 0.9rem;
    color: #555;
}

/* --- FAQ Section --- */
.faq-section .section-title { /* Uses global style */ }

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    transition: background-color 0.2s ease;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #333;
    flex-grow: 1;
    padding-right: 15px;
    font-weight: 600;
}
.faq-question i.fa-chevron-down {
    color: #666;
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* FAQ Answer visibility controlled by JS adding .active class */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out, margin 0.3s ease-out;
    padding: 0 15px;
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
}
.faq-item.active .faq-answer {
    max-height: 500px; /* Adjust if needed for long answers */
    padding-top: 5px; /* Small space above content */
    padding-bottom: 20px; /* Space below content */
    margin-bottom: 10px; /* Space before next question's border */
}
.faq-item.active .faq-question i.fa-chevron-down {
    transform: rotate(180deg);
}
.faq-answer p { margin-bottom: 15px; }
.faq-answer p:last-child { margin-bottom: 0; }


.more-help {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.more-help p {
    margin-bottom: 0;
    font-size: 1rem;
    color: #555;
}
.more-help a { font-weight: bold; }

/* --- Sidebar --- */
.sidebar .widget { padding: 20px; }

.widget-list li { margin-bottom: 0; }
.widget-list a {
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 5px;
    border-bottom: 1px dashed #eee;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.widget-list li:last-child a { border-bottom: none; }

.widget-list a i {
    color: #c00;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.widget-list a:hover {
    color: #c00;
    text-decoration: none;
    background-color: #fafafa;
}

#promotions .widget-content img {
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}
#promotions .widget-content p {
    margin-bottom: 15px;
    color: #555;
    font-size: 0.95rem;
}
#promotions .widget-content .btn { width: 100%; }

/* --- Footer --- */
.site-footer {
    background-color: #343a40;
    color: #ccc;
    padding: 50px 0 20px;
    margin-top: 40px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 8px;
    font-weight: 600;
}
.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background-color: #c00;
}

.footer-column p {
    margin-bottom: 15px;
    font-size: 0.88rem;
}

.footer-column ul { padding: 0; }
.footer-column li { margin-bottom: 8px; }
.footer-column a {
    color: #ccc;
    font-size: 0.88rem;
}
.footer-column a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Social Media Icons in Footer */
.social-media {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}
.social-media a {
    color: #ccc;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}
.social-media a:hover { color: #fff; }

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
}
.contact-info i {
    margin-top: 4px;
    width: 16px;
    text-align: center;
    color: #c00;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid #495057;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom p { margin: 0; }

.footer-bottom-links {
    display: flex;
    gap: 15px;
}
.footer-bottom-links li { display: inline-block; }
.footer-bottom-links a { color: #ccc; }
.footer-bottom-links a:hover { color: #fff; }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-layout-grid { grid-template-columns: 1fr; }
    .sidebar { margin-top: 30px; }
    .main-navigation { display: none; }
    .mobile-menu-btn { display: block; }
    .header-container { position: relative; }
    .footer-content { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .download-content { flex-direction: column; text-align: center; }
    .download-info { order: 2; }
    .app-qrcode { order: 1; margin-bottom: 25px; }
    .download-buttons { justify-content: center; }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    .container { padding-left: 10px; padding-right: 10px; }
    .logo-link { font-size: 1rem; }
    #logo-img { max-height: 35px; }
    .main-navigation { display: none; } /* Ensure hidden */
    .hero { padding: 40px 20px; }
    .hero-content-inner h1 { font-size: 1.8rem; }
    .hero-content-inner p { font-size: 1rem; }
    main > section, .widget { padding: 20px 15px; }
    .section-title { font-size: 1.4rem; }
    .widget-title { font-size: 1.2rem; }
    .recharge-container { flex-direction: column; gap: 25px; }
    .recharge-form { padding: 20px; }
    .footer-content { grid-template-columns: 1fr; gap: 25px; }
    .footer-bottom { flex-direction: column; gap: 15px; }
    .footer-bottom-links { justify-content: center; }
}

@media (max-width: 480px) {
    .captcha-wrapper { flex-direction: column; align-items: flex-start; }
    .captcha-wrapper input[type="text"] { width: 100%; }
    .captcha-container { width: auto; align-self: flex-start; }
    .download-btn { width: 100%; justify-content: center; }
    .footer-content { gap: 20px; }
    .footer-column h3 { font-size: 1.05rem; }
}

/* Added from inline styles in index.html */
html {
    scroll-behavior: smooth;
}

.form-group input.invalid {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 0.85em;
    display: none; /* Initially hidden */
    min-height: 1.2em;
    margin-top: 4px;
}

.form-hint-danger {
    color: #c00;
}

.promo-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}