/**
 * Style dla systemu punktów i osiągnięć
 */

/* Powiadomienia o osiągnięciach */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
    z-index: 2000;
    max-width: 350px;
    transform: translateX(400px);
    transition: transform 0.5s ease;
    border: 3px solid #ff8c00;
}

.achievement-notification.show {
    transform: translateX(0);
}

.achievement-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-icon {
    font-size: 2.5rem;
    animation: bounce 1s infinite;
}

.achievement-text h4 {
    margin: 0 0 5px 0;
    color: #8b4513;
    font-size: 1.1rem;
    font-weight: 700;
}

.achievement-text p {
    margin: 0 0 5px 0;
    color: #654321;
    font-size: 0.9rem;
    line-height: 1.3;
}

.achievement-points {
    background: #ff8c00;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Powiadomienia o odznakach */
.badge-notification {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.4);
    z-index: 2000;
    max-width: 350px;
    transform: translateX(-400px);
    transition: transform 0.5s ease;
    border: 3px solid #26a69a;
}

.badge-notification.show {
    transform: translateX(0);
}

.badge-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.badge-icon {
    font-size: 2.5rem;
    animation: spin 2s linear infinite;
}

.badge-text h4 {
    margin: 0 0 5px 0;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
}

.badge-text p {
    margin: 0 0 5px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.3;
}

.badge-text p:last-child {
    margin-bottom: 0;
}

/* Panel statystyk */
.stats-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

.stats-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.stats-header .ranking {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

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

.stat-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.stat-card h3 {
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-card .label {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Osiągnięcia */
.achievements-section {
    margin-top: 25px;
}

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

.achievement-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.achievement-card.unlocked {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

.achievement-card.locked {
    opacity: 0.5;
    background: #f8f9fa;
}

.achievement-icon-small {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
}

.achievement-card h4 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.achievement-card p {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.achievement-card .points {
    background: #667eea;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.achievement-card.unlocked .points {
    background: #ff8c00;
}

/* Odznaki */
.badges-section {
    margin-top: 25px;
}

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

.badge-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.badge-card.earned {
    border-color: #4ecdc4;
    background: linear-gradient(135deg, #e6fffe 0%, #b2f5ea 100%);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.2);
}

.badge-card.locked {
    opacity: 0.5;
    background: #f8f9fa;
}

.badge-icon-large {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.badge-card h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.badge-card p {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.badge-card .earned-date {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
}

/* Pasek postępu */
.progress-bar-large {
    background: #e9ecef;
    border-radius: 15px;
    height: 30px;
    overflow: hidden;
    margin: 15px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill-large {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 15px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    position: relative;
}

.progress-fill-large::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

.progress-text-large {
    text-align: center;
    font-weight: 600;
    color: #495057;
    margin-top: 10px;
    font-size: 1rem;
}

/* Wykresy statystyk */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chart-title {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.simple-chart {
    display: flex;
    align-items: end;
    gap: 10px;
    height: 150px;
    margin: 20px 0;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, #667eea, #764ba2);
    border-radius: 5px 5px 0 0;
    min-height: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.chart-bar:hover {
    transform: scaleY(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Animacje */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

.achievement-card,
.badge-card,
.stat-card {
    animation: fadeInUp 0.5s ease;
}

/* Responsywność */
@media screen and (max-width: 768px) {
    .achievement-notification,
    .badge-notification {
        left: 10px;
        right: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .achievement-notification.show,
    .badge-notification.show {
        transform: translateY(0);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .achievements-grid,
    .badges-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .simple-chart {
        height: 120px;
    }
    
    .chart-bar {
        min-height: 15px;
    }
}

/* Tryb wysokiego kontrastu */
.high-contrast .achievement-notification {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

.high-contrast .badge-notification {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

.high-contrast .achievement-card.unlocked,
.high-contrast .badge-card.earned {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
}

/* Tryb dużego tekstu */
.large-text .achievement-notification,
.large-text .badge-notification {
    font-size: 1.2rem;
}

.large-text .stat-card .value {
    font-size: 2.5rem;
}

.large-text .achievement-card h4,
.large-text .badge-card h4 {
    font-size: 1.2rem;
}
