/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 管理后台容器与表格（从 admin.html 内联样式抽离） */
.admin-container { max-width:1000px; margin:20px auto; padding:20px; background:#fff; border-radius:10px; box-shadow:0 4px 20px rgba(0,0,0,.1); }
.admin-header { text-align:center; padding:20px 0; border-bottom:2px solid #ecf0f1; margin-bottom:30px; }
.admin-header h1 { color:#2c3e50; font-size:2em; }
.login-section { max-width:400px; margin:0 auto; padding:30px; background:#f8f9fa; border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.1); }
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:20px; margin-bottom:30px; }
.stat-card { background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); color:#fff; padding:25px; border-radius:10px; text-align:center; box-shadow:0 4px 15px rgba(0,0,0,.1); }
.stat-number { font-size:2.5em; font-weight:700; margin-bottom:10px; }
.stat-label { font-size:1.1em; opacity:.9; }
.user-table { width:100%; border-collapse:collapse; margin-top:20px; background:#fff; border-radius:8px; overflow:hidden; box-shadow:0 2px 10px rgba(0,0,0,.1); }
.user-table th,.user-table td { padding:12px 15px; text-align:left; border-bottom:1px solid #ecf0f1; }
.user-table th { background:#3498db; color:#fff; font-weight:600; }
.user-table tr:hover { background:#f8f9fa; }
.back-btn { margin-bottom:20px; }
.hidden { display:none !important; }
.btn-sm { padding:4px 8px; margin:2px; border:none; border-radius:4px; font-size:.8em; cursor:pointer; transition:all .3s ease; }
.btn-success { background:#27ae60; color:#fff; }
.btn-success:hover:not(:disabled) { background:#229954; }
.btn-danger { background:#e74c3c; color:#fff; }
.btn-danger:hover:not(:disabled) { background:#c0392b; }
.btn-sm:disabled { opacity:.5; cursor:not-allowed; }

/* 验证码统一样式 */
.captcha-container { display:flex; align-items:center; gap:10px; }
.captcha-input { flex:1; padding:10px; border:2px solid #bdc3c7; border-radius:6px; }
.captcha-image { height:42px; cursor:pointer; border-radius:6px; box-shadow:0 2px 6px rgba(0,0,0,.15); }
.captcha-refresh { background:#3498db; border:none; color:#fff; padding:10px 12px; border-radius:6px; cursor:pointer; box-shadow:0 2px 6px rgba(52,152,219,.4); transition:.3s; }
.captcha-refresh:hover { background:#2980b9; }
.form-hint { font-size:.75em; color:#7f8c8d; margin-top:4px; }

/* 密码修改弹窗 */
.password-modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,.55); z-index:2000; justify-content:center; align-items:center; }
.password-modal-content { background:#fff; width:100%; max-width:480px; padding:25px 30px 35px; border-radius:12px; position:relative; box-shadow:0 10px 30px rgba(0,0,0,.25); animation:fadeInScale .35s ease; }
.password-modal-close { position:absolute; top:12px; right:15px; font-size:28px; color:#7f8c8d; cursor:pointer; transition:.3s; }
.password-modal-close:hover { color:#e74c3c; }
.password-strength { margin-top:8px; height:6px; background:#ecf0f1; border-radius:4px; overflow:hidden; }
.password-strength-bar { height:100%; width:0; background:#e74c3c; transition:width .4s ease, background .4s ease; }
.password-strength-bar.password-strength-weak { width:25%; background:#e74c3c; }
.password-strength-bar.password-strength-medium { width:50%; background:#f39c12; }
.password-strength-bar.password-strength-strong { width:75%; background:#27ae60; }
.password-strength-bar.password-strength-very-strong { width:100%; background:#2ecc71; }
.password-requirements { display:grid; grid-template-columns:repeat(2,1fr); gap:4px 12px; margin-top:10px; }
.password-requirement { font-size:.75em; color:#7f8c8d; position:relative; padding-left:14px; }
.password-requirement.met { color:#27ae60; }
.password-requirement.met::before { content:'✔'; position:absolute; left:0; top:0; font-size:.75em; }
.form-actions { margin-top:20px; display:flex; gap:12px; justify-content:flex-end; }

@keyframes fadeInScale { from { opacity:0; transform:scale(.9);} to { opacity:1; transform:scale(1);} }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 3px solid #e74c3c;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    color: #c0392b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

/* 公告样式 */
.announcement {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.announcement::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.star {
    font-size: 1.5em;
    color: #ffd700;
    margin: 10px 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.announcement p {
    font-size: 1.2em;
    margin: 8px 0;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* 补贴信息样式 */
.subsidy-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.subsidy-info p {
    font-size: 1.3em;
    margin: 10px 0;
    font-weight: 600;
}

.flower {
    color: #f39c12 !important;
    font-size: 1.1em !important;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.8);
}

/* 注册表单样式 */
.registration-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #ecf0f1;
}

.registration-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.registration-form {
    max-width: 500px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* 下载区域样式 */
.download-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.download-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.download-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.android-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.android-btn:hover {
    background: linear-gradient(45deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.ios-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.ios-btn:hover {
    background: linear-gradient(45deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

/* 会员升级样式 */
.member-upgrade {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.member-upgrade h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5em;
}

.upgrade-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.upgrade-card {
    background: #ecf0f1;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    min-width: 200px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

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

.upgrade-card.premium {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border-color: #d68910;
}

.upgrade-card h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.upgrade-card.premium h4 {
    color: white;
}

.upgrade-card p {
    margin-bottom: 20px;
    color: #7f8c8d;
}

.upgrade-card.premium p {
    color: #fff;
}

.upgrade-btn {
    padding: 12px 25px;
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-btn:hover {
    background: linear-gradient(45deg, #8e44ad, #7d3c98);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
}

/* 底部样式 */
.footer {
    text-align: center;
    padding: 25px 0;
    border-top: 2px solid #ecf0f1;
    margin-top: 30px;
}

.admin-link {
    margin-bottom: 15px;
}

.admin-btn {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(45deg, #34495e, #2c3e50);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: linear-gradient(45deg, #2c3e50, #1b2631);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 73, 94, 0.4);
}

.footer p {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        margin: 10px auto;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.8em;
        margin-bottom: 5px;
    }
    
    .header p {
        font-size: 0.9em;
    }
    
    .nav {
        margin-top: 15px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .intro {
        font-size: 0.95em;
        line-height: 1.6;
        margin-bottom: 25px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-btn {
        width: 100%;
        padding: 15px;
        font-size: 1.1em;
        min-height: 44px; /* 触摸友好 */
    }
    
    .download-section {
        margin-top: 30px;
    }
    
    .download-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .download-btn {
        width: 100%;
        padding: 15px;
        font-size: 1.1em;
        min-height: 44px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 12px;
        min-height: 44px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 25px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-card h3 {
        font-size: 1.2em;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .captcha-image {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    /* 模态框移动端优化 */
    .modal-content {
        margin: 20px;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
        width: calc(100% - 40px);
    }
    
    .download-option {
        margin: 10px 0 !important;
        padding: 15px !important;
    }
    
    .download-option h4 {
        font-size: 1.1em;
    }
    
    .download-option p {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 5px auto;
        padding: 5px;
    }
    
    .header h1 {
        font-size: 1.6em;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .intro {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    
    .action-btn,
    .download-btn {
        padding: 12px;
        font-size: 1em;
    }
    
    .feature-card {
        padding: 15px;
    }
    
    .modal-content {
        margin: 10px;
        padding: 15px;
        width: calc(100% - 20px);
    }
    
    .announcement, .subsidy-info, .registration-section, .download-section, .member-upgrade {
        padding: 15px;
        margin: 15px 0;
    }
}

/* 横屏移动设备优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .header {
        padding: 10px 0;
    }
    
    .header h1 {
        font-size: 1.5em;
        margin-bottom: 5px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .intro {
        margin-bottom: 15px;
    }
    
    .action-buttons {
        flex-direction: row;
        gap: 10px;
    }
    
    .action-btn {
        width: auto;
        flex: 1;
        padding: 10px;
    }
    
    .download-buttons {
        flex-direction: row;
        gap: 10px;
    }
    
    .download-btn {
        width: auto;
        flex: 1;
        padding: 10px;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 15px;
    }
    
    .feature-card {
        padding: 15px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .action-btn,
    .download-btn,
    .btn {
        min-height: 44px; /* 确保触摸目标足够大 */
        padding: 12px 20px;
    }
    
    .feature-card {
        transition: none; /* 移除hover效果 */
    }
    
    .download-option {
        transition: none;
    }
    
    /* 移除hover样式 */
    .action-btn:hover,
    .download-btn:hover,
    .btn:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .header h1 {
        text-rendering: optimizeLegibility;
    }
    
    .feature-card,
    .modal-content {
        border: 0.5px solid #ddd;
    }
}

/* 无障碍访问优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2d2d2d;
        --border-color: #404040;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .container {
        background: var(--card-bg);
        border-color: var(--border-color);
    }
    
    .feature-card {
        background: var(--card-bg);
        border-color: var(--border-color);
    }
    
    .modal-content {
        background: var(--card-bg);
        color: var(--text-color);
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        background: var(--card-bg);
        color: var(--text-color);
        border-color: var(--border-color);
    }
}
