/* Tour Overlay */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.7);
}

/* Celeste Helper - Combined element for both helper and tour modes */
.celeste-helper {
    position: fixed;
    bottom: -6px;
    left: 60px;
    width: 60px;
    height: 60px;
    z-index: 15000;
    cursor: pointer;
    filter: drop-shadow(0 0 10px rgba(100, 217, 255, 0.6));
    transition: all 0.5s ease;
}

/* Celeste tooltip */
.celeste-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    left: 70px;
    top: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.celeste-helper:hover .celeste-tooltip {
    opacity: 1;
}

.celeste-helper:hover {
    filter: drop-shadow(0 0 15px rgba(100, 217, 255, 0.9));
    transform: scale(1.1);
}

/* Celeste in tour mode */
.celeste-helper.tour-mode {
    width: 180px;
    height: 180px;
    pointer-events: none;
    z-index: 2010;
    transform: none !important;
    filter: drop-shadow(0 0 15px rgba(100, 217, 255, 0.8));
    cursor: default;
}

/* Hide tooltip when in tour mode */
.celeste-helper.tour-mode .celeste-tooltip {
    display: none;
}

/* Compact version for arrangements 2 and 3 */
.celeste-helper.tour-mode.compact {
    width: 100px;
    height: 100px;
    bottom: 30px;
    left: 30px;
    filter: drop-shadow(0 0 10px rgba(100, 217, 255, 0.6));
}

.celeste-helper svg {
    width: 100%;
    height: 100%;
}

/* Click Animation Overlay */
.click-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2009;
    pointer-events: none;
}

/* Click Animation */
.click-animation {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #FF5722;
    opacity: 0.1;
    z-index: 10001;
    animation: click-ripple 0.8s ease-out;
}

.click-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: rgba(100, 217, 255, 0.8);
    border-radius: 50%;
}

@keyframes click-ripple {
    0% {
        transform: scale(0.1);
        opacity: 0.1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.click-flash {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #FFEB3B;
    border-radius: 50%;
    box-shadow: 0 0 15px 10px rgba(255, 235, 59, 0.8);
    opacity: 0.9;
    transform: scale(0.1);
    transition: all 0.2s ease-out;
    z-index: 10002;
}

/* Message Box */
.tour-message {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
    color: white;
    font-family: 'Arial', sans-serif;
    pointer-events: auto;
    z-index: 2010;
    box-shadow: 0 0 20px rgba(100, 217, 255, 0.4);
}

/* Centered message for arrangement 2 */
.tour-message.centered {
    bottom: 100px;
}

/* Speech bubble style for arrangement 3 */
.tour-message.speech-bubble {
    bottom: 140px;
    left: 75px;
    width: 350px;
    transform: none;
}

.tour-message h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #64d9ff;
}

.tour-message p {
    margin: 0 0 15px 0;
    line-height: 1.5;
    font-size: 16px;
}

/* Tour Navigation Buttons */
.tour-nav-buttons .button-row {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.tour-nav-button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tour-prev {
    background: #333;
    color: white;
}

.tour-prev:hover:not(:disabled) {
    background: #444;
}

.tour-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tour-next {
    background: #64d9ff;
    color: #000;
    font-weight: bold;
    padding: 10px 18px;
    box-shadow: 0 0 10px rgba(100, 217, 255, 0.5);
    min-width: 130px;
    position: relative;
}

.tour-next:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3));
    border-radius: 5px;
}

.tour-next:hover:not(:disabled) {
    background: #8ae4ff;
    box-shadow: 0 0 15px rgba(100, 217, 255, 0.8);
}

.tour-next:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tour-skip {
    background: transparent;
    color: #ccc;
    border: 1px solid #ccc;
}

.tour-skip:hover {
    color: white;
    border-color: white;
}

