/* ===========================
   弹窗相关样式
=========================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    background: transparent;
    border-radius: 24px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    transform: translateY(-30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 用户资料弹窗特殊样式覆盖 */
.modal-content.profile-modal {
    max-width: 420px !important;
    width: 100% !important;
}

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: #fff;
    color: #111827;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* ===========================
   支付弹窗样式
=========================== */

.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.payment-modal .modal-content {
    background: white;
    border-radius: 24px;
    padding: 0;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(229, 231, 235, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    transform: translateY(0);
    margin: auto;
}

.payment-modal .modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-modal .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.payment-modal .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.payment-modal .close-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.payment-modal .modal-body {
    padding: 16px 24px 24px;
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 支付方式切换样式 */
.payment-methods {
    margin: 12px 0;
}

.method-tabs {
    display: flex;
    border-radius: 8px;
    background: #f3f4f6;
    padding: 4px;
    gap: 4px;
}

.method-tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.method-tab:hover {
    background: #e5e7eb;
    color: #374151;
}

.method-tab.active {
    background: white;
    color: #1f2937;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.method-tab svg {
    width: 16px;
    height: 16px;
}

.product-info {
    text-align: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.product-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.price-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.payment-steps {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.payment-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.payment-steps .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 60%;
    right: -40%;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
}

.payment-steps .step.active:not(:last-child)::after {
    background: #19dca8;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 2;
}

.step.active .step-number {
    background: #19dca8;
    color: white;
}

.step-text {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.step.active .step-text {
    color: #19dca8;
    font-weight: 500;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 12px 0;
    padding: 12px;
    gap: 8px;
}

.qr-code-display {
    width: 220px;
    height: 220px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    position: relative;
    overflow: hidden;
}

.qr-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    padding: 8px;
}

.qr-image-container img {
    width: 100% !important;
    height: auto !important;
    max-width: 200px !important;
    max-height: 200px !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 4px !important;
    object-fit: contain;
}

.qr-instructions {
    font-size: 12px !important;
    color: #6b7280 !important;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

.qr-image-container p {
    display: none !important;
}

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6b7280;
}

.qr-loading .loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #19dca8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.qr-loading p {
    margin: 0;
    font-size: 12px;
}

.qr-error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 16px;
}

.qr-error-container .error-message {
    text-align: center;
    width: 100%;
}

.qr-error-container .error-message p {
    margin: 0 0 8px 0;
    font-size: 12px;
}

.qr-error-container .error-message button {
    font-size: 12px;
    padding: 6px 12px;
}

/* 支付宝不支持提示样式 */
.alipay-not-supported {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 16px;
}

.not-supported-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
}

.not-supported-icon {
    color: #f59e0b;
    flex-shrink: 0;
}

.not-supported-text {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.not-supported-subtitle {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

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

/* ===========================
   邀请弹窗样式 - 大小样式控制区域
=========================== */

/* 🔧 邀请弹窗尺寸控制 - 开始位置：约第378行
   📁 文件位置：modal-styles.css 第378-395行  
   🔗 对应的编辑资料弹窗样式：login-styles.css 第306-320行 */
.invite-modal {
    max-width: 420px;        /* 🎯 弹窗最大宽度 - 统一按登录弹窗标准 */
    width: 100%;             /* 🎯 弹窗相对宽度 - 统一按登录弹窗标准 */
}

.invite-modal .modal-content {
    background: white;
    border-radius: 24px;     /* 🎯 圆角大小 - 统一按登录弹窗标准 */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* 🎯 阴影 - 统一按登录弹窗标准 */
    border: 1px solid rgba(229, 231, 235, 0.3); /* 🎯 边框 - 统一按登录弹窗标准 */
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(10px); /* 🎯 背景模糊 - 统一按登录弹窗标准 */
}

.invite-container {
    padding: 24px 24px;      /* 🎯 优化内边距 - 减少垂直空间占用 */
    background: white;       /* 🎯 背景色 - 统一按登录弹窗标准 */
}

.invite-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px 0;
    text-align: center;
    letter-spacing: -0.5px;
}

.invite-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 20px 0;    /* 🎯 减少底部间距 */
    text-align: center;
    line-height: 1.5;
}

