/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 50%, #ffd3a5 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: #2d3436;
}

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

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(168, 230, 207, 0.3);
    padding: 25px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(168, 230, 207, 0.15);
}

.header-content {
    text-align: center;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-emoji {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(168, 230, 207, 0.3));
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00b894, #55a3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    color: #636e72;
    font-weight: 500;
}

/* 主内容区域 */
.main {
    padding: 40px 0;
}

/* 使用说明 */
.instructions {
    margin-bottom: 40px;
}

.instruction-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(168, 230, 207, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 桌面端详细步骤 */
.desktop-instructions {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

/* 移动端展开式教程 */
.mobile-instructions {
    display: none;
    flex-direction: column;
}

.mobile-tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.mobile-tutorial-header:hover {
    opacity: 0.8;
}

.mobile-tutorial-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #00b894, #55a3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
}

.expand-icon {
    font-size: 1rem;
    color: #00b894;
    font-weight: bold;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.expand-icon.expanded {
    transform: rotate(180deg);
}

.mobile-tutorial-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.mobile-tutorial-content.expanded {
    max-height: 300px;
    margin-top: 15px;
}

.mobile-tutorial-content .step {
    margin-bottom: 12px;
    padding: 15px;
    background: rgba(168, 230, 207, 0.1);
    border-radius: 10px;
    border-left: 4px solid #00b894;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-tutorial-content .step:last-child {
    margin-bottom: 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(168, 230, 207, 0.1), rgba(220, 237, 193, 0.1));
    padding: 15px 25px;
    border-radius: 15px;
    border: 2px solid rgba(168, 230, 207, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(168, 230, 207, 0.3);
    border-color: rgba(168, 230, 207, 0.4);
}

.step-number {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #00b894, #55a3ff);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.step-text {
    font-weight: 600;
    color: #2d3436;
    font-size: 1.05rem;
}

/* 优惠券区域 */
.coupons-section {
    margin-bottom: 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 35px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #00b894, #55a3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #636e72;
    font-weight: 500;
}

.coupons-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 25px;
}

/* 优惠券卡片 */
.coupon-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 30px rgba(168, 230, 207, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.coupon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00b894, #55a3ff, #fd79a8);
    border-radius: 20px 20px 0 0;
}

.coupon-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(168, 230, 207, 0.3);
    border-color: rgba(168, 230, 207, 0.5);
}

.coupon-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.platform-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    background: white;
    padding: 6px;
    box-shadow: 0 3px 12px rgba(168, 230, 207, 0.2);
}

.coupon-info {
    flex: 1;
}

.coupon-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 4px;
    line-height: 1.3;
}

.coupon-amount {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00b894, #55a3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.coupon-description {
    color: #636e72;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
    white-space: pre-line; /* 保持换行符 */
    word-wrap: break-word; /* 长文本自动换行 */
}

/* 复制区域 */
.copy-section {
    margin-top: 12px;
    width: 100%;
}

