/**
 * Points Mall V2 - Frontend Styles
 */

/* Hidden Content */
.pm2-hidden-content {
    margin: 30px 0;
    border: 2px dashed #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.pm2-hidden-content.locked {
    background: #fafafa;
}

.pm2-hidden-content.locked.full-hide {
    border-color: #e74c3c;
    border-style: solid;
    background: #fff5f5;
}

.pm2-hidden-content.locked.partial-hide {
    border-color: #f39c12;
}

.pm2-hidden-content.unlocked {
    border-style: solid;
    border-color: #28a745;
    background: #f8fff8;
}

.pm2-hidden-header {
    padding: 15px 20px;
    background: #f0f0f0;
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.pm2-hidden-content.unlocked .pm2-hidden-header {
    background: #d4edda;
    color: #155724;
}

.pm2-hidden-body {
    padding: 20px;
}

.pm2-hidden-body p {
    margin: 0 0 15px;
    color: #666;
}

.pm2-hidden-text {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #333;
}

.pm2-hidden-text:last-child {
    margin-bottom: 0;
}

/* Download Box (within hidden content) */
.pm2-hidden-content .pm2-download-box {
    margin: 20px 0 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    text-align: center;
}

.pm2-download-info {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

/* Content Hide Box */
.pm2-content-hide-box {
    margin: 30px 0;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    overflow: hidden;
    background: #fff5f5;
}

.pm2-content-hide-box.full-hide {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.pm2-content-hide-box.partial-hide {
    border-color: #f39c12;
    background: #fef9f3;
}

.pm2-content-hide-header {
    padding: 15px 20px;
    background: #e74c3c;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.pm2-content-hide-box.partial-hide .pm2-content-hide-header {
    background: #f39c12;
}

.pm2-content-hide-body {
    padding: 20px;
    text-align: center;
}

.pm2-content-hide-body p {
    margin: 0 0 15px;
    color: #666;
    font-size: 14px;
}

.pm2-content-excerpt {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    font-style: italic;
    color: #666;
}

.pm2-btn-unlock-content {
    display: inline-block;
    padding: 12px 30px;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.pm2-btn-unlock-content:hover {
    background: #c0392b;
    color: #fff;
}

/* Download Box */
.pm2-download-box {
    margin: 30px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.pm2-download-header {
    padding: 15px 20px;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.pm2-download-body {
    padding: 20px;
}

.pm2-download-body p {
    margin: 0 0 15px;
    color: #666;
}

/* Buttons */
.pm2-btn-unlock,
.pm2-btn-download,
.pm2-btn-login {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.pm2-btn-unlock:hover,
.pm2-btn-download:hover,
.pm2-btn-login:hover {
    background: #005a87;
    color: #fff;
}

.pm2-btn-login {
    background: #6c757d;
}

.pm2-btn-login:hover {
    background: #545b62;
}

/* User Center */
.pm2-user-center {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
  padding-top: 70px;
}

.pm2-user-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    /*text-align: center;*/
}

.pm2-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 15px;
}

.pm2-user-name {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 5px;
  text-align: center;
}

.pm2-user-level {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 14px;
}

.pm2-points-display {
    margin-top: 10px;
  text-align: center;
}

.pm2-points-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.pm2-points-label {
    font-size: 14px;
    opacity: 0.8;
}

/* Grid Layout */
.pm2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.pm2-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s;
}

.pm2-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pm2-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.pm2-card-content {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Product List */
.pm2-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pm2-product-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.pm2-product-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pm2-product-image {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.pm2-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm2-product-info {
    padding: 20px;
}

.pm2-product-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
}

.pm2-product-price {
    color: #e74c3c;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
}

.pm2-product-price span {
    font-size: 14px;
    font-weight: normal;
    color: #999;
}

.pm2-product-stock {
    font-size: 13px;
    color: #666;
}

/* Ranking */
.pm2-ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.pm2-ranking-table th,
.pm2-ranking-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.pm2-ranking-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.pm2-rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    font-weight: 600;
    color: #666;
}

.pm2-rank-number.top3 {
    background: #ffd700;
    color: #333;
}

/* Achievements & Badges */
.pm2-achievement-list,
.pm2-badge-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.pm2-achievement-item,
.pm2-badge-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.pm2-achievement-item.locked,
.pm2-badge-item.locked {
    opacity: 0.6;
}

.pm2-achievement-icon,
.pm2-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.pm2-achievement-info,
.pm2-badge-info {
    flex: 1;
}

.pm2-achievement-name,
.pm2-badge-name {
    font-weight: 600;
    margin: 0 0 5px;
}

.pm2-achievement-desc,
.pm2-badge-desc {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.pm2-achievement-reward {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 5px;
}

/* Checkin Calendar */
.pm2-checkin-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.pm2-checkin-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.pm2-checkin-day.checked {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    font-weight: 600;
}

.pm2-checkin-day.today {
    border-color: #0073aa;
    border-width: 2px;
}

/* Messages */
.pm2-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

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

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

/* Navigation */
.pm2-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
      margin-top: 5px;
    flex-wrap: wrap;
}

.pm2-nav a {
    padding: 5px 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.pm2-nav a:hover,
.pm2-nav a.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Page Header */
.pm2-page-header {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.pm2-page-header h1 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .pm2-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pm2-grid,
    .pm2-product-list {
        grid-template-columns: 1fr 1fr;
    }

    .pm2-user-header {
        padding: 30px 20px;
    }

    .pm2-points-number {
        font-size: 36px;
    }
}

/* Mini Program QR Code Verification */
.pm2-miniprogram-verify {
    text-align: center;
}

.pm2-miniprogram-title {
    font-size: 18px;
    font-weight: 600;
    color: #07c160;
    margin: 0 0 10px;
}

.pm2-miniprogram-desc {
    color: #666;
    font-size: 14px;
    margin: 0 0 20px;
    line-height: 1.6;
}

.pm2-qrcode-wrapper {
    display: inline-block;
    margin: 0 auto 15px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.pm2-qrcode-img {
    display: block;
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.pm2-verify-tip {
    color: #999;
    font-size: 13px;
    margin: 0 0 15px;
}

.pm2-btn-miniprogram-verify {
    display: inline-block;
    padding: 12px 30px;
    background: #07c160;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.pm2-btn-miniprogram-verify:hover {
    background: #06ad56;
    color: #fff;
}

.pm2-btn-miniprogram-verify:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pm2-verify-status {
    margin-top: 15px;
    padding: 10px;
    background: #f0f9f4;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    color: #2e7d32;
    font-size: 14px;
}

.pm2-verify-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #c8e6c9;
    border-top-color: #07c160;
    border-radius: 50%;
    animation: pm2-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes pm2-spin {
    to { transform: rotate(360deg); }
}
