/**
 * 二维码挪车系统 - 样式表
 * @author 罗志星
 * @date 2025-01-10
 * @description 基于CSS3的现代化样式系统，支持响应式设计和主题定制
 */

/* ==================== 全局重置 ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== CSS变量 - 主题配置 ==================== */
:root {
    /* 主题颜色 */
    --primary-color: #409eff;
    --primary-light: #66b1ff;
    --primary-dark: #3a8ee6;
    --success-color: #67c23a;
    --success-light: #85ce61;
    --success-dark: #5daf34;
    --info-color: #909399;
    --info-light: #a6a9ad;
    --info-dark: #82848a;
    --warning-color: #e6a23c;
    --warning-light: #ebb563;
    --warning-dark: #cf9236;
    --danger-color: #f56c6c;
    --danger-light: #f78989;
    --danger-dark: #dd6161;
    
    /* 背景颜色 */
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-hover: linear-gradient(135deg, #5f76e8 0%, #6d43a0 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-bg-hover: rgba(255, 255, 255, 1);
    --overlay-bg: rgba(0, 0, 0, 0.5);
    
    /* 文本颜色 */
    --text-primary: #303133;
    --text-regular: #606266;
    --text-secondary: #909399;
    --text-placeholder: #c0c4cc;
    --text-inverse: #ffffff;
    
    /* 边框颜色 */
    --border-color: #dcdfe6;
    --border-color-light: #e4e7ed;
    --border-color-lighter: #ebeef5;
    --border-color-dark: #d3d4d6;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.15);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing: 12px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
    --spacing-3xl: 40px;
    
    /* 字体大小 */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size: 16px;
    --font-size-md: 18px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 40px;
    
    /* 动画时长 */
    --transition-fast: 150ms;
    --transition: 300ms;
    --transition-slow: 500ms;
    
    /* 动画函数 */
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    
    /* 断点（供JavaScript使用） */
    --breakpoint-mobile: 768px;
    --breakpoint-tablet: 1024px;
    --breakpoint-desktop: 1440px;
    
    /* Z-index层级 */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    color: white;
    padding: 60px 0 40px;
}

.header h1 {
    font-size: 3em;
    margin-bottom: 15px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.3em;
    opacity: 0.95;
}

/* 主内容区 */
.main {
    max-width: 1200px;
    margin: 0 auto;
}

/* 功能卡片 */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.card p {
    color: var(--text-regular);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #66b1ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4);
}

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

.btn-success:hover {
    background: #85ce61;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 194, 58, 0.4);
}

.btn-info {
    background: var(--info-color);
    color: white;
    opacity: 0.6;
    cursor: not-allowed;
}

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

/* 分隔线 */
.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 50px 0;
}

/* 特性展示 */
.features {
    text-align: center;
    color: white;
    margin-top: 50px;
}

.features h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    padding: 30px 20px;
}

.feature-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.4em;
    margin-bottom: 12px;
}

.feature-item p {
    opacity: 0.9;
    font-size: 0.95em;
    line-height: 1.6;
}

/* 表单样式 */
.form-container {
    max-width: 600px;
    margin: 40px auto;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group .error {
    color: var(--danger-color);
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

.form-group.error .error {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--danger-color);
}

/* 二维码显示 */
.qrcode-container {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 12px;
    margin: 20px 0;
}

.qrcode-image {
    width: 300px;
    height: 300px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background: white;
    margin: 20px auto;
    display: block;
}

/* 表格样式 */
.table-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background: #f5f7fa;
    font-weight: 600;
    color: var(--text-primary);
}

table tr:hover {
    background: #f5f7fa;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-pending {
    background: #fdf6ec;
    color: #e6a23c;
}

.status-notified {
    background: #ecf5ff;
    color: #409eff;
}

.status-responded {
    background: #f0f9ff;
    color: #67c23a;
}

.status-completed {
    background: #f0f9ff;
    color: #67c23a;
}

.status-cancelled {
    background: #fef0f0;
    color: #f56c6c;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* 消息提示 */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.message.success {
    background: #f0f9ff;
    color: #67c23a;
    border: 1px solid #b3e19d;
}

