/**
* Global CSS
**/

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #602AA6;
    --primary-dark: #4A1F85;
    --primary-light: #7D51E3;
    --primary-card: #9978EB;
    --yellow: #FFCA08;
    --yellow-hover: #E5B607;
    --icon-yellow: #FDC001;
    --white: #FFFFFF;
    --bg-light: #F6F1FC;
    --card-bg: #F7F5FE;
    --gray-600: #475467;
    --gray-900: #101828;
    --gray-200: #EAECF0;
    --gray-text: #787878;
    --accent-purple: #C4A1EE;
    --subtitle-color: #A79EB1;
    --subtitle-purple: #A79EB1;
    --black: #000000;
    --placeholder: #D9D9D9;
    --shadow-card: 8px 8px 20px 0px rgba(0, 0, 0, 0.1);
    --shadow-btn: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
    --shadow-icon: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
    --primary-dark: rgba(96, 42, 166, 0.5);
    --max-width: 1280px;
    --card-bg: #F5F5F5;
    --border-light: #E5E5E5;
    --text-dark: #303133;
    --text-secondary: #7A8793;
    --btn-bg: #F0F2F5;
    --nav-bg: #E1E1E1;
    --compare-gray: #F5F5F5;
    --compare-purple: #EBE5FB;
    --compare-label-gray: #D3D2DA;

    --font-family: 'Alibaba PuHuiTi', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--black);
    background: var(--white);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}
img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    /*padding: 0 80px;*/
}
.page-container {
    /*max-width: var(--max-width);*/
    /*margin: 0 auto;*/
}

.placeholder-img {
    background-color: var(--placeholder);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    overflow: hidden;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s ease;
}
.header .container {
    padding: 0;
}
.header.scrolled {
    box-shadow: 0 2px 20px rgba(96, 42, 166, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.header-logo {
    width: 140px;
    height: 45px;
    flex-shrink: 0;
}

.header-logo .logo {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-nav a {
    text-decoration: none;
    color: var(--black);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    opacity: 0.8;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.header-nav a:hover {
    opacity: 1;
}

.header-nav a.active {
    font-weight: 500;
    color: var(--primary);
    opacity: 1;
}
.header-nav a:hover, .header-nav a.active {
    color: var(--primary);
    opacity: 1;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/** Button CSS **/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--yellow);
    color: var(--black);
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 18px;
    line-height: 28px;
    box-shadow: var(--shadow-btn);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background: var(--yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 202, 8, 0.4);
}

.btn-primary:active {
    transform: translateY(0) scale(0.97);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 18px;
    line-height: 28px;
    box-shadow: var(--shadow-btn);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 42, 166, 0.3);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.97);
}

.btn-pill {
    background: var(--yellow);
    color: var(--black);
    border-radius: 100px;
    padding: 16px 28px;
    font-size: 20px;
    font-weight: 500;
    box-shadow: var(--shadow-btn);
}

.btn-pill:hover {
    background: var(--yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 202, 8, 0.3);
}

.btn-pill:active {
    transform: translateY(0) scale(0.97);
}

.btn-yellow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background: var(--yellow);
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    line-height: 28px;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.btn-yellow:hover {
    background: var(--yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 202, 8, 0.4);
}

.btn-yellow:active {
    transform: translateY(0) scale(0.97);
}

.btn-purple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    line-height: 28px;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.btn-purple:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 42, 166, 0.3);
}

.btn-purple:active {
    transform: translateY(0) scale(0.97);
}

