@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap');

/* Canvas wrapper — same pattern as levels */
#index-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#index-canvas {
    width: 1400px;
    height: 750px;
    position: relative;
    transform-origin: center center;
    flex-shrink: 0;
}

/* Title */
.title-container {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
}

#title {
    width: 380px;
    display: block;
}

/* Start button */
.start-button-container {
    position: absolute;
    top: 300px;
    left: 50%;
    transform: translateX(-50%);
}

#start-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
}

#start-btn:hover svg path:first-child {
    fill: #25d366;
}

#start-btn:hover svg {
    transform: scale(1.1);
    transition: transform 0.2s;
}

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

#start-btn:hover #btn-s { animation: bounce 0.6s ease-out 0s; }
#start-btn:hover #btn-t1,
#start-btn:hover #btn-t1-cross { animation: bounce 0.6s ease-out 0.1s; }
#start-btn:hover #btn-a { animation: bounce 0.6s ease-out 0.2s; }
#start-btn:hover #btn-r { animation: bounce 0.6s ease-out 0.3s; }
#start-btn:hover #btn-t2,
#start-btn:hover #btn-t2-cross { animation: bounce 0.6s ease-out 0.4s; }

/* Login group (left panel) */
.login-group {
    position: absolute;
    top: 80px;
    left: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#username-label {
    font-family: 'Indie Flower', cursive;
    font-size: 32px;
    display: inline-block;
    padding: 4px 16px;
    border: 2.5px solid black;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

.pikachu {
    width: 220px;
    mix-blend-mode: multiply;
}

.stats-wrapper {
    position: relative;
    width: fit-content;
}

.stats-label {
    width: 340px;
    display: block;
}

.stats-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stats-text {
    position: absolute;
    top: 42%;
    left: 40%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: left;
    font-family: 'Indie Flower', cursive;
    font-size: 26px;
}

/* Logout */
#logout {
  position: absolute;                                                                                                                                                                                    
      top: 160px;                                                                                                                                           
      left: -100px;                                                                                                                                                                                            
      width: 100px;                                                                                                                                                                                        
      cursor: pointer;  
}

/* Leaderboard (right panel) */
.score-group {
    position: absolute;
    top: 80px;
    right: 20px;
}

.score-table {
    width: 450px;
    display: block;
}

.leaderboard {
    position: absolute;
    top: 27%;
    left: 49%;
    transform: translateX(-50%);
    width: 85%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'Indie Flower', cursive;
    font-size: 28px;
}

.leaderboard-row {
    display: flex;
    gap: 50px;
    align-items: baseline;
}

.lb-name  { flex: 1; text-align: center; }
.lb-tries { width: 50px; text-align: center; flex-shrink: 0; }
.lb-time  { width: 65px; text-align: right; flex-shrink: 0; }

/* Admin label */
#admin-label {
    position: absolute;
    bottom: 20px;
    right: 60px;
    width: 260px;
    cursor: pointer;
}

/* End run button */
#end-run-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Indie Flower', cursive;
    font-size: 22px;
    background: none;
    border: 2.5px solid #c00;
    color: #c00;
    padding: 8px 28px;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    z-index: 100;
}

#end-run-btn:hover {
    background: #c00;
    color: white;
}

/* Active run reminder */
#hint {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Indie Flower', cursive;
    font-size: 35px;
    color: red;
    margin: 0;
    white-space: nowrap;
    z-index: 99;
}
