/* 基础样式 */
.mp-promotion-page,
.mp-promotion-list,
.mp-promotion-detail,
.mp-member-profile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mp-company-header {
    margin-bottom: 40px;
}

.mp-banner img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.mp-company-info {
    display: flex;
    align-items: center;
    margin-top: 20px;
    gap: 20px;
}

.mp-avatar {
    flex-shrink: 0;
}

.mp-company-details h2 {
    margin: 0 0 5px 0;
    color: #333;
}

.mp-username {
    color: #666;
    margin: 0 0 10px 0;
}

.mp-bio {
    color: #777;
    line-height: 1.5;
}

.mp-promotion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mp-promotion-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    transition: transform 0.2s;
}

.mp-promotion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mp-promotion-item.ended {
    opacity: 0.6;
}

.mp-promotion-item h4 {
    margin: 0 0 10px 0;
}

.mp-promotion-item h4 a {
    text-decoration: none;
    color: #333;
}

/* 按钮样式 */
.mp-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-right: 10px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.mp-btn:hover {
    background: #2980b9;
}

.mp-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.mp-btn.sponsor {
    background: #e74c3c;
}

.mp-btn.sponsor:hover {
    background: #c0392b;
}

/* 倒计时 */
.mp-countdown {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
    margin: 10px 0;
}

/* 会员卡详情样式 */
.mp-member-card-detail {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.mp-card-header {
    display: flex;
    gap: 30px;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mp-card-image {
    flex: 0 0 200px;
}

.mp-card-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.mp-card-info {
    flex: 1;
}

.mp-card-info h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
}

.mp-issuer {
    margin: 0 0 15px 0;
    font-size: 16px;
    opacity: 0.9;
}

.mp-card-description {
    line-height: 1.6;
    opacity: 0.9;
}

.mp-card-content {
    padding: 30px 40px;
}

.mp-public-content,
.mp-private-content {
    margin-bottom: 30px;
}

.mp-public-content h3,
.mp-private-content h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
}

.mp-card-actions {
    padding: 20px 40px !important;
    display: flex;
    gap: 15px;
    margin: 0;
    flex-wrap: wrap;
}