/* Tour Contents Sidebar */
.tour-contents {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(100, 217, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    color: white;
    width: 250px;
    max-height: 80vh;
    overflow-y: auto;
    pointer-events: auto;
    z-index: 999;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.tour-phase {
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-weight: bold;
}

.tour-phase:after {
    content: "▼";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    transition: transform 0.3s ease;
}

.tour-phase.expanded:after {
    transform: translateY(-50%) rotate(180deg);
}

.tour-phase:hover {
    background: rgba(100, 217, 255, 0.2);
}

.tour-phase.active {
    background: rgba(100, 217, 255, 0.4);
}

/* Tour step items */
.phase-steps {
    margin-left: 15px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.tour-step {
    padding: 2px 10px;
    margin: 4px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.tour-step:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(100, 217, 255, 0.4);
}

.tour-step.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: rgba(100, 217, 255, 0.8);
    font-weight: bold;
}

/* Highlighted Elements */
.tour-highlight {
    position: relative;
    z-index: 2005;
    outline: 3px solid rgba(100, 217, 255, 0.8) !important;
    box-shadow: 0 0 15px rgba(100, 217, 255, 0.6) !important;
    animation: pulse-highlight 1.5s infinite;
    pointer-events: auto !important;
}

@keyframes pulse-highlight {
    0% { outline-color: rgba(100, 217, 255, 0.8); }
    50% { outline-color: rgba(255, 255, 255, 0.8); }
    100% { outline-color: rgba(100, 217, 255, 0.8); }
}

/* Home Button Pointer */
.home-button-pointer {
    position: fixed;
    z-index: 2010;
    pointer-events: none;
    font-size: 28px;
    color: rgba(100, 217, 255, 0.9);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    animation: point-pulse 1s infinite alternate ease-in-out;
}

.home-button-pointer i {
    display: inline-block;
}

@keyframes point-pulse {
    0% { transform: translateX(0); }
    100% { transform: translateX(10px); }
}

/* Keyboard Key Visualizations */
.key-visuals-container {
    position: fixed;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 2010;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(100, 217, 255, 0.4);
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.arrow-keys-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.arrow-keys-row {
    display: flex;
    gap: 6px;
}

.key-visual {
    width: 60px;
    height: 60px;
    background: linear-gradient(to bottom, #3a3a3a, #222222);
    border: 1px solid #555555;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 
        0 4px 0 #151515,
        0 5px 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, border-color 0.2s ease;
    position: relative;
    cursor: default;
    user-select: none;
}

.key-visual:after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 30%;
    border-radius: 4px 4px 12px 12px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.03));
    pointer-events: none;
    opacity: 0.7;
}

.key-visual.pressed {
    transform: translateY(3px);
    box-shadow: 
        0 1px 0 #151515,
        0 2px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    background: linear-gradient(to bottom, #1e4d60, #0d3b4d);
    border-color: rgba(100, 217, 255, 0.8);
    animation: key-glow 0.5s ease-out;
}

@keyframes key-glow {
    0% { box-shadow: 0 1px 0 #151515, 0 2px 3px rgba(0, 0, 0, 0.3), 0 0 5px rgba(100, 217, 255, 0.5); }
    50% { box-shadow: 0 1px 0 #151515, 0 2px 3px rgba(0, 0, 0, 0.3), 0 0 20px rgba(100, 217, 255, 0.8); }
    100% { box-shadow: 0 1px 0 #151515, 0 2px 3px rgba(0, 0, 0, 0.3), 0 0 5px rgba(100, 217, 255, 0.5); }
}

.key-visual i {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
    text-shadow: 0 0 5px rgba(100, 217, 255, 0.3);
}

.key-visual#arrow-up-key i {
    transform: translateY(-2px);
}

.key-visual#arrow-down-key i {
    transform: translateY(2px);
}

.key-visual#arrow-left-key i {
    transform: translateX(-2px);
}

.key-visual#arrow-right-key i {
    transform: translateX(2px);
}

/* Mouse Cursor */
.mouse-cursor {
    position: absolute;
    font-size: 28px;
    color: white;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.8));
    transition: transform 0.2s ease;
    z-index: 2012;
}

.mouse-cursor.active {
    transform: scale(0.9);
    color: rgba(100, 217, 255, 1);
}

.mouse-cursor i {
    transform: rotate(0deg);
}

