/* Estilo generales */
body {
    margin: 0;
    overflow: hidden; 
    font-family: Courier, monospace;
}

/* Estilo de la card */
.message-card {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: default;
    font-family: Calibri, Candara, Arial, sans-serif;
}

.message-card.hidden {
    display: none;
}

.message-card-content {
    background: #1e1e1e;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0 1rem rgba(0,0,0,0.8);
    max-width: 400px;
    text-align: right;
}

#message-card-text {
    text-align: left;
    font-size: 1.2rem;
    font-weight: bold;
    color: #eee;
}

#message-card-text p {
    margin-top: 0px;
    margin-bottom: 0px;
}

.second-p {
    margin-top: 1rem !important;
}

#message-card-text h2 {
    font-family: Courier, monospace;
    text-align: center;
}

#message-card-text ul {
    list-style-type: none;
    padding-inline-start: 1.5rem;
}

#message-card-text li {
    margin-bottom: 0.8rem;
}

#message-card-close {
    display: inline-block;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    border-radius: 0.5rem;
    animation: arrow-beat 1.2s ease-out infinite;
    position: fixed;
}

/* Animacion de la flecha de la card */
@keyframes arrow-beat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Estilos para destacar texto */
.red-text {
    font-weight: bold;
    color: #ca0000;
}

.yellow-text {
    font-weight: bold;
    color: #ffd716;
}

.gray-text {
    font-weight: bold;
    color: #8f9195;
}

.green-text {
    font-weight: bold;
    color: #00913f;
}

/* Overlay de inicio */
#loader-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#loader-logo h1 {
    font-size: 3.5rem;
    margin-bottom: 3rem;
}

#loader-bar-container {
    width: 50%;
    /*max-width: 400px;*/
    height: 1rem;
    background: #333;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

#loader-bar {
    height: 100%;
    width: 0;
    background: #DCDCDC; /* #4caf50 */
}
    
#loader-text {
    font-size: 1rem;
    text-align: center;
}

/* Estilos para la animacion del título */
#title {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 6rem;
    letter-spacing: 0.2em;
    color: #f1f1f1;
    margin: 0;
}

#title > span {
    opacity: 0.15;
    position: relative;
}

/* Espacios del titulo */
.sp {
    width: 0.5em;
}

/* Letra I (origen luz) */
#I {
    opacity: 1;
    animation: flickerI 4s linear reverse infinite;
}

#I::after {
    content: '';
    box-shadow: -30px 0 60px 8px rgba(255,255,255,1);
}

/* Otras letras (parpadeo más suave) */
#D, #M {
    animation: flickerDM 4s linear reverse infinite;
}

#R, #E{
    animation: flickerRE 4s linear reverse infinite;
}

#H, #O1 {
    animation: flickerHO 4s linear reverse infinite;
}

#T, #O2 {
    animation: flickerTO 4s linear reverse infinite;
}

#M2 {
    animation: flickerM 4s linear reverse infinite;
}

/* Animaciones del titulo */
@keyframes flickerI {
    0%,30%,60%,100% { opacity:1; }
    5%,25%         { opacity:0.5; }
    10%,45%        { opacity:0.6; }
    15%,70%        { opacity:0.85; }
    35%            { opacity:0.1; }
    40%,80%        { opacity:0.25; }
    90%            { opacity:0.5; }
}

@keyframes flickerDM {
    0%,30%,60%,100% { opacity:0.4; }
    5%,25%         { opacity:0.2; }
    10%,45%        { opacity:0.25; }
    15%,70%        { opacity:0.35; }
    35%            { opacity:0.1; }
    40%,80%        { opacity:0.25; }
    90%            { opacity:0.2; }
}

@keyframes flickerRE {
    0%,30%,60%,100% { opacity:0.2; }
    5%,25%         { opacity:0.12; }
    10%,45%        { opacity:0.17; }
    15%,70%        { opacity:0.22; }
    35%            { opacity:0.1; }
    40%,80%        { opacity:0.17; }
    90%            { opacity:0.12; }
}

@keyframes flickerHO {
    0%,30%,60%,100% { opacity:0.12; }
    5%,25%         { opacity:0.1; }
    10%,45%        { opacity:0.15; }
    15%,70%        { opacity:0.2; }
    35%            { opacity:0.1; }
    40%,80%        { opacity:0.15; }
    90%            { opacity:0.1; }
}

@keyframes flickerTO {
    0%,30%,60%,100% { opacity:0.1; }
    5%,25%         { opacity:0.05; }
    10%,45%        { opacity:0.1; }
    15%,70%        { opacity:0.15; }
    35%            { opacity:0.05; }
    40%,80%        { opacity:0.1; }
    90%            { opacity:0.05; }
}

@keyframes flickerM {
    0%,30%,60%,100% { opacity:0.08; }
    5%,25%         { opacity:0.025; }
    10%,45%        { opacity:0.08; }
    15%,70%        { opacity:0.12; }
    35%            { opacity:0.025; }
    40%,80%        { opacity:0.08; }
    90%            { opacity:0.025; }
}

/* Overlay de finalización */
.end-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    cursor: default;
}

.end-screen.hidden {
    display: none;
}

.end-screen-content {
    text-align: center;
    background: #1e1e1e;
    padding: 2rem 3rem;
    border-radius: 1rem;
    box-shadow: 0 0 1rem rgba(0,0,0,0.8);
}

.end-screen-content h1 {
    font-size: 3.5rem;
    margin-top: 1rem;
    margin-bottom: 3rem;
}

.end-screen-text {
    text-align: center;
    margin-bottom: 3rem;
    font-family: Calibri, Candara, Arial, sans-serif;
}

.end-screen-text p {
    font-size: 1.25rem;
}

/* Estilos enlaces pantalla final */
.end-screen-text a {
    font-weight: bold;
}

.end-screen-text a:link {
    color: #5dd7ff;
    text-decoration-line: none;
}

.end-screen-text a:hover {
    color: #DCDCDC;
    text-decoration-line: underline;
}

.end-screen-text a:visited {
    color: #baa2ff;
}

#end-restart {
    background: #DCDCDC;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: Courier, monospace;
    transition: background 0.2s ease;
    transition: box-shadow 0.3s ease;
}

#end-restart:hover {
    background: #ffff;
    box-shadow: 0px 0px 12px 0px rgba(255, 255, 255, 1);
}