/* 简化版用户秘钥区域样式 */
.simple-key-section {
    margin-bottom: 16px;
}

.simple-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.simple-input-container {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.simple-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    background: #f9fafb;
    color: #374151;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.simple-input:focus {
    outline: none;
    border-color: #19dca8;
    background: white;
    box-shadow: 0 0 0 3px rgba(25, 220, 168, 0.1);
}

.user-key-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #dc2626, #ef4444);
}

.user-key-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 8px;    /* 🎯 减少标签与输入框间距 */
    letter-spacing: -0.2px;
}

.user-key-container {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.user-key-input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid #f87171;
    border-radius: 10px;
    font-size: 12px;
    background: white;
    color: #991b1b;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.user-key-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* 简化版邀请链接区域样式 */
.simple-link-section {
    margin-bottom: 16px;
}

/* 简化版奖励说明样式 */
.simple-reward-section {
    margin-bottom: 16px;
}

.simple-reward-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #fffbeb;
    border-radius: 8px;
    border: 1px solid #fbbf24;
}

.simple-reward-content .reward-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.simple-reward-content .reward-text {
    font-size: 13px;
    color: #92400e;
    line-height: 1.4;
    font-weight: 500;
}

.simple-reward-content .reward-text strong {
    color: #92400e;
    font-weight: 700;
    font-size: 14px;
}

.invite-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;    /* 🎯 减少标签与输入框间距 */
    letter-spacing: -0.2px;
}

.invite-link-container {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.invite-link-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 13px;
    background: #f8fafc;
    color: #475569;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.invite-link-input:focus {
    outline: none;
    border-color: #19dca8;
    background: white;
    box-shadow: 0 0 0 3px rgba(25, 220, 168, 0.1);
}

.copy-btn {
    padding: 14px 20px;
    background: linear-gradient(135deg, #19dca8 0%, #16a085 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(25, 220, 168, 0.3);
}

.copy-btn:hover {
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(25, 220, 168, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

.invite-reward-section {
    margin-bottom: 12px;    /* 🎯 减少底部间距 */
}

.reward-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;              /* 🎯 减少图标与内容间距 */
    padding: 14px;          /* 🎯 减少内边距 */
    background: linear-gradient(135deg, #fef7cd 0%, #fef3c7 50%, #fed7aa 100%);
    border-radius: 12px;
    border: 2px solid #fbbf24;
    box-shadow: 0 2px 4px -1px rgba(251, 191, 36, 0.1);
    position: relative;
    overflow: hidden;
}

.reward-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #d97706, #f59e0b);
}

.reward-icon {
    font-size: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.reward-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 6px 0;     /* 🎯 减少标题与内容间距 */
    letter-spacing: -0.3px;
}

.reward-content p {
    font-size: 13px;
    color: #a16207;
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

.reward-content strong {
    color: #92400e;
    font-weight: 700;
    font-size: 16px;
}

.invite-help-section {
    text-align: center;
    padding-top: 4px;       /* 🎯 减少顶部间距 */
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;               /* 🎯 减少图标与文字间距 */
    color: #19dca8;
    text-decoration: none;
    font-size: 14px;        /* 🎯 稍微减小字体 */
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 10px 16px;     /* 🎯 减少内边距 */
    border-radius: 10px;    /* 🎯 稍微减小圆角 */
    background: rgba(25, 220, 168, 0.05);
    border: 1px solid rgba(25, 220, 168, 0.2);
}

.help-link:hover {
    color: #16a085;
    background: rgba(25, 220, 168, 0.1);
    border-color: rgba(25, 220, 168, 0.3);
    transform: translateY(-1px);
}

/* 响应式优化 */
@media (max-width: 640px) {
    .invite-container {
        padding: 32px 24px;
    }
    
    .invite-title {
        font-size: 24px;
    }
    
    .invite-link-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .copy-btn {
        justify-content: center;
    }
    
    .reward-card {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
} 