/* Game-Education Integration Styles - Phase 4 */

/* Checkpoint Notification */
.checkpoint-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 9, 17, 0.95), rgba(78, 205, 196, 0.2));
    border: 2px solid rgba(255, 165, 0, 0.6);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    z-index: 1000;
    animation: checkpointAppear 0.8s ease-out;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
}

@keyframes checkpointAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotate(-5deg);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

.notification-content {
    position: relative;
    z-index: 1;
}

.checkpoint-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    animation: checkpointGlow 2s ease-in-out infinite;
}

@keyframes checkpointGlow {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 165, 0, 0.5);
    }
    50% { 
        transform: scale(1.1);
        text-shadow: 0 0 30px rgba(255, 165, 0, 0.8);
    }
}

.checkpoint-info h3 {
    color: #ffa500;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.checkpoint-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.checkpoint-message {
    color: #4ecdc4;
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.depth-hound-preview {
    font-size: 2rem;
    animation: houndPreviewFloat 2s ease-in-out infinite;
}

@keyframes houndPreviewFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffa500, #ff6b35);
    border-radius: 0 0 20px 20px;
    animation: notificationProgress 3s linear;
}

@keyframes notificationProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Education Transition Overlay */
.education-transition-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 4, 40, 0.9), rgba(0, 9, 17, 0.95));
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: overlayFadeIn 1s ease-out;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.transition-content {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.depth-info {
    margin-bottom: 3rem;
}

.current-depth {
    font-size: 4rem;
    color: #ffa500;
    font-weight: bold;
    text-shadow: 0 0 30px rgba(255, 165, 0, 0.5);
    display: block;
    margin-bottom: 0.5rem;
}

.zone-name {
    font-size: 1.5rem;
    color: #4ecdc4;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(78, 205, 196, 0.5);
}

/* Depth Hound Entrance Animation */
.depth-hound-entrance {
    margin-bottom: 3rem;
    position: relative;
}

.hound-swimming {
    font-size: 6rem;
    display: block;
    margin-bottom: 1rem;
    transform: translateX(-100vw);
}

@keyframes houndSwimIn {
    from {
        transform: translateX(-100vw) rotate(-10deg);
        opacity: 0;
    }
    to {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}

.hound-dialogue {
    background: rgba(78, 205, 196, 0.1);
    border: 2px solid rgba(78, 205, 196, 0.4);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
    position: relative;
}

.hound-dialogue::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 15px solid rgba(78, 205, 196, 0.4);
}

.hound-dialogue p {
    color: #4ecdc4;
    font-size: 1.2rem;
    font-style: italic;
    margin: 0;
    line-height: 1.4;
}

/* Transition Action Buttons */
.transition-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.start-quiz-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.start-quiz-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(78, 205, 196, 0.5);
}

.skip-quiz-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skip-quiz-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Game-Embedded Quiz Interface */
.game-embedded-quiz {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.game-embedded-quiz .educational-quiz-interface {
    background: linear-gradient(135deg, rgba(0, 9, 17, 0.95), rgba(30, 58, 95, 0.9));
    border: 2px solid rgba(255, 165, 0, 0.5);
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Game UI Enhancements for Education */
.education-hud {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(78, 205, 196, 0.4);
    border-radius: 10px;
    padding: 1rem;
    min-width: 200px;
    backdrop-filter: blur(5px);
}

.education-hud h4 {
    color: #4ecdc4;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.education-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.education-stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.education-stat-value {
    color: #ffa500;
    font-weight: bold;
}

.next-checkpoint-indicator {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    text-align: center;
}

.checkpoint-distance {
    color: #4ecdc4;
    font-size: 0.8rem;
    font-weight: bold;
}

/* In-Game Depth Hound */
.in-game-depth-hound {
    position: absolute;
    width: 80px;
    height: 80px;
    pointer-events: none;
    z-index: 100;
    transition: all 0.5s ease;
}

.hound-sprite {
    width: 100%;
    height: 100%;
    background-image: url('/assets/depth-hound/swimming.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 15px rgba(78, 205, 196, 0.6));
    animation: houndSwim 3s ease-in-out infinite;
}

@keyframes houndSwim {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-2deg) translateY(-5px); }
    75% { transform: rotate(2deg) translateY(5px); }
}

/* Education Mode Overlay */
.education-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    transition: opacity 1s ease;
}

/* Reward Particles in Game */
.game-reward-particle {
    position: absolute;
    font-size: 2rem;
    pointer-events: none;
    z-index: 200;
    animation: gameParticleFloat 3s ease-out forwards;
}

@keyframes gameParticleFloat {
    0% {
        opacity: 1;
        transform: scale(0.5) translateY(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) translateY(-50px) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) translateY(-100px) rotate(360deg);
    }
}

/* Game UI Enhancements */
.game-ui-enhanced {
    position: relative;
}

.educational-progress-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(78, 205, 196, 0.4);
    border-radius: 4px;
    overflow: hidden;
}

.education-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

.education-progress-label {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #4ecdc4;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

/* Depth Hound Speech Bubbles in Game */
.game-speech-bubble {
    position: absolute;
    background: rgba(0, 9, 17, 0.95);
    border: 2px solid rgba(78, 205, 196, 0.6);
    border-radius: 15px;
    padding: 1rem;
    max-width: 250px;
    color: #ffffff;
    font-size: 0.9rem;
    z-index: 500;
    pointer-events: none;
    animation: speechBubbleAppear 0.5s ease-out;
}

.game-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid rgba(78, 205, 196, 0.6);
}

