/**
 * Notification Banner Styles
 */

/* Container */
.notification-banner-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
}

/* Banner base */
.notification-banner {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
    overflow: hidden;
    pointer-events: auto;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 320px;
    max-width: 480px;
    position: relative;
}

.notification-banner.notification-show {
    transform: translateY(0);
    opacity: 1;
}

.notification-banner.notification-hide {
    transform: translateY(-20px);
    opacity: 0;
}

/* Content */
.notification-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.notification-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Close button */
.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

/* Progress bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
}

/* Type variations */
.notification-achievement {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
}

.notification-achievement .notification-title,
.notification-achievement .notification-message {
    color: #fff;
}

.notification-achievement .notification-progress {
    background: rgba(255, 255, 255, 0.3);
}

.notification-achievement .notification-close {
    color: rgba(255, 255, 255, 0.8);
}

.notification-achievement .notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

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

.notification-levelup .notification-title,
.notification-levelup .notification-message {
    color: #fff;
}

.notification-levelup .notification-progress {
    background: rgba(255, 255, 255, 0.3);
}

.notification-xp {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.notification-xp .notification-title,
.notification-xp .notification-message {
    color: #fff;
}

.notification-xp .notification-progress {
    background: rgba(255, 255, 255, 0.3);
}

.notification-streak {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #fff;
}

.notification-streak .notification-title,
.notification-streak .notification-message {
    color: #fff;
}

.notification-streak .notification-progress {
    background: rgba(255, 255, 255, 0.3);
}

.notification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.notification-success .notification-title {
    color: #155724;
}

.notification-success .notification-message {
    color: #155724;
}

.notification-success .notification-progress {
    background: #c3e6cb;
}

.notification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.notification-error .notification-title {
    color: #721c24;
}

.notification-error .notification-message {
    color: #721c24;
}

.notification-error .notification-progress {
    background: #f5c6cb;
}

/* Animations */
@keyframes slideInDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

/* Animation for achievement unlocks */
.notification-achievement {
    animation: achievementPulse 0.5s ease-out;
}

@keyframes achievementPulse {
    0% {
        transform: scale(0.9);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Letter Unlock Notification Styles */
.letter-unlock-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.5s ease-out, slideOutRight 0.5s ease-out 4.5s forwards;
    max-width: 400px;
}

/* Letter Unlock Banner Style */
.letter-unlock-notification.letter-unlock-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: none;
    border-radius: 0;
    padding: 0;
    animation: slideDown 0.5s ease-out, slideUp 0.5s ease-out 4.5s forwards;
}

.letter-unlock-banner .unlock-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.letter-unlock-banner .unlock-icon {
    font-size: 2.5rem;
    margin: 0;
    animation: bounceIn 0.6s ease-out;
}

.letter-unlock-banner .unlock-text {
    flex: 1;
}

.letter-unlock-banner .unlock-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.letter-unlock-banner .unlock-letter {
    font-size: 1.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
    margin-left: 0.5rem;
    text-transform: uppercase;
    animation: pulse 1s ease-in-out infinite;
}

.letter-unlock-banner .unlock-progress {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.letter-unlock-banner .unlock-progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 0;
}

.letter-unlock-banner .unlock-progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 1s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100%);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.letter-unlock-notification.success {
    background: linear-gradient(135deg, #56c288 0%, #3fb950 100%);
}

.letter-unlock-notification .unlock-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.letter-unlock-notification .unlock-icon {
    font-size: 2rem;
    margin-right: 15px;
    animation: bounceIn 0.6s ease-out;
}

.letter-unlock-notification .unlock-title {
    font-size: 1.3rem;
    font-weight: bold;
}

.letter-unlock-notification .unlock-letter {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    animation: zoomIn 0.5s ease-out 0.3s both;
}

.letter-unlock-notification .unlock-progress {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 10px;
}

.letter-unlock-notification .unlock-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.letter-unlock-notification .unlock-progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.5s ease-out;
}

/* Confetti animation */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fbbf24;
    animation: confetti-fall linear;
}

/* Additional animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .notification-banner-container {
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    .notification-banner {
        min-width: unset;
        max-width: unset;
    }
    
    .letter-unlock-notification {
        right: 10px;
        left: 10px;
        max-width: unset;
    }
}