.mp-member-card-detail .mp-card-actions {
    padding: 30px 40px !important;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.mp-registered {
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.mp-members-section {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.mp-members-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

.mp-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.mp-member-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #007cba;
}

.mp-member-item img {
    border-radius: 50%;
}

.mp-member-info {
    flex: 1;
}

.mp-member-info strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.mp-member-info span {
    color: #666;
    font-size: 13px;
}

/* 会员资料页面样式 */
.mp-member-profile {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.mp-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mp-avatar img {
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
}

.mp-profile-info h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
}

.mp-email,
.mp-username {
    margin: 0;
    opacity: 0.9;
}

.mp-qr-code {
    text-align: center;
}

.mp-qr-code img {
    background: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.mp-rewards-section {
    padding: 30px 40px;
}

.mp-rewards-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 22px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.mp-rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.mp-reward-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.mp-reward-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mp-reward-item h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.mp-reward-item p {
    margin: 0 0 10px 0;
    color: #666;
    line-height: 1.4;
}

.mp-expiry {
    color: #dc3545 !important;
    font-size: 12px !important;
    margin-bottom: 15px !important;
}

/* 模态框样式 */
.mp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mp-modal {
    background: white;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.mp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.mp-modal-header h3 {
    margin: 0;
    color: #333;
}

.mp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.mp-modal-close:hover {
    color: #333;
}

.mp-modal-body {
    padding: 25px;
    text-align: center;
}

.mp-qr-image {
    margin-bottom: 20px;
}

.mp-qr-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 8px;
}

.mp-modal-message {
    color: #28a745;
    font-weight: 600;
    margin-bottom: 10px;
}

.mp-modal-note {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.mp-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mp-company-info {
        flex-direction: column;
        text-align: center;
    }
    
    .mp-promotion-grid {
        grid-template-columns: 1fr;
    }
    
    .mp-card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .mp-profile-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .mp-card-actions {
        justify-content: center;
    }
    
    .mp-members-grid {
        grid-template-columns: 1fr;
    }
    
    .mp-rewards-grid {
        grid-template-columns: 1fr;
    }
}

/* 登录提示样式 */
.mp-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.mp-login-required a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.mp-login-required a:hover {
    text-decoration: underline;
}

/* 促销详情页面样式 */
.mp-promotion-detail {
    max-width: 1000px;
    margin: 40px auto;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.mp-promotion-header {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mp-promotion-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.mp-promotion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.mp-promotion-header h1 {
    padding: 30px;
    color: white;
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mp-promotion-meta {
    padding: 25px 30px;
    background: white;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.mp-promotion-meta > div {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 14px;
}

.mp-countdown {
    color: #e74c3c;
    font-weight: 700;
    font-size: 18px;
    padding: 10px 20px;
    background: #fff3f3;
    border-radius: 25px;
    border: 2px solid #e74c3c;
}

.mp-organizer {
    color: #333;
    font-weight: 500;
}

.mp-organizer a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.mp-organizer a:hover {
    color: #005a87;
    text-decoration: underline;
}

.mp-promotion-content {
    padding: 30px;
}

.mp-public-content,
.mp-private-content {
    margin-bottom: 30px;
}

.mp-private-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.mp-promotion-actions {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 加载更多 */
.mp-load-more {
    text-align: center;
    margin: 40px 0;
}

/* 扫描器 */
.mp-scanner-container {
    text-align: center;
    padding: 40px 20px;
}

.mp-scan-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

.mp-scan-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mp-scan-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 促销归档页面样式 */
.mp-promotions-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.mp-promotions-archive .page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #007cba;
}

.mp-promotions-archive .page-title {
    margin: 0;
    font-size: 32px;
    color: #333;
}

.mp-promotion-filters {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.mp-filter-select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.mp-filter-select:hover,
.mp-filter-select:focus {
    border-color: #007cba;
    outline: none;
}

.mp-promotions-archive .mp-promotion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.mp-promotions-archive .mp-promotion-item {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.mp-promotions-archive .mp-promotion-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.mp-promotions-archive .mp-promotion-item.ended {
    opacity: 0.65;
    position: relative;
}

.mp-promotion-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.mp-promotion-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mp-promotion-thumbnail:hover img {
    transform: scale(1.05);
}

.mp-ended-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.mp-promotion-content {
    padding: 20px;
}

.mp-promotion-title {
    margin: 0 0 12px 0;
    font-size: 20px;
}

.mp-promotion-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.mp-promotion-title a:hover {
    color: #007cba;
}

.mp-promotion-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

.mp-promotion-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mp-promotion-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.mp-countdown-wrapper {
    color: #e74c3c;
    font-weight: 600;
}

.mp-participants-count {
    color: #28a745;
}

.mp-promotion-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 14px;
}

.mp-promotion-categories {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mp-category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f4f8;
    color: #007cba;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.mp-promotion-actions {
    padding: 0;
    margin: 0;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.mp-btn-primary {
    background: #007cba;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.mp-btn-primary:hover {
    background: #005a87;
    color: white;
}

.mp-no-promotions {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666;
}

/* 分页样式 */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination .page-numbers {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* 参与者列表样式 */
.mp-participants-section {
    padding: 30px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.mp-participants-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

.mp-participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.mp-participant-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #28a745;
    transition: all 0.2s;
}

.mp-participant-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mp-participant-item img {
    border-radius: 50%;
}

.mp-participant-info {
    flex: 1;
}

.mp-participant-info strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.mp-participant-info span {
    color: #666;
    font-size: 13px;
}

/* 加载指示器 */
.mp-loading-indicator {
    text-align: center;
    padding: 30px;
    color: #666;
}

.mp-loading-indicator p {
    font-size: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

.mp-no-more {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 分享按钮样式 */
.mp-share-promotion-btn {
    background: #1DA1F2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mp-share-promotion-btn:hover {
    background: #1a8cd8;
}

.mp-share-promotion-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* 赞助统计区域 */
.mp-sponsorship-section {
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 30px;
}

.mp-sponsorship-section h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: white;
}

.mp-sponsorship-section h4 {
    margin: 30px 0 20px 0;
    font-size: 18px;
    color: white;
    border-top: 2px solid rgba(255,255,255,0.2);
    padding-top: 20px;
}

.mp-sponsorship-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.mp-stat-box {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.mp-stat-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.mp-stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mp-sponsors-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.mp-sponsor-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.mp-sponsor-item:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.mp-sponsor-item img {
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.mp-sponsor-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mp-sponsor-info strong {
    font-size: 16px;
    color: white;
}

.mp-sponsor-amount {
    font-size: 14px;
    font-weight: 600;
    color: #ffd700;
}

.mp-sponsor-time {
    font-size: 12px;
    opacity: 0.8;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .mp-promotions-archive .mp-promotion-grid {
        grid-template-columns: 1fr;
    }

    .mp-promotion-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .mp-filter-select {
        width: 100%;
    }

    .mp-participants-grid {
        grid-template-columns: 1fr;
    }

    .mp-sponsorship-stats {
        grid-template-columns: 1fr;
    }

    .mp-sponsors-list {
        grid-template-columns: 1fr;
    }
}