/**
 * 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.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;
}

/* 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;
}

.pm2-user-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    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;
}

.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: 20px;
}

.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(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.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: 30px;
    flex-wrap: wrap;
}

.pm2-nav a {
    padding: 10px 20px;
    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: 30px;
    padding-bottom: 20px;
    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;
    }

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

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