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

:root {
    --primary-color: #4158D0;
    --primary-dark: #2D3A8C;
    --secondary-color: #C850C0;
    --accent-gold: #FFCC70;
    --text-dark: #2C3E50;
    --text-gray: #666;
    --text-light: #999;
    --bg-light: #F8F9FA;
    --border-color: #E1E8ED;
    --success-color: #10B981;
    --error-color: #EF4444;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.18);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   容器和布局
   ============================================ */
.container {
    width: 100%;
    max-width: 480px;
    position: relative;
}

.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.main-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   标题区域
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 40px 25px 35px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.title-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    margin: 0 auto;
    border-radius: 2px;
    position: relative;
    z-index: 1;
}

/* ============================================
   信息卡片
   ============================================ */
.info-card {
    margin: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF8F0 100%);
    border-radius: var(--radius-md);
    border-left: 4px solid #FF6B6B;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.6s ease-out 0.2s backwards;
}

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

.info-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #FF6B6B;
    margin-top: 2px;
}

.info-icon svg {
    width: 100%;
    height: 100%;
}

.info-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.8;
    color: #8B5A3C;
}

/* ============================================
   表单样式
   ============================================ */
.form {
    padding: 30px 25px;
    animation: fadeIn 0.6s ease-out 0.3s backwards;
}

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

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

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.label-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-light);
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(65, 88, 208, 0.1);
}

.form-group input:hover:not(:focus) {
    border-color: #C0C9D4;
}

/* 验证码输入组 */
.verification-input {
    display: flex;
    gap: 12px;
}

.verification-input input {
    flex: 1;
}

.btn-send-code {
    flex-shrink: 0;
    padding: 0 24px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(65, 88, 208, 0.3);
}

.btn-send-code:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(65, 88, 208, 0.4);
}

.btn-send-code:active:not(:disabled) {
    transform: translateY(0);
}

.btn-send-code:disabled {
    background: linear-gradient(135deg, #BDBDBD 0%, #9E9E9E 100%);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(65, 88, 208, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(65, 88, 208, 0.45);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-arrow {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.btn-submit:hover .btn-arrow {
    transform: translateX(4px);
}

/* ============================================
   底部信息
   ============================================ */
.footer {
    padding: 30px 25px 35px;
    text-align: center;
    background: linear-gradient(to bottom, white 0%, #F8F9FA 100%);
    border-top: 1px solid var(--border-color);
}

.company-logo {
    width: 48px;
    height: 48px;
    margin: 0 auto 15px;
    color: var(--primary-color);
    opacity: 0.8;
}

.company-logo svg {
    width: 100%;
    height: 100%;
}

.company-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.company-slogan {
    font-size: 13px;
    color: var(--text-gray);
    letter-spacing: 2px;
}

/* ============================================
   Toast通知
   ============================================ */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--text-dark);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    max-width: 90%;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--error-color);
}

.toast.info {
    background: var(--primary-color);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .title {
        font-size: 24px;
    }

    .main-content {
        border-radius: var(--radius-md);
    }

    .header {
        padding: 35px 20px 30px;
    }

    .info-card {
        margin: 20px;
        padding: 16px;
        gap: 12px;
    }

    .info-text {
        font-size: 13px;
    }

    .form {
        padding: 25px 20px;
    }

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

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

    .form-group input {
        height: 48px;
        font-size: 14px;
    }

    .verification-input {
        flex-direction: column;
        gap: 10px;
    }

    .btn-send-code {
        width: 100%;
        height: 48px;
    }

    .btn-submit {
        height: 52px;
        font-size: 16px;
    }

    .footer {
        padding: 25px 20px 30px;
    }

    .toast {
        max-width: calc(100% - 30px);
    }
}

/* ============================================
   加载状态和动画
   ============================================ */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ============================================
   无障碍和可访问性
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   打印样式
   ============================================ */
@media print {
    body {
        background: white;
    }

    .bg-decoration,
    .toast {
        display: none;
    }

    .main-content {
        box-shadow: none;
    }
}