/**
 * WG-Punkte Frontend CSS
 *
 * @package WG_Punkte
 * @version 2.0.0
 */

/* Level Badges */
.wgp-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* User Stats Widget */
.wgp-user-stats {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.wgp-stats-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wgp-stats-header img {
    border-radius: 50%;
}

.wgp-stats-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
}

.wgp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.wgp-stat {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wgp-stat-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.wgp-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.wgp-stat-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Level Progress */
.wgp-level-progress {
    margin-top: 20px;
}

.wgp-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.wgp-progress-bar {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

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

/* Leaderboard */
.wgp-leaderboard {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.wgp-leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.wgp-leaderboard-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.wgp-period {
    font-size: 0.9rem;
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 20px;
}

.wgp-leaderboard-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.wgp-leaderboard-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.wgp-rank-1 { background: linear-gradient(90deg, rgba(255,215,0,0.1) 0%, rgba(255,255,255,0) 100%); }
.wgp-rank-2 { background: linear-gradient(90deg, rgba(192,192,192,0.1) 0%, rgba(255,255,255,0) 100%); }
.wgp-rank-3 { background: linear-gradient(90deg, rgba(205,127,50,0.1) 0%, rgba(255,255,255,0) 100%); }

.wgp-rank {
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.wgp-medal {
    font-size: 1.5rem;
}

.wgp-rank-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    background: #e0e0e0;
    border-radius: 50%;
    font-weight: 700;
}

.wgp-avatar {
    flex-shrink: 0;
}

.wgp-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.wgp-info {
    flex: 1;
}

.wgp-name a {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.wgp-name a:hover {
    color: #667eea;
}

.wgp-meta {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.wgp-streak {
    font-size: 0.85rem;
}

.wgp-points {
    flex-shrink: 0;
    text-align: right;
}

.wgp-points-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.wgp-points-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Achievements Grid */
.wgp-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.wgp-achievement {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.wgp-achievement.earned {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.wgp-achievement.locked {
    opacity: 0.5;
}

.wgp-achievement:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.wgp-achievement-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.wgp-achievement-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.wgp-achievement-info p {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 12px 0;
}

.wgp-achievement-reward {
    display: inline-block;
    background: #667eea;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.wgp-achievement-date {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Rarity Colors */
.wgp-rarity-common { border-color: #9e9e9e; }
.wgp-rarity-uncommon { border-color: #4caf50; }
.wgp-rarity-rare { border-color: #2196f3; }
.wgp-rarity-epic { border-color: #9c27b0; }
.wgp-rarity-legendary { border-color: #ff9800; }

/* Social Proof Widget */
.wgp-social-proof {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
    padding: 32px;
    margin: 40px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.wgp-sp-header h3 {
    margin: 0 0 24px 0;
    font-size: 1.6rem;
    text-align: center;
}

.wgp-sp-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.wgp-sp-stat {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.wgp-sp-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.wgp-sp-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

.wgp-sp-cta {
    text-align: center;
    margin-top: 24px;
}

.wgp-sp-button {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 14px 32px;
    border-radius: 24px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wgp-sp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.wgp-sp-hint {
    margin-top: 12px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.wgp-sp-activity {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.wgp-sp-activity h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
}

.wgp-sp-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wgp-sp-activity-list li {
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wgp-sp-user {
    font-weight: 600;
}

.wgp-sp-time {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Push Notification Request */
.wgp-push-request {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-width: 400px;
    z-index: 9999;
    animation: slideInUp 0.3s ease;
}

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

.wgp-push-content {
    display: flex;
    gap: 16px;
}

.wgp-push-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.wgp-push-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.wgp-push-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.wgp-push-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.wgp-push-allow,
.wgp-push-deny {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wgp-push-allow {
    background: #667eea;
    color: #fff;
}

.wgp-push-allow:hover {
    background: #5568d3;
}

.wgp-push-deny {
    background: #f0f0f0;
    color: #666;
}

.wgp-push-deny:hover {
    background: #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .wgp-sp-stats {
        grid-template-columns: 1fr;
    }

    .wgp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wgp-achievements-grid {
        grid-template-columns: 1fr;
    }

    .wgp-push-request {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: none;
        border-radius: 12px 12px 0 0;
    }
}