@keyframes speechBubbleAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Educational Achievement Notifications */
.education-achievement {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: #000;
    border: 2px solid rgba(78, 205, 196, 0.8);
    border-radius: 15px;
    padding: 1rem 2rem;
    font-weight: bold;
    z-index: 1500;
    animation: achievementSlide 0.5s ease-out;
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.4);
}

@keyframes achievementSlide {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Game-Education Transition Effects */
.zone-transition-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(78, 205, 196, 0.3) 0%, transparent 70%);
    z-index: 50;
    animation: zoneTransition 2s ease-in-out;
    pointer-events: none;
}

@keyframes zoneTransition {
    0% { 
        opacity: 0;
        transform: scale(0);
    }
    50% { 
        opacity: 1;
        transform: scale(1.5);
    }
    100% { 
        opacity: 0;
        transform: scale(1);
    }
}

/* Mini Depth Hound Companion */
.depth-hound-companion {
    position: absolute;
    bottom: 100px;
    right: 100px;
    font-size: 3rem;
    z-index: 100;
    animation: companionFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(78, 205, 196, 0.6));
    cursor: pointer;
    transition: all 0.3s ease;
}

.depth-hound-companion:hover {
    transform: scale(1.2);
    animation-duration: 1s;
}

@keyframes companionFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
    }
    25% { 
        transform: translateY(-15px) rotate(-3deg);
    }
    75% { 
        transform: translateY(-15px) rotate(3deg);
    }
}

/* Educational Bonus Indicators */
.education-bonus-indicator {
    position: absolute;
    top: 80px;
    left: 20px;
    background: rgba(78, 205, 196, 0.2);
    border: 1px solid rgba(78, 205, 196, 0.4);
    border-radius: 10px;
    padding: 0.75rem;
    color: #4ecdc4;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 100;
    animation: bonusIndicatorPulse 2s ease-in-out infinite;
}

@keyframes bonusIndicatorPulse {
    0%, 100% { 
        background: rgba(78, 205, 196, 0.2);
        box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
    }
    50% { 
        background: rgba(78, 205, 196, 0.3);
        box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
    }
}

/* Debug Panel */
.education-debug-panel {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 2000;
}

.debug-panel {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 165, 0, 0.5);
    border-radius: 10px;
    padding: 1rem;
    min-width: 200px;
}

.debug-panel h4 {
    color: #ffa500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.debug-panel button {
    background: rgba(78, 205, 196, 0.3);
    color: #ffffff;
    border: 1px solid rgba(78, 205, 196, 0.5);
    border-radius: 5px;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.debug-panel button:hover {
    background: rgba(78, 205, 196, 0.5);
    transform: translateY(-1px);
}

/* Mobile Responsive for Game Integration */
@media (max-width: 768px) {
    .checkpoint-notification {
        padding: 1.5rem;
        max-width: 90%;
    }
    
    .checkpoint-icon {
        font-size: 3rem;
    }
    
    .current-depth {
        font-size: 2.5rem;
    }
    
    .zone-name {
        font-size: 1.2rem;
    }
    
    .hound-swimming {
        font-size: 4rem;
    }
    
    .transition-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .start-quiz-btn,
    .skip-quiz-btn {
        width: 100%;
        justify-content: center;
    }
    
    .education-hud {
        position: absolute;
        top: 10px;
        right: 10px;
        min-width: 150px;
        padding: 0.75rem;
    }
    
    .depth-hound-companion {
        bottom: 80px;
        right: 20px;
        font-size: 2rem;
    }
    
    .game-embedded-quiz {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .checkpoint-notification {
        padding: 1rem;
    }
    
    .checkpoint-info h3 {
        font-size: 1.2rem;
    }
    
    .hound-dialogue p {
        font-size: 1rem;
    }
    
    .education-hud {
        min-width: 120px;
        padding: 0.5rem;
    }
    
    .education-stat {
        font-size: 0.7rem;
    }
}

/* Animation Classes for Dynamic Application */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Special Effects for Education Rewards */
.reward-burst {
    position: absolute;
    pointer-events: none;
    z-index: 300;
}

.burst-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ffa500 0%, #ff6b35 100%);
    border-radius: 50%;
    animation: burstParticle 1s ease-out forwards;
}

@keyframes burstParticle {
    from {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
    to {
        opacity: 0;
        transform: scale(0.3) translate(var(--dx), var(--dy));
    }
}

/* Educational Zone Ambiance */
.zone-ambient-surface {
    background: radial-gradient(ellipse at center bottom, rgba(135, 206, 235, 0.1) 0%, transparent 70%);
}

.zone-ambient-twilight {
    background: radial-gradient(ellipse at center bottom, rgba(25, 25, 112, 0.2) 0%, transparent 70%);
}

.zone-ambient-midnight {
    background: radial-gradient(ellipse at center bottom, rgba(0, 0, 0, 0.4) 0%, transparent 70%);
}

.zone-ambient-abyssal {
    background: radial-gradient(ellipse at center bottom, rgba(0, 4, 40, 0.6) 0%, transparent 70%);
}

.zone-ambient-hadal {
    background: radial-gradient(ellipse at center bottom, rgba(0, 0, 0, 0.8) 0%, transparent 70%);
}