/* Drag Path Visualization */
.drag-path {
    position: absolute;
    height: 2px;
    background: linear-gradient(to right, rgba(100, 217, 255, 0), rgba(100, 217, 255, 0.8));
    pointer-events: none;
    opacity: 0.7;
    z-index: 2011;
    transition: opacity 0.5s;
}

.drag-path.fading {
    opacity: 0;
}

/* Jump Flash Effect */
.jump-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(100, 217, 255, 0);
    z-index: 2020;
    pointer-events: none;
    transition: background-color 0.3s ease;
}

.jump-flash.active {
    background-color: rgba(100, 217, 255, 0.4);
}

/* Jump Streaks Effect */
.jump-streaks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2015;
    pointer-events: none;
    perspective: 1000px;
}

.streak {
    position: absolute;
    height: 2px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9), rgba(100, 217, 255, 0.8), rgba(255, 255, 255, 0));
    animation: streak-fly 1s linear forwards;
}

@keyframes streak-fly {
    from {
        opacity: 0;
        transform: translateZ(-100px) scale(0);
    }
    10% {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateZ(1000px) scale(3);
    }
}

/* Constellation Pulse for Computer Science */
.constellation-pulse {
    position: fixed;
    z-index: 2009;
    pointer-events: none;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(100, 217, 255, 0.6);
    animation: constellation-pulse 3s infinite;
}

@keyframes constellation-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.2;
    }
}

/* Annotation Highlight */
.annotation-highlight {
    position: absolute;
    border-radius: 4px;
    background-color: rgba(100, 217, 255, 0.15);
    box-shadow: 0 0 15px rgba(100, 217, 255, 0.4);
    pointer-events: none;
    z-index: 2004;
    animation: annotation-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes annotation-pulse {
    0% {
        box-shadow: 0 0 15px rgba(100, 217, 255, 0.4);
    }
    100% {
        box-shadow: 0 0 25px rgba(100, 217, 255, 0.8);
    }
}

/* Shrinking Circles Indicator */
.tour-circle-indicators {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

.shrinking-circle {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 5px solid #64d9ff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(5);
    transition: all 1.2s ease-out;
}

/* Tour Arrangement Classes */
/* Arrangement 1: Full overlay */
.tour-arrangement-1 .tour-overlay {
    display: block;
}

.tour-arrangement-1 .celeste-helper {
    display: block;
    position: fixed;
    left: 60px;
    bottom: -6px;
    top: auto;
    z-index: 15000;
}

.tour-arrangement-1 .celeste-helper.tour-mode {
    display: block;
}

.tour-arrangement-1 .tour-message {
    /* Center the message in the middle of the screen */
    top: 50%;
    bottom: auto;
    transform: translateX(-50%) translateY(-50%);
}

/* Arrangement 2: No overlay with centered message */
.tour-arrangement-2 .tour-overlay {
    display: none;
}

.tour-arrangement-2 .tour-message {
    display: block;
}

.tour-arrangement-2 .celeste-helper {
    display: block;
    position: fixed;
    left: 60px;
    bottom: -6px;
    top: auto;
    z-index: 15000;
}

.tour-arrangement-2 .celeste-helper.tour-mode {
    display: block;
}

/* Arrangement 3: No overlay with speech bubble */
.tour-arrangement-3 .tour-overlay {
    display: none;
}

.tour-arrangement-3 .tour-message {
    display: block;
}

.tour-arrangement-3 .celeste-helper {
    display: block;
    position: fixed;
    left: 60px;
    bottom: -6px;
    top: auto;
    z-index: 15000;
}

.tour-arrangement-3 .celeste-helper.tour-mode {
    display: block;
}

.close-tour-button {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 10;
}

.close-tour-button:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    color: #000;
}

/* Paper highlight circle */
.paper-highlight-circle {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: transparent;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    z-index: 1000;
    pointer-events: none;
}

/* Pulse animation for paper highlight */
.paper-highlight-circle.pulse {
    animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.7;
    }
}

/* Fade out animation */
.paper-highlight-circle.fade-out {
    animation: fade-out 1s forwards;
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
} 