.message.error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

.message.warning {
    background: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #f5dab1;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1.1em;
    }

    .feature-cards {
        grid-template-columns: 1fr;
    }

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

    .form-container {
        margin: 20px;
        padding: 25px;
    }

    .qrcode-image {
        width: 250px;
        height: 250px;
    }
}

/* 返回按钮 */
.back-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-button:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-hover);
}

.back-button::before {
    content: '←';
    margin-right: 8px;
    font-size: 1.2em;
}

/* 页面头部 */
.page-header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-header h1 {
    font-size: 1.8em;
    color: var(--text-primary);
}

/* ==================== 侧边隐私面板 ==================== */
.privacy-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition) var(--ease-in-out), 
                visibility var(--transition) var(--ease-in-out);
}

.privacy-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.privacy-panel {
    position: fixed;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-modal);
    overflow-y: auto;
    transition: transform var(--transition) var(--ease-in-out);
}

/* 桌面端：从右侧滑入 */
@media (min-width: 769px) {
    .privacy-panel {
        top: 0;
        right: 0;
        bottom: 0;
        width: 500px;
        transform: translateX(100%);
    }
    
    .privacy-panel-overlay.active .privacy-panel {
        transform: translateX(0);
    }
}

/* 移动端：从底部滑入 */
@media (max-width: 768px) {
    .privacy-panel {
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 80vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transform: translateY(100%);
    }
    
    .privacy-panel-overlay.active .privacy-panel {
        transform: translateY(0);
    }
}

.privacy-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color-light);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.privacy-panel-header h2 {
    margin: 0;
    font-size: var(--font-size-xl);
    color: var(--text-primary);
}

.privacy-panel-header .close-btn {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.privacy-panel-header .close-btn:hover {
    background: var(--border-color-lighter);
    color: var(--text-primary);
}

.privacy-panel-content {
    padding: 20px;
}

.privacy-section {
    margin-bottom: 30px;
}

.privacy-section h3 {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color-lighter);
}

.privacy-section p {
    line-height: 1.8;
    color: var(--text-regular);
    margin-bottom: 10px;
}

.privacy-section ul,
.privacy-section ol {
    margin-left: 20px;
    color: var(--text-regular);
    line-height: 1.8;
}

.privacy-section li {
    margin-bottom: 8px;
}

.privacy-section dl {
    margin-top: 10px;
}

.privacy-section dt {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 15px;
    margin-bottom: 5px;
}

.privacy-section dd {
    margin-left: 20px;
    color: var(--text-regular);
    line-height: 1.8;
}

/* 了解更多按钮/链接 */
.privacy-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--font-size-sm);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.privacy-trigger:hover {
    background: var(--border-color-lighter);
    color: var(--primary-dark);
}

.privacy-trigger::after {
    content: '→';
    transition: transform var(--transition-fast);
}

.privacy-trigger:hover::after {
    transform: translateX(3px);
}

/* ==================== 互动小人 Mascot ==================== */
.mascot-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    user-select: none;
}

.mascot {
    text-align: center;
    position: relative;
}

.mascot-body {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: mascotFloat 3s ease-in-out infinite;
}

.mascot-body:hover {
    transform: scale(1.05);
}

@keyframes mascotFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.mascot-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.mascot-eyes {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 32px;
    transition: all 0.3s ease;
}