/* Header 用户信息 */
.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
}
.header-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.header-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.header-logout {
    font-size: 12px;
    color: var(--gray-text);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.header-logout:hover {
    color: var(--primary);
}

.hero {
    margin-top: 70px;
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-200px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    z-index: 3000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 998;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(96, 42, 166, 0.3);
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ===== Floating CTA ===== */
.floating-cta {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.floating-cta.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.floating-cta .pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 28px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 100px;
    font-size: 34px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-cta .pill-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(96, 42, 166, 0.4);
}

.floating-cta .pill-btn:active {
    transform: scale(0.97);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(96, 42, 166, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(96, 42, 166, 0);
    }
}

.floating-cta .pill-btn {
    animation: pulse-glow 2.5s infinite;
}

/* ===== 在线客服 ===== */
.online-service {
    position: fixed;
    bottom: 104px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* 触发按钮 */
.os-toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(96, 42, 166, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    animation: os-pulse 2.5s infinite;
}
.os-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(96, 42, 166, 0.45);
}
.os-toggle:active {
    transform: scale(0.95);
}
.os-toggle .os-icon,
.os-toggle .os-close-icon {
    width: 24px;
    height: 24px;
    position: absolute;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.os-toggle .os-close-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

/* 展开态按钮 */
.online-service.open .os-toggle {
    animation: none;
    background: rgba(96, 42, 166, 0.15);
    color: var(--primary);
}
.online-service.open .os-toggle .os-icon {
    opacity: 0;
    transform: rotate(90deg);
}
.online-service.open .os-toggle .os-close-icon {
    opacity: 1;
    transform: rotate(0deg);
}
.online-service.open .os-toggle:hover {
    background: rgba(96, 42, 166, 0.2);
}

/* 脉冲动画 */
@keyframes os-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(96, 42, 166, 0.35); }
    50% { box-shadow: 0 4px 16px rgba(96, 42, 166, 0.35), 0 0 0 8px rgba(96, 42, 166, 0.08); }
}

/* 展开面板 */
.os-panel {
    position: absolute;
    bottom: 64px;
    right: 0;
    width: 300px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom right;
}
.online-service.open .os-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* 面板头部 */
.os-panel-header {
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
}
.os-panel-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}
.os-panel-subtitle {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.4;
}

/* 面板内容 */
.os-panel-body {
    padding: 16px 20px 20px;
}

/* 联系方式列表 */
.os-contact-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}
.os-contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    color: inherit;
}
.os-contact-item:hover {
    background: var(--bg-light);
}
.os-contact-icon {
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: 10px;
    background: var(--bg-light);
    color: var(--primary);
    flex-shrink: 0;
}
.os-contact-item:hover .os-contact-icon {
    background: rgba(96, 42, 166, 0.12);
}
.os-contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.os-contact-label {
    font-size: 13px;
    color: var(--gray-text);
}
.os-contact-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

/* 服务时间 */
.os-service-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}
.os-time-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #999;
}

/* 客服 Toast */
.os-toast {
    position: fixed;
    bottom: 170px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 3001;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    white-space: nowrap;
}
.os-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/**  Mobile CSS **/
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
}

.mobile-menu-toggle span:nth-child(1) {
    transform: translateY(-7px);
}

.mobile-menu-toggle span:nth-child(2) {
    transform: translateY(0);
}

.mobile-menu-toggle span:nth-child(3) {
    transform: translateY(7px);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(0) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
}