.copy-code-display {
    background: rgba(168, 230, 207, 0.1);
    border: 2px solid rgba(168, 230, 207, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: text;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.copy-code-display:hover {
    background: rgba(168, 230, 207, 0.2);
    border-color: rgba(168, 230, 207, 0.5);
}

.copy-code-display.selected {
    background: rgba(0, 184, 148, 0.1);
    border-color: #00b894;
}

.copy-label {
    font-size: 0.8rem;
    color: #636e72;
    font-weight: 600;
    flex-shrink: 0;
}

.copy-code-text {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 1rem;
    font-weight: 400;
    color: #2d3436;
    background: white;
    padding: 3px 6px;
    border-radius: 5px;
    margin-left: 6px;
    box-shadow: 0 2px 6px rgba(168, 230, 207, 0.2);
    word-break: break-all;
    flex: 1;
    text-align: center;
}

/* 复制按钮 */
.copy-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: 10px;
    margin-top: 14px;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    user-select: none;
}
.copy-btn { background: linear-gradient(135deg, #00b894, #55a3ff); }
.copy-btn:hover { background: linear-gradient(135deg, #55a3ff, #00b894); }
.copy-btn.qrcode-btn { background: linear-gradient(135deg, #fd79a8, #fdcb6e); }
.copy-btn.qrcode-btn:hover { background: linear-gradient(135deg, #fdcb6e, #fd79a8); }
.copy-btn.link-btn { background: linear-gradient(135deg, #74b9ff, #a29bfe); }
.copy-btn.link-btn:hover { background: linear-gradient(135deg, #a29bfe, #74b9ff); }

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.copy-btn:hover::before {
    left: 100%;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.4);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #00b894, #00cec9);
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.copy-success {
    color: #00b894;
    font-weight: 700;
}

/* 二维码按钮 */
.qr-btn {
    display: block;
    width: 100%;
    padding: 16px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #ffb199 0%, #ff0844 100%);
    border: none;
    border-radius: 16px;
    margin-top: 18px;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 16px rgba(255, 161, 161, 0.12);
    text-decoration: none;
}
.qr-btn:hover {
    background: linear-gradient(90deg, #ff0844 0%, #ffb199 100%);
    box-shadow: 0 8px 24px rgba(255, 161, 161, 0.18);
}

.qr-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(253, 121, 168, 0.4);
}

/* 二维码和链接跳转按钮只保留颜色，其他样式全部继承.action-btn */
.qr-btn.qrcode-btn {
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
}
.qr-btn.qrcode-btn:hover {
    background: linear-gradient(135deg, #fdcb6e, #fd79a8);
}
.qr-btn.link-btn {
    background: linear-gradient(135deg, #74b9ff, #a29bfe);
}
.qr-btn.link-btn:hover {
    background: linear-gradient(135deg, #a29bfe, #74b9ff);
}
/* 移除.qr-btn、.link-btn原有的padding、font-size、border-radius、margin-top等属性 */

/* 分类导航样式 */
.categories-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    margin: 20px 0;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(168, 230, 207, 0.15);
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.category-btn {
    background: rgba(0, 184, 148, 0.1);
    border: 2px solid rgba(0, 184, 148, 0.3);
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #2d3436;
    white-space: nowrap;
}

.category-btn:hover {
    background: rgba(0, 184, 148, 0.2);
    border-color: #00b894;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.2);
}

.category-btn.active {
    background: #00b894;
    border-color: #00b894;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

/* 二维码模态框 */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.qr-modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 350px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.qr-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: #636e72;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.qr-modal-close:hover {
    background: rgba(253, 121, 168, 0.1);
    color: #fd79a8;
}

.qr-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #00b894, #55a3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.qr-modal-code {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid rgba(168, 230, 207, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-modal-code > * {
    margin: 0 auto;
}

.qr-modal-hint {
    color: #636e72;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

/* 小贴士区域 */
.footer-info {
    margin-bottom: 40px;
}

.info-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(168, 230, 207, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.info-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #00b894, #55a3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 10px 0;
    color: #636e72;
    font-size: 1rem;
    position: relative;
    padding-left: 25px;
    line-height: 1.6;
}

.info-card li::before {
    content: '💡';
    position: absolute;
    left: 0;
    top: 10px;
}

/* 底部按钮 */
.footer-buttons {
    margin-top: 30px;
}

.bottom-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.bottom-btn {
    color: white;
    text-decoration: none;
    padding: 18px 35px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.bottom-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.bottom-btn:hover::before {
    left: 100%;
}

.bottom-btn.primary {
    background: linear-gradient(135deg, #00b894, #55a3ff);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.3);
}

.bottom-btn.secondary {
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
    box-shadow: 0 8px 25px rgba(253, 121, 168, 0.3);
}

.bottom-btn:hover {
    transform: translateY(-3px);
}

.bottom-btn.primary:hover {
    box-shadow: 0 12px 35px rgba(0, 184, 148, 0.4);
}

.bottom-btn.secondary:hover {
    box-shadow: 0 12px 35px rgba(253, 121, 168, 0.4);
}

/* 加载和状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #636e72;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(168, 230, 207, 0.3);
    border-top: 4px solid #00b894;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error, .no-data {
    text-align: center;
    padding: 40px 20px;
    color: #636e72;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(168, 230, 207, 0.2);
}

/* 复制提示 */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #00b894, #55a3ff);
    color: white;
    padding: 15px 30px;
    border-radius: 15px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 184, 148, 0.3);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

.copy-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main {
        padding: 30px 0;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .coupons-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* 移动端显示简化标题，隐藏详细步骤 */
    .desktop-instructions {
        display: none;
    }
    
    .mobile-instructions {
        display: flex;
    }
    
    .step {
        justify-content: center;
        width: 100%;
    }
    
    .bottom-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .bottom-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 20px 0;
    }
    
    .coupon-card {
        padding: 20px;
    }
    
    .info-card {
        padding: 25px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .copy-toast {
        left: 15px;
        right: 15px;
        transform: translateY(100px);
    }
    
    .copy-toast.show {
        transform: translateY(0);
    }
} 