/**
 * EthnoGuessr - Achievement & Streak Styles
 */

/* ============================================
   ACHIEVEMENT UNLOCK NOTIFICATION
   ============================================ */
.achievement-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
    border: 3px solid #eec566;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 100001;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(238, 197, 102, 0.3);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 450px;
}

.achievement-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.achievement-badge {
    position: relative;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #eec566, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: achievement-rotate 3s linear infinite;
    box-shadow: 0 0 20px rgba(238, 197, 102, 0.6);
}

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

.achievement-icon {
    font-size: 48px;
    z-index: 1;
    animation: achievement-bounce 0.5s ease-in-out infinite alternate;
}

@keyframes achievement-bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

/* .achievement-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    animation: achievement-shine 2s linear infinite;
}

@keyframes achievement-shine {
    0% { left: -100%; }
    100% { left: 100%; }
} */

.achievement-details {
    flex: 1;
}

.achievement-unlock-text {
    color: #eec566;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.achievement-title {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
}

/* ============================================
   ACHIEVEMENTS PANEL
   ============================================ */
.achievements-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.achievements-panel-overlay.show {
    opacity: 1;
}

.achievements-panel {
    background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
    border: 2px solid #eec566;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: achievement-panel-slide 0.4s ease-out;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

@keyframes achievement-panel-slide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.achievements-header {
    padding: 20px 25px;
    border-bottom: 2px solid #eec566;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.achievements-header h2 {
    color: #eec566;
    margin: 0;
    font-size: 28px;
}

.achievements-count {
    color: #fff;
    background: #c0392b;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
}

.achievements-close {
    background: none;
    border: none;
    color: #eec566;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    transition: transform 0.2s ease;
}

.achievements-close:hover {
    transform: scale(1.2) rotate(90deg);
    color: #c0392b;
}

.achievements-list {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.achievements-list::-webkit-scrollbar {
    width: 10px;
}

.achievements-list::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 5px;
}

.achievements-list::-webkit-scrollbar-thumb {
    background: #eec566;
    border-radius: 5px;
}

.achievements-list::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}

.achievement-item {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #444;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.achievement-item:last-child {
    margin-bottom: 0;
}

.achievement-item.unlocked {
    border-color: #eec566;
    background: linear-gradient(135deg, rgba(238, 197, 102, 0.1), rgba(192, 57, 43, 0.1));
    box-shadow: 0 0 15px rgba(238, 197, 102, 0.2);
}

.achievement-item.unlocked:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(238, 197, 102, 0.4);
}

.achievement-item.locked {
    opacity: 0.6;
}

.achievement-item-icon {
    font-size: 48px;
    flex-shrink: 0;
    width: 60px;
    text-align: center;
}

.achievement-item.locked .achievement-item-icon {
    filter: grayscale(100%);
}

.achievement-item-info {
    flex: 1;
}

.achievement-item-title {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-item.locked .achievement-item-title {
    color: #888;
}

.achievement-item-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
}

.achievement-item.locked .achievement-item-description {
    color: #666;
}

.achievement-checkmark {
    font-size: 32px;
    color: #27ae60;
    flex-shrink: 0;
    animation: achievement-check 0.5s ease-in-out;
}

@keyframes achievement-check {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* ============================================
   STREAK BADGE
   ============================================ */
.streak-badge {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: #c0392b;
    border: 3px solid #eec566;
    border-radius: 50%;
    width: 170px;
    height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(192, 57, 43, 0.6);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    padding: 10px;
    box-sizing: border-box;
}

.streak-badge.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.streak-flame {
    font-size: 48px;
    color: #eec566;
    animation: streak-flicker 1s ease-in-out infinite alternate;
}

@keyframes streak-flicker {
    0% { transform: scale(1) rotate(-5deg); }
    100% { transform: scale(1.1) rotate(5deg); }
}

.streak-number {
    color: #000;
    font-size: 40px;
    font-weight: bold;
    line-height: 1;
    margin: 5px 0;
}

.streak-label {
    color: #eec566;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ============================================
   ACHIEVEMENT BUTTON (for menu)
   ============================================ */
.achievements-button {
    position: relative;
    padding: 10px 20px;
    background-color: #7f241b;
    color: #fff;
    border: 2px solid #eec566;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin: 20px auto;
}

.achievements-button:hover {
    background-color: #c0392b;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(238, 197, 102, 0.5);
}

.achievements-button-icon {
    font-size: 24px;
}

.achievements-button-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #1a1a1a;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .achievement-notification {
        max-width: 90%;
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .achievement-badge {
        width: 60px;
        height: 60px;
    }

    .achievement-icon {
        font-size: 36px;
    }

    .achievement-title {
        font-size: 20px;
    }

    .achievements-panel {
        max-height: 90vh;
    }

    .achievement-item {
        flex-direction: column;
        text-align: center;
    }

    .streak-badge {
        width: 140px;
        height: 140px;
        padding: 8px;
    }

    .streak-flame {
        font-size: 40px;
    }

    .streak-number {
        font-size: 32px;
    }

    .streak-label {
        font-size: 11px;
    }
}

