/**
 * 幸运精灵 Lucky Elf - 样式文件
 * 配色：主色#5DD3C3 活动红#FF6B6B
 */

/* ===== 基础样式 ===== */
:root {
    --primary-color: #5DD3C3;
    --primary-dark: #4BC4B4;
    --activity-red: #FF6B6B;
    --activity-red-dark: #E85555;
    --new-bg: #FFF0F5;
    --hot-bg: #FFF8E7;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #E0E0E0;
    --bg-light: #F5F5F5;
    --white: #FFFFFF;
    --success: #52C41A;
    --warning: #FAAD14;
    --error: #FF4D4F;
    
    --font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    
    --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 8px 24px rgba(0,0,0,0.16);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== 头部 ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-en {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.logo-cn {
    font-size: 12px;
    color: var(--text-secondary);
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    background: var(--primary-color);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* ===== 主视觉区 ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7DE3D3 100%);
    padding: 40px 16px;
    text-align: center;
    color: var(--white);
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.brand-name {
    margin-bottom: 20px;
}

.brand-en {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
}

.brand-cn {
    font-size: 14px;
    opacity: 0.9;
}

.activity-title {
    margin: 20px 0;
}

.title-main {
    font-size: 48px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.title-unit {
    font-size: 20px;
    font-weight: 600;
    color: var(--activity-red);
    margin-left: 4px;
}

.activity-subtitle {
    font-size: 18px;
    color: var(--activity-red);
    font-weight: 500;
    margin-bottom: 16px;
}

.activity-time {
    font-size: 12px;
    opacity: 0.9;
}

.hero-image {
    margin-top: 20px;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ===== 优惠券区域 ===== */
.coupons-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
}

.coupons-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.coupon-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.coupon-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.coupon-card-new {
    background: linear-gradient(135deg, var(--new-bg) 0%, var(--white) 100%);
    border-left: 4px solid #FF69B4;
}

.coupon-card-hot {
    background: linear-gradient(135deg, var(--hot-bg) 0%, var(--white) 100%);
    border-left: 4px solid #DAA520;
}

.coupon-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--white);
}

.coupon-card-new .coupon-tag {
    background: #FF69B4;
}

.coupon-card-hot .coupon-tag {
    background: #DAA520;
}

.coupon-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 0 8px;
}

.coupon-left {
    flex: 1;
}

.coupon-price {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
}

.price-symbol {
    font-size: 16px;
    color: var(--activity-red);
    font-weight: 600;
}

.price-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--activity-red);
    font-family: 'DIN Alternate', 'Arial', sans-serif;
}

.coupon-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.coupon-valid {
    font-size: 12px;
    color: var(--text-light);
}

.coupon-right {
    width: 100px;
    text-align: center;
}

.coupon-right img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.coupon-placeholder {
    font-size: 48px;
    line-height: 80px;
}

.coupon-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

.coupon-stats {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-receive {
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-xl);
    background: var(--activity-red);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-receive:hover:not(.disabled) {
    background: var(--activity-red-dark);
    transform: scale(0.98);
}

.btn-receive.disabled {
    background: var(--border-color);
    color: var(--text-light);
    cursor: not-allowed;
}

.no-coupon {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 16px;
}

/* ===== 规则区 ===== */
.rules-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
    background: var(--white);
    border-radius: var(--radius-lg);
}

.rules-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.rules-list {
    list-style: none;
    padding-left: 0;
}

.rules-list li {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 2;
}

/* ===== 客服区 ===== */
.service-section {
    max-width: 800px;
    margin: 24px auto;
    padding: 20px 16px;
    background: var(--white);
    border-radius: var(--radius-lg);
}

.service-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-item {
    font-size: 13px;
    color: var(--text-secondary);
}

.service-label {
    font-weight: 500;
}

/* ===== 底部 ===== */
.footer {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-light);
    font-size: 12px;
}

/* ===== 弹窗 ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 24px 16px;
    text-align: center;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--success);
    color: var(--white);
    font-size: 32px;
    line-height: 60px;
}

.success-text {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.qrcode-wrapper {
    margin: 16px auto;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: inline-block;
}

.qrcode-wrapper img {
    width: 180px;
    height: 180px;
}

.verify-code {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 12px;
}

.code {
    font-family: monospace;
    font-weight: 600;
    color: var(--activity-red);
    font-size: 16px;
    letter-spacing: 1px;
}

/* ===== 按钮 ===== */
.btn-primary {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--activity-red);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--activity-red-dark);
}

.btn-secondary {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 24px;
    background: rgba(0,0,0,0.8);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: 14px;
    z-index: 2000;
    display: none;
}

/* ===== 响应式 ===== */
@media screen and (min-width: 768px) {
    .title-main {
        font-size: 64px;
    }
    
    .coupons-section {
        padding: 40px 24px;
    }
    
    .coupon-card {
        padding: 20px;
    }
}

/* ===== 表单样式 ===== */
.form-group {
    margin-bottom: 16px;
}

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(93, 211, 195, 0.1);
}

.form-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--activity-red);
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.form-btn:hover {
    background: var(--activity-red-dark);
}

.form-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.form-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== 页面容器 ===== */
.page-container {
    max-width: 480px;
    margin: 40px auto;
    padding: 24px 16px;
}

.page-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
}

/* ===== 手机端二维码优化 ===== */
@media screen and (max-width: 480px) {
    .qrcode-wrapper {
        padding: 16px !important;
    }
    
    .qrcode-wrapper img {
        width: 180px !important;
        height: 180px !important;
        max-width: 100% !important;
    }
    
    .verify-code {
        font-size: 16px !important;
        word-break: break-all;
        padding: 8px !important;
    }
    
    .success-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
        line-height: 50px;
    }
    
    .modal-content {
        max-width: 95% !important;
    }
    
    .modal-body {
        padding: 16px !important;
    }
    
    /* 二维码盒子在手机端的样式 */
    .qrcode-box {
        padding: 16px !important;
    }
    
    .qrcode-box img {
        width: 180px !important;
        height: 180px !important;
        max-width: 100% !important;
    }
}
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
}
