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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.auth-container {
    display: flex;
    max-width: 620px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 24px;
    justify-content: center;
    align-items: center;
}

/* Left Panel */
.auth-left {
    display: none;
}

.auth-branding h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.tagline {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 34px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 12px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(10px);
}

.feature-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.feature-card h3 {
    font-size: 17px;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.45;
}

.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid white;
}

.testimonial p {
    font-size: 16px;
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.6;
}

.testimonial span {
    font-size: 14px;
    opacity: 0.9;
}

/* Right Panel */
.auth-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f0f0f0;
    padding: 5px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #666;
    transition: all 0.3s;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #333;
}

.form-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

.login-helper {
    color: #666;
    font-size: 13px;
    margin-top: 12px;
    line-height: 1.5;
}

.membership-card {
    margin-top: 20px;
    border: 1px solid #e8ebef;
    border-radius: 12px;
    padding: 16px;
    background: #fafbfc;
}

.membership-card h3 {
    font-size: 18px;
    color: #2a2f36;
    margin-bottom: 4px;
}

.membership-price {
    font-size: 20px;
    font-weight: 700;
    color: #d9480f;
    margin-bottom: 8px;
}

.membership-tip {
    font-size: 13px;
    color: #5b6470;
    line-height: 1.5;
    margin-bottom: 12px;
}

.membership-qrcode {
    width: 220px;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid #dfe3e8;
    display: block;
    margin: 0 auto 14px;
}

.membership-activate label {
    display: block;
    font-size: 13px;
    color: #4f5965;
    margin-bottom: 8px;
    font-weight: 600;
}

.membership-input-group {
    display: flex;
    gap: 8px;
}

.membership-input-group input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d8dde5;
    font-size: 14px;
}

.btn-membership {
    padding: 0 14px;
    border: 1px solid #2b6df6;
    background: #2b6df6;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-membership:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

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

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.code-input-group {
    display: flex;
    gap: 10px;
}

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

.btn-send-code {
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-send-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-send-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

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

.form-agreement .checkbox-label {
    align-items: flex-start;
}

.form-agreement a {
    color: #667eea;
    text-decoration: none;
}

.form-agreement a:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.back-home {
    margin-top: 25px;
    text-align: center;
}

.back-home a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.back-home a:hover {
    transform: translateX(-5px);
}

/* Error/Success Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-container {
        padding: 20px 16px;
    }

    .auth-branding h1 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .auth-card {
        padding: 30px 25px;
    }

    .auth-form h2 {
        font-size: 24px;
    }

    .code-input-group,
    .membership-input-group {
        flex-direction: column;
    }

    .btn-send-code,
    .btn-membership {
        width: 100%;
    }

    .auth-left {
        padding: 20px;
    }

    .auth-branding h1 {
        font-size: 28px;
    }

    .tagline {
        font-size: 16px;
    }
}

/* 小屏幕手机 (最大480px) */
@media (max-width: 480px) {
    .auth-container {
        padding: 20px 15px;
    }

    .auth-left {
        padding: 15px;
    }

    .auth-branding h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .tagline {
        font-size: 15px;
        margin-bottom: 40px;
    }

    .features-list {
        gap: 20px;
        margin-bottom: 40px;
    }

    .feature-card {
        padding: 20px;
    }

    .feature-icon {
        font-size: 28px;
    }

    .feature-card h3 {
        font-size: 18px;
    }

    .feature-card p {
        font-size: 14px;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .auth-tabs {
        gap: 8px;
        padding: 4px;
    }

    .tab-btn {
        padding: 10px;
        font-size: 14px;
    }

    .auth-form h2 {
        font-size: 22px;
    }

    .form-subtitle {
        font-size: 14px;
    }

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

    .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .btn-submit {
        padding: 14px;
        font-size: 15px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn-submit:hover,
    .btn-send-code:hover,
    .tab-btn:hover,
    .feature-card:hover {
        transform: none;
    }

    .btn-submit:active,
    .btn-send-code:active,
    .tab-btn:active {
        transform: scale(0.98);
    }

    .feature-card:active {
        transform: translateX(0);
    }

    /* 增大触摸目标 */
    .btn-submit,
    .btn-send-code,
    .tab-btn {
        min-height: 44px;
    }
}

/* 横屏模式优化 */
@media (max-width: 896px) and (orientation: landscape) {
    .auth-container {
        padding: 20px;
    }

    .features-list {
        gap: 15px;
        margin-bottom: 30px;
    }

    .feature-card {
        padding: 15px 20px;
    }

    .testimonial {
        padding: 20px;
    }
}
