* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #4052b5;
}

.logo::before {
    content: "YF";
    width: 40px;
    height: 40px;
    background: #4052b5;
    color: white;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(64, 82, 181, 0.3);
}

.nav-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.security-badge {
    display: flex;
    align-items: center;
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.security-badge i {
    margin-right: 6px;
}

.main-container {
    flex: 1;
    display: flex;
    gap: 24px;
    padding: 32px 20px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
}

.form-section {
    flex: 1;
    min-width: 0;
}

.insurance-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 40px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.cards-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.student-info-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 30px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.student-info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #52c41a, #73d13d);
}

.info-panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.info-panel-content {
    text-align: center;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    width: 100%;
}

.info-panel-empty {
    color: #999;
    font-style: italic;
}

.info-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #4052b5;
}

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

.info-success {
    text-align: left;
}

.info-item {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(64, 82, 181, 0.05);
    border-radius: 8px;
    border-left: 3px solid #4052b5;
}

.info-item strong {
    color: #333;
    font-size: 13px;
    display: block;
    margin-bottom: 5px;
}

.info-item > div {
    color: #666;
    font-size: 14px;
    word-break: break-all;
}

.students-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.student-tag {
    background: linear-gradient(135deg, #4052b5, #667eea);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.month-info {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    display: inline-block;
    margin-top: 5px;
}

.insurance-selection-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.insurance-selection-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4052b5, #667eea);
}

.insurance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4052b5, #667eea, #764ba2);
}

.card-header {
    text-align: center;
    margin-bottom: 40px;
}

.card-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-title i {
    margin-right: 12px;
    color: #4052b5;
    font-size: 32px;
}

.card-subtitle {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.warning-notice {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffd591;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 30px;
    font-size: 14px;
    color: #d46b08;
    display: flex;
    align-items: flex-start;
}

.warning-notice i {
    margin-right: 10px;
    margin-top: 2px;
    color: #fa8c16;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.required::after {
    content: " *";
    color: #ff4d4f;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input:focus {
    border-color: #4052b5;
    background: white;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 82, 181, 0.08);
}

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

.verify-button {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.verify-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}

.verify-button:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.verification-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.verification-success {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
    border: 1px solid rgba(82, 196, 26, 0.2);
}

.verification-error {
    background: rgba(255, 77, 79, 0.1);
    color: #ff4d4f;
    border: 1px solid rgba(255, 77, 79, 0.2);
}

.date-container {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.date-input-group {
    flex: 1;
}

.month-button {
    background: #4052b5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.month-button:hover {
    background: #3346a9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 82, 181, 0.3);
}

.insurance-section {
    background: rgba(245, 246, 250, 0.8);
    border: 2px solid #e8e8e8;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.insurance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 8px;
    color: #4052b5;
}

.toggle-button {
    background: rgba(64, 82, 181, 0.1);
    color: #4052b5;
    border: 1px solid #4052b5;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-button:hover {
    background: rgba(64, 82, 181, 0.2);
}

.insurance-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    max-height: none; /* 修改这里，移除高度限制 */
    overflow-y: visible; /* 修改这里，改为可见 */
    transition: all 0.3s ease;
}

.insurance-cards-container.collapsed {
    max-height: 240px; /* 保持折叠状态的高度限制 */
    overflow: hidden;
}

