@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Russo+One&display=swap');

body {
    font-family: 'Share Tech Mono', monospace;
    overscroll-behavior: none;
    font-size: 24px;
    text-align: center;
    background-color: #08203A;
    color: #8EE3F1;
    min-height: 100vh;
    cursor: url("img/cursor.png"), auto;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden; 
}

/* INTRO / LOGO */
.intro {
    position: fixed;
    top: 0; left: 0;
    height: 100vh; width: 100vw;
    z-index: 99999;
    background-color: #08203A;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fade-out ease-in 0.3s forwards;
    animation-delay: 4.5s;
}
.logo { position: relative; opacity: 1; animation: fade-out ease-in 1s forwards; animation-delay: 3.3s; }
.logo-svg { position: absolute; z-index: 999999; height: 21px; top: 42px; right: 43px; opacity: 0; animation: fade-in ease-in 1s forwards; animation-delay: 2s; }
.logo-svg path { fill: #8EE3F1; }
.logo::after { content: ''; position: absolute; left: 21px; bottom: 21px; width: 0; height: 2px; background-color: #8EE3F1; animation: grow ease-in 0.8s forwards; animation-delay: 2s; }
.logo::before { content: ''; position: absolute; left: 21px; top: 21px; width: 0; height: 2px; margin-left: 80%; background-color: #8EE3F1; animation: grow ease-in 0.8s forwards; animation-delay: 1.5s; }
.logo-text { position: absolute; top: 36px; left: 28px; font-family: 'Russo One', sans-serif; font-size: 28px; letter-spacing: 12px; z-index: 99999; opacity: 0; animation: fade-in ease-in 1s forwards; animation-delay: 2s; }
.logo-text .e { color: #08203A; }
.logo-bg { position: absolute; width: 0; height: 40px; top: 33px; left: 20px; background-color: #08203A; z-index: 9999; animation: grow linear 0.6s forwards; animation-delay: 1.5s; }
.logo-circles { display: block; width: 200px; height: 100px; border: 2px solid #8EE3F1; border-radius: 100%; position: relative; }
.logo-circles::before { content: ''; width: 0; height: 100%; position: absolute; top: -2px; left: 50%; border: 2px solid #8EE3F1; border-radius: 100%; animation: scale72 linear 1s forwards; animation-delay: 1s; opacity: 0; }
.logo-circles::after { content: ''; width: 0; height: 100%; position: absolute; top: -2px; left: 50%; border: 2px solid #8EE3F1; border-radius: 100%; animation: scale33 linear 1s forwards; animation-delay: 1.8s; opacity: 0; }

/* HEADER */
header { position: fixed; background-color: #08203A; border-bottom: 2px solid #8EE3F1; width: 100%; top: 0; z-index: 99; font-size: 24px; display: flex; justify-content: center; align-items: center; }
header::after { content: ''; position: absolute; bottom: -8px; left: 0; width: 100%; height: 5px; background-color: #08203A; display: block; border-bottom: 2px solid #8EE3F1; }
.header-content { display: flex; justify-content: space-between; align-items: center; width: 90%; border: 2px solid #8EE3F1; padding: 8px; margin: 20px 0; }
.header-content div { display: flex; align-items: center; justify-content: center; }
.header-content div p { margin-left: 40px; }
#user-name-display { font-weight: bold; }
.header-content .lumen { font-family: 'Russo One', sans-serif; font-weight: bold; font-size: 20px; letter-spacing: 8px; position: relative; width: 125px; height: 28px; }
.header-content .lumen .circles { border-radius: 100%; position: absolute; border: 2px solid #8EE3F1; height: 68px; width: 143px; top: -23px; left: -23px; }
.header-content .lumen .circles::before { content: ''; width: 66%; border: 2px solid #8EE3F1; height: 100%; position: absolute; border-radius: 100%; left: 15%; top: -2px; }
.header-content .lumen .circles::after { content: ''; width: 33%; border: 2px solid #8EE3F1; height: 100%; position: absolute; border-radius: 100%; left: 31%; top: -2px; }
.lumen-text { background-color: #08203A; padding: 2px; margin-bottom: 2px; position: absolute; left: -7px; z-index: 999; }
.header-percent { color: #8EE3F1; font-weight: bold; }

/* FOOTER */
footer { border-top: 2px solid #8EE3F1; position: fixed; bottom: 0; width: 100%; background-color: #08203A; display: flex; align-items: center; justify-content: center; padding: 16px 0 8px; flex-wrap: wrap; z-index: 99; }
.footer-container { width: 90%; display: flex; justify-content: space-between; align-items: center; margin: 0 auto; }
.box { position: relative; width: 220px; height: 50px; border: 2px solid #8EE3F1; margin: 0 6px; overflow: visible; }
.door-left, .door-right { position: absolute; top: 0; height: 2px; width: 50%; background-color: #8EE3F1; transition: transform 0.4s ease-in-out; }
.door-left { left: 0; transform-origin: left center; }
.door-right { left: 50%; transform-origin: right center; }
.box.open .door-left { transform: rotate(-120deg) translateX(-10px); }
.box.open .door-right { transform: rotate(120deg) translateX(10px); }
.top-label { position: absolute; top: 5px; left: 0; right: 0; text-align: center; font-size: 16px; }
.bottom-label { position: absolute; bottom: 5px; left: 0; right: 0; text-align: center; font-size: 16px; }
.code { width: 100%; margin-top: 16px; padding-top: 8px; font-size: 16px; border-top: 1px solid #8EE3F1; }
.tempers-display { position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); width: 200px; background-color: #08203A; border: 2px solid #8EE3F1; padding: 10px; z-index: 100; display: flex; flex-direction: column; gap: 8px; opacity: 0; visibility: hidden; transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out, bottom 0.4s ease-in-out; pointer-events: none; }
.box:hover .tempers-display { opacity: 1; visibility: visible; bottom: 120%; pointer-events: auto; }
.tempers-header { font-family: 'Russo One', sans-serif; font-size: 18px; border-bottom: 2px solid #8EE3F1; padding-bottom: 5px; margin-bottom: 5px; text-align: center; }
.temper-row { display: flex; align-items: center; justify-content: space-between; }
.temper-label { font-family: 'Share Tech Mono', monospace; font-size: 16px; margin-right: 10px; flex-shrink: 0; }
.progress-bar { flex-grow: 1; height: 12px; border: 1px solid #8EE3F1; background-color: transparent; display: flex; align-items: center; padding: 1px; }
.progress-fill { height: 100%; width: 0%; transition: width 0.5s ease-in-out; }
.progress-fill.wo { background-color: #63f1a8; }
.progress-fill.fc { background-color: #f1da63; }
.progress-fill.dr { background-color: #ffffff; }
.progress-fill.ma { background-color: #63d6f1; }

/* Grid Dinâmico */
#grid-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.grid-cell {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 100;
    color: #8EE3F1;
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.scary-cell {
    z-index: 10;
}
.scary-hover {
    opacity: 1;
    transform: scale(1.1) !important;
}
.travel {
    position: fixed;
    z-index: 1000;
    transition: all 0.8s ease-in-out;
    pointer-events: none;
    font-size: inherit;
    color: inherit;
    background: transparent;
}

/* Animações dos Números */
.grid-cell.b-20 { animation: float-bottom-20 6s ease-in-out infinite; }
.grid-cell.l-20 { animation: float-left-20 6s ease-in-out infinite; }
.grid-cell.d-1 { animation-delay: 1s; }
.grid-cell.d-1_5 { animation-delay: 1.5s; }
.grid-cell.du-2 { animation-duration: 3s; }
.grid-cell.du-8 { animation-duration: 4s; }

@keyframes float-bottom-20 { 0% { transform: translateY(0); } 50% { transform: translateY(5px); } 100% { transform: translateY(0); } }
@keyframes float-left-20 { 0% { transform: translateX(0); } 50% { transform: translateX(5px); } 100% { transform: translateX(0); } }
@keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fade-out { 0% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes grow { 0% { width: 0; margin-left: 80%; } 100% { width: 80%; margin-left: 0; } }
@keyframes scale33 { 0% { opacity: 1; width: 0; left: 50%; } 100% { width: 33%; left: 33%; opacity: 1; } }
@keyframes scale72 { 0% { opacity: 1; width: 0; left: 50%; } 100% { width: 72%; left: 14%; opacity: 1; } }

/* Popups */
.hidden { display: none !important; }

#onboarding-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(8, 32, 58, 0.8); z-index: 10000; display: flex; justify-content: center; align-items: center; animation: fade-in 0.5s; }
#onboarding-modal { background-color: #08203A; border: 2px solid #8EE3F1; padding: 30px; max-width: 500px; text-align: center; }
#onboarding-modal p { font-size: 20px; line-height: 1.6; margin-top: 20px; }
.modal-name-section { display: flex; gap: 15px; }
.modal-name-section input { flex-grow: 1; background-color: #0a2949; border: 1px solid #8EE3F1; color: #8EE3F1; padding: 10px; font-family: 'Share Tech Mono', monospace; font-size: 16px; }
.modal-name-section input::placeholder { color: #5c8b94; }
.modal-buttons { margin-top: 20px; display: flex; justify-content: center; gap: 15px; }
#onboarding-modal button { font-family: 'Share Tech Mono', monospace; background-color: transparent; border: 1px solid #8EE3F1; color: #8EE3F1; padding: 10px 20px; font-size: 16px; cursor: url("img/cursor.png"), auto; transition: background-color 0.2s, color 0.2s; }
#onboarding-modal button:hover { background-color: #8EE3F1; color: #08203A; }

/* Estilos para a Tela de Conclusão */
#completion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(8, 32, 58, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fade-in 0.5s;
}
#completion-modal {
    background-color: #08203A;
    border: 2px solid #63f1a8; /* Cor verde para sucesso */
    box-shadow: 0 0 20px rgba(99, 241, 168, 0.5);
    padding: 40px;
    max-width: 600px;
    text-align: center;
}
#completion-modal h2 {
    font-family: 'Russo One', sans-serif;
    color: #63f1a8;
    font-size: 28px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}
#completion-modal p {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 15px;
}
#completion-modal button {
    font-family: 'Share Tech Mono', monospace;
    background-color: transparent;
    border: 1px solid #63f1a8;
    color: #63f1a8;
    padding: 12px 25px;
    font-size: 16px;
    cursor: url("img/cursor.png"), auto;
    transition: background-color 0.2s, color 0.2s;
    margin-top: 20px;
}
#completion-modal button:hover {
    background-color: #63f1a8;
    color: #08203A;
}