/**
 * 半糖书屋 - 邀请好友页面样式
 * 设计理念：温馨邀请 × 社交分享
 */

/* ========================================
   邀请码卡片
   ======================================== */
.invite-card {
    padding: 40px 32px;
    text-align: center;
    background: linear-gradient(135deg, #fff9f0 0%, #fff5e6 100%);
}

.invite-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.invite-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ff6b9d 0%, #e91e63 100%);
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(233, 30, 99, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.invite-icon i {
    font-size: 36px;
    color: #fff;
}

.invite-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink-black);
}

/* 邀请码展示 */
.invite-code-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.invite-code {
    padding: 16px 32px;
    font-size: 32px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 6px;
    color: var(--primary-color);
    background: var(--white);
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius);
    user-select: all;
}

.btn-copy {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.btn-copy:hover {
    background: var(--accent-cream);
    border-color: var(--primary-color);
}

.btn-copy:active {
    transform: scale(0.95);
}

.btn-copy i {
    font-size: 20px;
    color: var(--primary-color);
}

/* 邀请链接 */
.invite-link-wrapper {
    margin-bottom: 32px;
}

.invite-link-wrapper label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.invite-link-input {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.invite-link-input input {
    flex: 1;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-color);
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-overflow: ellipsis;
}

.invite-link-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 分享按钮组 */
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.share-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-book-hover);
}

.share-btn i {
    font-size: 28px;
}

.share-btn span {
    font-size: 13px;
    color: var(--text-color);
}

.share-btn--wechat i { color: #07c160; }
.share-btn--qq i { color: #12b7f5; }
.share-btn--weibo i { color: #e6162d; }

.share-btn--wechat:hover { border-color: #07c160; background: #f0fff4; }
.share-btn--qq:hover { border-color: #12b7f5; background: #f0f9ff; }
.share-btn--weibo:hover { border-color: #e6162d; background: #fff0f0; }

/* ========================================
   奖励规则
   ======================================== */
.reward-rules {
    margin-top: 32px;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-book);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, var(--paper-cream) 0%, var(--paper-aged) 100%);
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-smooth);
}

.rule-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-card);
}

.rule-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-card);
}

.rule-icon i {
    font-size: 24px;
    color: #fff;
}

.rule-icon--inviter {
    background: linear-gradient(145deg, #ff9800 0%, #f57c00 100%);
}

.rule-icon--invitee {
    background: linear-gradient(145deg, #4caf50 0%, #388e3c 100%);
}

.rule-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rule-title {
    font-size: 14px;
    color: var(--text-light);
}

.rule-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.rules-tips {
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

.rules-tips p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.rules-tips p:last-child {
    margin-bottom: 0;
}

.rules-tips i {
    color: var(--primary-color);
}

/* ========================================
   邀请统计
   ======================================== */
.invite-stats {
    margin-top: 32px;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-book);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    padding: 24px;
    text-align: center;
    background: linear-gradient(135deg, var(--paper-cream) 0%, var(--paper-aged) 100%);
    border-radius: var(--radius);
    transition: all 0.3s var(--ease-smooth);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-book);
}

.stat-card--highlight {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-card--highlight .stat-value {
    color: #f57c00;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

/* ========================================
   邀请记录
   ======================================== */
.invite-records {
    margin-top: 32px;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-book);
}

.record-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s var(--ease-smooth);
}

.record-item:last-child {
    border-bottom: none;
}

.record-item:hover {
    background: var(--paper-cream);
}

.record-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--accent-cream);
}

.record-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.record-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.record-time {
    font-size: 12px;
    color: var(--text-light);
}

.record-status {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.record-status--completed {
    color: #059669;
    background: #d1fae5;
}

.record-status--pending {
    color: #d97706;
    background: #fef3c7;
}

.record-status--expired {
    color: #6b7280;
    background: #f3f4f6;
}

.record-reward {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

/* 空状态 */
.records-empty {
    padding: 60px 20px;
    text-align: center;
}

.records-empty i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 16px;
}

.records-empty p {
    font-size: 14px;
    color: var(--text-light);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .invite-card {
        padding: 32px 20px;
    }

    .invite-icon {
        width: 64px;
        height: 64px;
    }

    .invite-icon i {
        font-size: 28px;
    }

    .invite-code {
        padding: 12px 20px;
        font-size: 24px;
        letter-spacing: 4px;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .share-btn {
        flex: 1;
        min-width: 80px;
        padding: 12px 16px;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .record-item {
        flex-wrap: wrap;
    }

    .record-info {
        flex-basis: calc(100% - 64px);
    }

    .record-status,
    .record-reward {
        margin-left: 64px;
    }
}