.insurance-card-item {
    position: relative;
    background: white;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.insurance-card-item:hover {
    border-color: #4052b5;
    box-shadow: 0 4px 16px rgba(64, 82, 181, 0.15);
    transform: translateY(-2px);
}

/* 选中状态改为绿色边框 */
.insurance-card-item.selected {
    border-color: #52c41a;
    background: linear-gradient(135deg, rgba(82, 196, 26, 0.1), rgba(82, 196, 26, 0.05));
    box-shadow: 0 4px 16px rgba(82, 196, 26, 0.2);
}

.card-company {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-amount {
    font-size: 18px;
    font-weight: 700;
    color: #4052b5;
    margin-bottom: 4px;
}

.insurance-card-item input[type="radio"] {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    accent-color: #52c41a;
    cursor: pointer;
}

.submit-button {
    width: 100%;
    background: linear-gradient(135deg, #4052b5, #667eea);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(64, 82, 181, 0.3);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(64, 82, 181, 0.4);
}

.submit-button:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loader {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #4052b5;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
    box-sizing: border-box;
}

.result-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    margin: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-30px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.result-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.result-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

.success-icon {
    font-size: 60px;
    color: #52c41a;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease-out;
}

.error-icon {
    font-size: 60px;
    color: #ff4d4f;
    margin-bottom: 20px;
    animation: shakeIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shakeIn {
    0% { transform: translateX(-10px); opacity: 0; }
    25% { transform: translateX(10px); }
    50% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); opacity: 1; }
}

.result-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.result-message {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
    word-break: break-all;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #4052b5;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.redirect-button {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
}

.redirect-button:hover {
    background: linear-gradient(135deg, #73d13d, #95de64);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
}

.confirm-redirect {
    background: linear-gradient(135deg, #4052b5, #667eea) !important;
    box-shadow: 0 4px 15px rgba(64, 82, 181, 0.3) !important;
}

.confirm-redirect:hover {
    background: linear-gradient(135deg, #3346a9, #5a6fd8) !important;
    box-shadow: 0 6px 20px rgba(64, 82, 181, 0.4) !important;
}

.cancel-redirect {
    background: #d9d9d9;
    color: #666;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cancel-redirect:hover {
    background: #bfbfbf;
    color: #333;
    transform: translateY(-2px);
}

.copy-button {
    background: #52c41a;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-button:hover {
    background: #73d13d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}

.confirm-button {
    background: #4052b5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-button:hover {
    background: #3346a9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 82, 181, 0.3);
}

.copy-success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #52c41a;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease-out;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-success-toast::before {
    content: "✓";
    font-weight: bold;
}

.footer {
    background: linear-gradient(135deg, #4052b5, #667eea);
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    border-top: none;
    box-shadow: 0 -2px 10px rgba(64, 82, 181, 0.1);
}

.input-with-button {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.input-with-button .form-input {
    flex: 1;
}

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.error-message {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.announcement-trigger {
    cursor: pointer;
    color: #4052b5;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none; /* 移除下划线 */

    /* 添加椭圆胶囊样式 */
    background: rgba(64, 82, 181, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(64, 82, 181, 0.2);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.announcement-trigger:hover {
    background: rgba(64, 82, 181, 0.2);
    border-color: rgba(64, 82, 181, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(64, 82, 181, 0.15);
}

/* 可以添加一个小图标 */
.announcement-trigger::before {
    content: "\f0a1"; /* FontAwesome 喇叭图标 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* 公告弹窗主容器 */
.announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: modalFadeIn 0.3s ease-out;
    padding: 20px;
    box-sizing: border-box;
}

/* 公告内容容器 */
.announcement-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 800px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s ease-out;
    display: flex;
    flex-direction: column;
}

/* 公告关闭按钮 */
.announcement-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.announcement-close:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4d4f;
    transform: scale(1.1);
}

/* 公告头部 */
.announcement-header {
    background: linear-gradient(135deg, #4052b5, #667eea);
    color: white;
    padding: 30px 40px 25px;
    text-align: center;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.announcement-header i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
    animation: bounce 2s infinite;
}

.announcement-header h2 {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.first-time-notice {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-top: 5px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: glow 2s ease-in-out infinite alternate;
}

/* 公告主体内容 */
.announcement-body {
    padding: 30px 40px;
    overflow-y: auto;
    flex: 1;
    background: #fafbfc;
}

.announcement-section {
    margin-bottom: 25px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #4052b5;
    transition: all 0.3s ease;
}

.announcement-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.announcement-section h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.announcement-section h3 i {
    color: #4052b5;
    font-size: 20px;
}

.announcement-section p {
    color: #666;
    line-height: 1.7;
    margin: 0;
    font-size: 15px;
}

/* 问答条目样式 */
.qa-item {
    background: rgba(64, 82, 181, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    border-left: 3px solid #4052b5;
}

.qa-item strong {
    color: #4052b5;
    font-weight: 600;
}

/* 流程步骤样式 */
.process-steps {
    margin-top: 15px;
}

.step {
    display: flex;
    align-items: flex-start;
    margin: 15px 0;
    padding: 15px;
    background: rgba(82, 196, 26, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(82, 196, 26, 0.2);
}

.step-number {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.step p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* 重要提醒样式 */
.important-reminder {
    border-left-color: #ff4d4f !important;
    background: rgba(255, 77, 79, 0.03);
}

.important-reminder h3 i {
    color: #ff4d4f;
}

.important-reminder p {
    color: #d4380d;
    font-weight: 500;
}

/* 联系信息样式 */
.contact-info {
    border-left-color: #52c41a !important;
}

.contact-info h3 i {
    color: #52c41a;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.contact-item {
    background: rgba(82, 196, 26, 0.05);
    border: 1px solid rgba(82, 196, 26, 0.2);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(82, 196, 26, 0.1);
    transform: translateY(-2px);
}

.contact-item strong {
    display: block;
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
}

.contact-item span {
    color: #52c41a;
    font-size: 18px;
    font-weight: bold;
}

/* 公告底部 */
.announcement-footer {
    background: white;
    padding: 25px 40px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 0 0 20px 20px;
}

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

.countdown {
    background: linear-gradient(135deg, #fa8c16, #faad14);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(250, 140, 22, 0.3);
    animation: pulse 2s infinite;
}

.close-announcement-btn {
    background: #d9d9d9;
    color: #999;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
}

.close-announcement-btn.enabled {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
}

.close-announcement-btn.enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
}

.reading-complete {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
    animation: successPulse 1s ease-in-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 动画效果 */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(250, 140, 22, 0.3);
    }
    50% {
        box-shadow: 0 6px 25px rgba(250, 140, 22, 0.5);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 4px 15px rgba(250, 140, 22, 0.3);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .announcement-content {
        max-width: calc(100vw - 20px);
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .announcement-header {
        padding: 20px 25px 20px;
    }

    .announcement-header h2 {
        font-size: 22px;
    }

    .announcement-header i {
        font-size: 28px;
    }

    .announcement-body {
        padding: 20px 25px;
    }

    .announcement-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .announcement-section h3 {
        font-size: 16px;
    }

    .announcement-footer {
        padding: 20px 25px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .step {
        padding: 12px;
    }

    .step-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
        margin-right: 12px;
    }

    .result-content {
        padding: 20px 15px;
        margin: 10px;
        border-radius: 15px;
        max-width: calc(100vw - 20px);
    }

    .result-actions {
        flex-direction: column;
        gap: 10px;
    }

    .redirect-button,
    .copy-button,
    .cancel-redirect,
    .confirm-button {
        width: 100%;
        justify-content: center;
    }

    .copy-success-toast {
        right: 10px;
        top: 10px;
        left: 10px;
        right: 10px;
        width: auto;
    }
}

@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
        gap: 20px;
        padding: 20px 15px;
    }

    .form-section {
        order: 1;
    }

    .cards-section {
        order: 2;
    }
}

@media (max-width: 768px) {
    .insurance-cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
        max-height: none;
    }

    .insurance-cards-container.collapsed {
        max-height: 300px;
        overflow: hidden;
    }

    .insurance-card-item {
        padding: 15px;
        min-height: 80px;
        border-radius: 10px;
        position: relative;
        width: 100%;
        box-sizing: border-box;
    }

    .card-company {
        font-size: 14px;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .card-amount {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .insurance-card-item input[type="radio"] {
        top: 10px;
        right: 10px;
        width: 18px;
        height: 18px;
    }

    .date-container {
        flex-direction: column;
        gap: 12px;
    }

    .date-input-group {
        width: 100%;
    }

    .month-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 8px;
        box-sizing: border-box;
    }
}

/* ========================================
   订单详情和支付界面样式
======================================== */
.order-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.order-content {
    background: #ffffff;
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: orderSlideIn 0.3s ease-out;
}

@keyframes orderSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    z-index: 1001;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.order-close:hover {
    background: #f5f5f5;
    color: #333;
}

.order-layout {
    display: flex;
    height: 600px;
    overflow: hidden;
}

/* 左侧订单详情 */
.order-details {
    flex: 1;
    padding: 30px;
    background: #fafafa;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}

.order-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.order-header h2 {
    color: #333;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-header h2 i {
    color: #4052b5;
}

.order-info-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.order-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #e0e0e0;
}

.order-info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-left-color: #4052b5;
}

.order-info-item.premium {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border-left-color: #ff6b6b;
}

.order-info-item.premium:hover {
    border-left-color: #ff5252;
}

.info-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    flex: 0 0 120px;
}

.info-value {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    text-align: right;
    flex: 1;
    word-break: break-all;
}

.order-info-item.premium .info-value {
    color: #ff5252;
    font-size: 18px;
    font-weight: 700;
}

/* 右侧支付区域 */
.payment-section {
    flex: 1;
    padding: 30px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

/* 支付方式选择器 */
.payment-method-selector {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #f5f5f5;
    padding: 6px;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.payment-method-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.payment-method-btn i {
    font-size: 18px;
}

.payment-method-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    color: #333;
}

.payment-method-btn.active {
    background: #ffffff;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 600;
}

.payment-method-btn.active[data-method="WECHAT"] {
    color: #09bb07;
}

.payment-method-btn.active[data-method="ALIPAYTI"] {
    color: #1677ff;
}

/* 加载动画 */
.qr-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-loading i {
    color: #09bb07;
}

.payment-header {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.payment-header h2 {
    color: #333;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.payment-header h2 i {
    color: #09bb07;
}

.qr-code-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.qr-code-wrapper {
    width: 200px;
    height: 200px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 3px solid #09bb07;
    padding: 10px;
}

.qr-code-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.qr-code-tips {
    margin-bottom: 30px;
}

.qr-code-tips p {
    color: #666;
    font-size: 16px;
    margin: 5px 0;
}

.payment-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #09bb07 0%, #07a005 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(9, 187, 7, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(9, 187, 7, 0.4);
    background: linear-gradient(135deg, #07a005 0%, #059c03 100%);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e0e0e0;
    color: #333;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .order-content {
        width: 98%;
        height: auto;
        max-height: 95vh;
        margin: 1% auto;
        border-radius: 15px;
        overflow: hidden;
    }

    .order-layout {
        flex-direction: column;
        height: auto;
        min-height: 100%;
        max-height: 95vh;
        overflow-y: auto;
    }

    .order-details, .payment-section {
        flex: none;
        padding: 20px;
    }

    .order-details {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        overflow-y: auto;
        max-height: 50vh;
    }

    .payment-section {
        min-height: 450px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .order-info-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 12px 15px;
    }

    .info-label {
        flex: none;
        font-size: 12px;
    }

    .info-value {
        text-align: center;
        font-size: 14px;
    }

    .qr-code-wrapper {
        width: 220px !important;
        height: 220px !important;
        margin: 20px auto;
        flex-shrink: 0;
    }

    .qr-code-wrapper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        display: block !important;
    }

    .qr-code-container {
        width: 100%;
        padding: 20px 0;
    }

    .order-header h2, .payment-header h2 {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .clear-button, .submit-button {
        width: 100%;
    }
}