:root {
    --primary: #0288d1;       
    --primary-gradient: linear-gradient(135deg, #0288d1 0%, #0097e6 100%);
    --danger: #e84118;
    --text-main: #2f3640;
    --text-muted: #718093;
    --bg-page: #f5f6fa;
    --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    font-family: var(--font-stack);
    background-color: var(--bg-page); 
    color: var(--text-main);
    height: 100vh;
    width: 100vw;
    overflow: hidden; 
    line-height: 1.5;
}

.h5-wrapper {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* 顶部通栏海报区 */
.top-banner-section {
    width: 100%;
    height: 38%; /* 固定占比 */
    background-image: url('./top_banner.png');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.5rem;
    text-align: center;
}

/* 上方半透明渐变层，增强文案可读性 */
.top-banner-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
    z-index: 1;
}

.headline, .subheadline {
    position: relative;
    z-index: 2;
    padding: 0 1rem;
}

.headline {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.highlight {
    color: var(--danger);
}

.subheadline {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

/* 悬浮症状卡片区 */
.floating-symptoms {
    width: 90%;
    max-width: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    padding: 1.25rem 1rem;
    z-index: 10;
    margin-top: -3.5rem; /* 向上偏移产生悬浮效果 */
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    text-align: center;
    font-weight: 600;
}

.symptom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.symptom-card {
    background: var(--bg-page);
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.symptom-card:active {
    transform: scale(0.97);
}

.symptom-card .icon {
    font-size: 1.2rem;
}

.card-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

/* 纯色表单底板区 */
.solid-form-section {
    flex: 1;
    width: 100%;
    background-color: var(--bg-page);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    z-index: 5;
}

.contact-form-container {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: relative;
}

.input-group {
    margin-bottom: 1rem;
    position: relative;
}

.input-group input {
    width: 100%;
    background-color: #f8f9fa;
    border: 1px solid transparent;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: all 0.4s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.input-group input:focus {
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(2, 136, 209, 0.1);
}

.input-group input:focus ~ .focus-border {
    width: 90%;
}

.input-group input::placeholder {
    color: #a4b0be;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 54px;
    box-shadow: 0 6px 15px rgba(2, 136, 209, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(2, 136, 209, 0.2);
}

.privacy-notice {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
}

.privacy-notice::before {
    content: '🔒';
    font-size: 0.8rem;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功提示 */
.success-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
    border-radius: 16px;
}

.success-message.active {
    opacity: 1;
    pointer-events: all;
}

.success-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.success-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2ed573;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 1rem auto;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 小屏微调 */
@media (max-height: 680px) {
    .top-banner-section { height: 35%; padding-top: 1rem; }
    .floating-symptoms { margin-top: -2.5rem; padding: 1rem; }
    .symptom-card { padding: 0.5rem; }
    .contact-form-container { padding: 1rem; }
    .input-group { margin-bottom: 0.75rem; }
    .input-group input { padding: 0.8rem 1rem; }
    .submit-btn { height: 48px; }
}
