/* 推广系统前端样式 */

.dpm-referral-center-widget {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Tab 导航样式 */
.dpm-tab-navigation {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.dpm-tab-button {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    text-align: center;
}

.dpm-tab-button:hover {
    background: #e9ecef;
    color: #333;
}

.dpm-tab-button.active {
    background: #fff;
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

/* Tab 内容样式 */
.dpm-tab-content {
    position: relative;
}

.dpm-tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.dpm-tab-panel.active {
    display: block;
}

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

.dpm-widget-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.dpm-widget-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

/* 推广数据面板 */
.dpm-referral-dashboard {
    padding: 20px;
}

.dpm-dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.dpm-dashboard-header h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
}

.dpm-dashboard-description {
    color: #666;
    margin: 0;
}

.dpm-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.dpm-stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dpm-stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.dpm-stat-label {
    font-size: 14px;
    color: #666;
}

.dpm-dashboard-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.dpm-dashboard-section h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.dpm-link-copy {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.dpm-link-copy input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.dpm-link-copy button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.dpm-link-copy button:hover {
    background: #5a67d8;
}

.dpm-link-help {
    font-size: 14px;
    color: #666;
    margin: 5px 0 0 0;
}

/* 推广奖励卡密 */
.dpm-earned-passwords {
    display: grid;
    gap: 10px;
}

.dpm-password-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.dpm-password-code {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dpm-password-code code {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

.dpm-password-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.dpm-password-status.inactive {
    background: #ffeaa7;
    color: #d63031;
}

.dpm-password-status.active {
    background: #55efc4;
    color: #00b894;
}

.dpm-password-status.expired {
    background: #fab1a0;
    color: #e17055;
}

.dpm-password-status.permanent {
    background: #a29bfe;
    color: #6c5ce7;
}

.dpm-password-meta {
    display: flex;
    gap: 15px;
}

.dpm-password-meta small {
    color: #666;
    font-size: 12px;
}

.dpm-no-passwords {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* 推广进度 */
.dpm-progress-info {
    margin-top: 10px;
}

.dpm-progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.dpm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.dpm-progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* 查询面板样式 */
.dpm-query-section {
    padding: 20px;
}

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

.dpm-section-header h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
}

.dpm-section-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.dpm-query-form {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.dpm-query-form .dpm-form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
    text-align: center;
}

.dpm-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
    max-width: 520px;
    margin: 0 auto;
}

.dpm-query-input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dpm-query-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.dpm-query-input::placeholder {
    color: #9ca3af;
    font-size: 14px;
}

.dpm-query-button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 100px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.dpm-query-button:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dpm-query-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.dpm-query-result {
    margin-top: 25px;
}

.dpm-query-help {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dpm-help-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.dpm-help-card h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.dpm-help-card ul {
    margin: 0;
    padding-left: 20px;
}

.dpm-help-card li {
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* 注册面板样式 */
.dpm-register-section {
    padding: 20px;
}

.dpm-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.dpm-benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dpm-benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dpm-benefit-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.dpm-benefit-text {
    flex: 1;
}

.dpm-benefit-text strong {
    display: block;
    color: #333;
    font-size: 14px;
    margin-bottom: 3px;
}

.dpm-benefit-text small {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* 注册表单 */
.dpm-referral-register {
    padding: 20px;
}

.dpm-register-header {
    text-align: center;
    margin-bottom: 30px;
}

.dpm-register-header h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
}

.dpm-register-description {
    color: #666;
    margin: 0;
}

.dpm-register-benefits {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #28a745;
}

.dpm-register-benefits h5 {
    margin: 0 0 15px 0;
    color: #333;
}

.dpm-register-benefits ul {
    margin: 0;
    padding-left: 20px;
}

.dpm-register-benefits li {
    margin-bottom: 8px;
    color: #555;
}

.dpm-register-form-section {
    margin-bottom: 30px;
}

.dpm-form-group {
    margin-bottom: 20px;
}

.dpm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.dpm-register-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.dpm-register-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.dpm-form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.dpm-register-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dpm-register-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.dpm-register-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 查询表单 */
.dpm-code-query-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #17a2b8;
}

.dmp-code-query-section h5 {
    margin: 0 0 10px 0;
    color: #333;
}

.dpm-query-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}


/* 提示信息 */
.dpm-register-tips {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.dpm-register-tips h5 {
    margin: 0 0 15px 0;
    color: #333;
}

.dpm-register-tips ul {
    margin: 0;
    padding-left: 20px;
}

.dpm-register-tips li {
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

/* 消息样式 */
.dpm-register-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
}

.dpm-success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dpm-error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dpm-tab-button {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .dpm-dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dpm-link-copy,
    .dpm-input-group {
        flex-direction: column;
    }
    
    .dpm-query-form {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .dpm-input-group {
        flex-direction: column;
        gap: 15px;
        max-width: 100%;
    }
    
    .dpm-query-input {
        padding: 16px 18px;
        font-size: 16px; /* 防止iOS缩放 */
        border-radius: 10px;
    }
    
    .dpm-query-button {
        padding: 16px 24px;
        font-size: 16px;
        border-radius: 10px;
        width: 100%;
        min-width: auto;
    }
    
    .dpm-query-help {
        grid-template-columns: 1fr;
    }
    
    .dpm-benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .dpm-password-code {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .dpm-password-meta {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .dpm-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .dpm-referral-center-widget {
        margin: 10px;
        border-radius: 6px;
    }
    
    .dpm-widget-header,
    .dpm-referral-dashboard,
    .dpm-referral-register {
        padding: 15px;
    }
}