.footer {
    padding: 20px;
    background-color: var(--primary);
    margin-top: auto;
}
.footer p {
    color: var(--white);
    text-align: center;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive: 1200px ===== */
@media (max-width: 1200px) {
    .hero {
        margin-top: 0px;
    }
    .hero-content {
        flex-direction: column;
        gap: 40px;
    }

    .hero-left {
        max-width: 100%;
    }

    .hero-right {
        width: 100%;
    }

    .hero-cards {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 60px;
    }

    .hero-card {
        width: calc(50% - 12px);
        min-width: 280px;
    }
}

/* ===== Responsive: 900px ===== */
@media (max-width: 900px) {
    .container {
        padding: 0 40px;
    }

    .hero {
        min-height: auto;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-main-title {
        font-size: 56px;
    }

    .hero-subtitle {
        font-size: 28px;
    }

    .hero-description {
        font-size: 18px;
    }

    .hero-features {
        gap: 40px;
    }

    .hero-card {
        width: calc(50% - 12px);
    }

    .hero-card-title {
        font-size: 22px;
    }

    .hero-card-desc {
        font-size: 16px;
    }

    .faq-title {
        font-size: 40px;
    }

    .faq-question-text {
        font-size: 20px;
    }

    .faq-answer {
        font-size: 16px;
    }
    .floating-cta {
        opacity: 0!important;
    }
}

/* ===== Responsive: 600px ===== */
@media (max-width: 600px) {
    .container {
        padding: 0 20px;
    }

    .header .container {
        padding: 12px 20px;
    }

    .header-nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        padding: 0 24px;
        gap: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
    }

    .header-nav.open {
        max-height: 400px;
        opacity: 1;
        padding: 16px 24px;
        gap: 8px;
    }

    .header-nav a {
        padding: 10px 0;
        border-bottom: 1px solid #f0ebf8;
        width: 100%;
        opacity: 1 !important;
        font-size: 16px;
        transform: translateX(-10px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .header-nav.open a {
        transform: translateX(0);
        opacity: 0.8;
    }

    .header-nav.open a:last-child {
        border-bottom: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-slide-bg .banner-img img {
        object-fit: contain;
    }
    .hero-decor {
        display: none;
    }

    .hero-content {
        padding-top: 30px;
        gap: 32px;
    }

    .hero-title-group {
        gap: 12px;
    }

    .hero-title-icon {
        width: 32px;
        height: 32px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-cards {
        flex-direction: column;
        align-items: center;
        margin-top: 40px;
        gap: 16px;
    }

    .hero-card {
        width: 100%;
        max-width: 360px;
    }

    .hero-right {
        gap: 32px;
    }

    .hero-main-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 22px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-features {
        flex-direction: column;
        gap: 24px;
    }

    .hero-features-col, .hero-features-col.right-col {
        width: 100%;
    }

    .hero-feature-item {
        height: auto;
        min-height: 50px;
    }

    .hero-cta-btn {
        font-size: 20px;
        width: 220px;
        height: 52px;
    }

    .floating-cta .pill-btn {
        font-size: 20px;
        padding: 12px 20px;
    }

    .faq-section {
        padding: 60px 0 80px;
    }

    .faq-header {
        gap: 12px;
        margin-bottom: 40px;
        flex-wrap: wrap;
    }

    .faq-title {
        font-size: 30px;
    }

    .faq-question-text {
        font-size: 16px;
        line-height: 24px;
    }

    .faq-answer {
        font-size: 14px;
        line-height: 22px;
    }

    .header-actions .btn-yellow, .header-actions .btn-purple {
        display: none;
    }

    .online-service {
        bottom: 100px;
        right: 30px;
    }
    .os-panel {
        width: 280px;
        right: 0;
    }
    .os-toggle {
        width: 48px;
        height: 48px;
    }
}

/* ===== Responsive: 375px ===== */
@media (max-width: 375px) {
    .hero-title {
        font-size: 30px;
    }

    .hero-main-title {
        font-size: 34px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-card-title {
        font-size: 20px;
    }

    .hero-card-desc {
        font-size: 14px;
    }

    .hero-feature-label {
        font-size: 20px;
    }

    .faq-title {
        font-size: 26px;
    }
}

/* ===== Safe area for notched devices ===== */
@supports (padding: env(safe-area-inset-top)) {
    .header {
        padding-top: env(safe-area-inset-top);
    }

    .floating-cta {
        bottom: calc(40px + env(safe-area-inset-bottom));
    }
}

/* ===== Appointment Modal（全局弹窗） ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    width: 800px;
    height: 480px;
    background: #FEFEFE;
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 16px;
    height: 16px;
    stroke: #666;
    stroke-width: 2;
}

.modal-left {
    position: absolute;
    left: 0;
    top: 40px;
    width: 400px;
    height: 400px;
}

.modal-left .img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-right {
    position: absolute;
    right: 0;
    top: 0;
    width: 380px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 40px;
}

.modal-title {
    font-size: 36px;
    font-weight: 900;
    color: var(--primary);
    text-align: center;
    line-height: 1.4;
    margin-bottom: 28px;
}

.modal-title .highlight {
    color: var(--yellow);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.modal-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    border: 1px solid #666666;
    border-radius: 8px;
    padding: 8px;
    background: transparent;
    transition: border-color 0.2s ease;
}

.modal-input-group:focus-within {
    border-color: var(--primary);
}

.modal-input-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.modal-input {
    width: 100px;
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
    line-height: 24px;
    background: transparent;
    font-family: var(--font-family);
}

.modal-input::placeholder {
    color: #A79EB1;
}

.modal-verify-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.modal-verify-separator {
    width: 1px;
    height: 16px;
    background: #A79EB1;
}

.modal-btn-verify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 96px;
    height: 32px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: var(--font-family);
}

.modal-btn-verify:hover {
    background: var(--primary-dark);
}

.modal-btn-verify:active {
    transform: scale(0.97);
}

.modal-btn-verify.counting {
    background-color: var(--primary-dark);
    color: var(--white);
    pointer-events: none;
    cursor: not-allowed;
}

.modal-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    line-height: 28px;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: var(--font-family);
}

.modal-btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.modal-btn-submit:active {
    transform: scale(0.98);
}

.modal-btn-submit.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 弹窗协议链接 +勾选框 */
.modal-agreement {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    text-align: center;
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    cursor: default;
}
.modal-agreement a {
    color: var(--primary);
    text-decoration: none;
}
.modal-agreement a:hover {
    text-decoration: underline;
}
.modal-agreement-box {
    width: 16px;
    height: 16px;
    border: 1px solid #999;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: transparent;
    position: relative;
}
.modal-agreement-box.checked {
    background: var(--primary);
    border-color: var(--primary);
}
.modal-agreement-box.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: bold;
}

/* 弹窗注册/登录切换 */
.modal-switch {
    margin: 0;
    text-align: center;
    font-size: 14px;
    color: #666;
}
.modal-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.modal-switch a:hover {
    text-decoration: underline;
}

/* 弹窗登录按钮留白 */
#modalLoginForm .modal-btn-submit {
    margin-top: 12px;
}

/* 协议弹窗 */
.agreement-container {
    position: relative;
    width: 860px;
    max-width: 92vw;
    height: 80vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}
.agreement-container .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}
.agreement-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive for modal - 1200px */
@media screen and (max-width: 1200px) {
    .modal-container {
        width: 700px;
        height: 460px;
    }
    .modal-left {
        width: 350px;
        height: 380px;
        top: 40px;
    }
    .modal-right {
        width: 340px;
        padding: 0 30px;
    }
    .modal-title {
        font-size: 32px;
        margin-bottom: 24px;
    }
}

/* Responsive for modal - 900px */
@media screen and (max-width: 900px) {
    .modal-container {
        width: 90vw;
        max-width: 500px;
        height: auto;
        min-height: 420px;
    }
    .modal-left {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: 180px;
    }
    .modal-right {
        position: relative;
        right: auto;
        top: auto;
        width: 100%;
        padding: 24px 30px 32px;
    }
    .modal-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    .modal-form {
        gap: 16px;
    }
    .modal-input-group {
        height: 46px;
    }
    .modal-btn-verify {
        width: 90px;
        height: 30px;
        font-size: 15px;
    }
    .modal-btn-submit {
        height: 46px;
    }
}

/* Responsive for modal - 600px */
@media screen and (max-width: 600px) {
    .modal-container {
        width: 95vw;
        min-height: 400px;
    }
    .modal-left {
        height: 150px;
    }
    .modal-right {
        padding: 20px 24px 28px;
    }
    .modal-title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    .modal-form {
        gap: 14px;
    }
    .modal-input-group {
        height: 44px;
        padding: 6px;
    }
    .modal-input {
        font-size: 15px;
    }
    .modal-input-icon {
        width: 20px;
        height: 20px;
    }
    .modal-btn-verify {
        width: 84px;
        height: 28px;
        font-size: 14px;
    }
    .modal-btn-submit {
        height: 44px;
        font-size: 16px;
    }
}

/* Responsive for modal - 375px */
@media screen and (max-width: 375px) {
    .modal-right {
        padding: 16px 20px 24px;
    }
    .modal-title {
        font-size: 22px;
    }
    .modal-input {
        font-size: 14px;
    }
    .modal-btn-verify {
        width: 78px;
        height: 26px;
        font-size: 13px;
    }
}