.mascot-eye {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mascot-pupil {
    width: 10px;
    height: 10px;
    background: #2c3e50;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
}

.mascot-pupil::after {
    content: '';
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    right: 1px;
}

.mascot-mouth {
    width: 16px;
    height: 8px;
    border-bottom: 3px solid white;
    border-radius: 0 0 50% 50%;
    margin: 10px auto 0;
    transition: all 0.3s ease;
}

.mascot-blush {
    width: 14px;
    height: 8px;
    background: rgba(255, 150, 150, 0.5);
    border-radius: 50%;
    position: absolute;
    top: 62px;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.mascot-blush.left { left: 16px; }
.mascot-blush.right { right: 16px; }

.mascot-hands {
    position: absolute;
    width: 100%;
    top: 28px;
    pointer-events: none;
}

.mascot-hand {
    position: absolute;
    font-size: 28px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.mascot-hand.left {
    left: -20px;
    transform: rotate(30deg) scale(0.8);
    opacity: 0;
}

.mascot-hand.right {
    right: -20px;
    transform: rotate(-30deg) scale(0.8);
    opacity: 0;
}

.mascot-text {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    min-height: 22px;
}

/* === 小人状态 === */

/* 正常看着你 */
.mascot.state-idle .mascot-mouth {
    width: 16px;
    height: 8px;
    border-bottom: 3px solid white;
    border-radius: 0 0 50% 50%;
    border-top: none;
}

/* 看向输入框（眼球向下） */
.mascot.state-watching .mascot-pupil {
    transform: translate(-50%, 10%);
}

/* 输入手机号时（害羞捂眼） */
.mascot.state-shy .mascot-hand.left {
    opacity: 1;
    left: 20px;
    top: -2px;
    transform: rotate(0deg) scale(1);
}

.mascot.state-shy .mascot-hand.right {
    opacity: 1;
    right: 20px;
    top: -2px;
    transform: rotate(0deg) scale(1);
}

.mascot.state-shy .mascot-eye {
    height: 4px;
    margin-top: 9px;
}

.mascot.state-shy .mascot-blush {
    opacity: 1;
}

.mascot.state-shy .mascot-mouth {
    width: 12px;
    height: 6px;
}

/* 开心（注册成功） */
.mascot.state-happy .mascot-eye {
    height: 4px;
    margin-top: 9px;
    background: white;
}

.mascot.state-happy .mascot-mouth {
    width: 22px;
    height: 12px;
    border-bottom: 3px solid white;
    border-radius: 0 0 50% 50%;
}

.mascot.state-happy .mascot-blush {
    opacity: 1;
}

.mascot.state-happy .mascot-body {
    animation: mascotBounce 0.5s ease;
}

@keyframes mascotBounce {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.15); }
    60% { transform: scale(0.95); }
}

/* 思考（选择通知方式） */
.mascot.state-thinking .mascot-pupil {
    transform: translate(-20%, -30%);
}

.mascot.state-thinking .mascot-mouth {
    width: 8px;
    height: 8px;
    border: 3px solid white;
    border-radius: 50%;
    margin-top: 10px;
}

/* 输入邮箱（期待） */
.mascot.state-excited .mascot-eye {
    width: 24px;
    height: 24px;
}

.mascot.state-excited .mascot-pupil {
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
}

.mascot.state-excited .mascot-mouth {
    width: 20px;
    height: 10px;
    border-bottom: 3px solid white;
    border-radius: 0 0 50% 50%;
}

.mascot.state-excited .mascot-blush {
    opacity: 0.7;
}

/* 打招呼（挥手） */
.mascot.state-wave .mascot-hand.right {
    opacity: 1;
    right: -28px;
    top: -10px;
    transform: rotate(-15deg) scale(1);
    animation: mascotWave 0.6s ease-in-out 2;
}

@keyframes mascotWave {
    0%, 100% { transform: rotate(-15deg) scale(1); }
    50% { transform: rotate(15deg) scale(1); }
}

@media (max-width: 768px) {
    .mascot-body {
        width: 90px;
        height: 90px;
    }
    .mascot-eyes {
        gap: 14px;
        padding-top: 24px;
    }
    .mascot-eye {
        width: 18px;
        height: 18px;
    }
    .mascot-pupil {
        width: 8px;
        height: 8px;
    }
    .mascot-hand {
        font-size: 22px;
    }
    .mascot-mouth {
        margin-top: 6px;
    }
    .mascot-blush {
        top: 48px;
    }
    .mascot-blush.left { left: 10px; }
    .mascot-blush.right { right: 10px; }
    .mascot.state-shy .mascot-hand.left { left: 12px; }
    .mascot.state-shy .mascot-hand.right { right: 12px; }
}



