/* Ads */

/* Objects */

#greenRectBound {
    width: 1.81vw;
    height: 94.5vh;
    background-color: #4CAF50;
    border-radius: 10px;
    position: fixed;
    top: 50%;
    left: 99.9%;
    transform: translate(-50%, -50%);
    z-index: 1000;

    display: none;
    opacity: 0;

    box-shadow: 0 0 20px #4CAF50, 0 0 40px #4CAF50, 0 0 60px #4CAF50;
}
#redRectBound {
    width: 1.81vw;
    height: 94.5vh;
    background-color: #af4c4c; 
    border-radius: 10px;
    position: fixed;
    top: 50%;
    left: .1%;
    transform: translate(-50%, -50%);
    z-index: 1000;

    display: none;
    opacity: 0;

    box-shadow: 0 0 20px #af4c4c, 0 0 40px #af4c4c, 0 0 60px #af4c4c;
}
#whiteRectBound {
    width: 1.81vw;
    height: 5.5vh;
    background-color: #ffffff; 
    border-radius: 10px;
    position: fixed;
    top: 1%;
    left: 99.9%;
    transform: translate(-50%, -50%);
    z-index: 1000;

    display: none;
    opacity: 0;

    box-shadow: 0 0 20px #ffffff, 0 0 40px #ffffff, 0 0 60px #ffffff;
}

.projectile {
    width: 5.5vh;        
    height: 1.81vw;
    background-color: #af4c4c;
    border-radius: 10px;
    position: fixed;
    left: 0.5%;           
    transform: translateY(-50%);
    z-index: 2000;

    box-shadow: 0 0 20px #9b1e1e, 0 0 40px #8536ec, 0 0 60px #f301015e;
}


#speed-selector {
    position: fixed;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
}

.speed-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.6);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.speed-circle:hover {
    transform: scale(1.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    border-color: white;
}

.speed-circle.active {
    box-shadow: 0 0 8px 3px white, 0 2px 6px rgba(0,0,0,0.5);
    transform: scale(1.3);
}

#green-circle { background-color: #4CAF50; } 
#yellow-circle { background-color: #FFEB3B; } 
#red-circle { background-color: #F44336; } 

@media (max-width: 768px) {
    .speed-circle { width: 14px; height: 14px; }
}


.red-box {
    width: 100px;
    height: 100px;
    background-color: red;
    border-radius: 10px;
    transform-origin: center center;
}

@keyframes expand-fade {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(5);
        opacity: 0;
    }
}

.red-box.expand-fade {
    animation: expand-fade 6s forwards;
    z-index: 2000;
}

#random-center-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5em;
    color: #ff5252;
    z-index: 1001;
    text-align: center;
    pointer-events: none;
    display: none;
}

#final-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}

#final-random-text {
    font-size: clamp(2rem, 10vw, 8rem);
    font-weight: bold;
    color: white;
    margin-bottom: 20px;
    padding: 20px 40px;
    border: 4px solid white;          
    border-radius: 15px;              
    background: rgba(0, 0, 0, 0.5);   
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.6), 
        0 0 40px rgba(255, 0, 0, 0.4),     
        inset 0 0 15px rgba(255, 255, 255, 0.3); 
    text-shadow: 0 0 10px rgba(255,255,255,0.7);
    display: inline-block;
}

#final-subtext {
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-align: center;
    position: relative;
    color: #D32F2F;
    -webkit-text-stroke: 1.5px white;
    text-shadow: 2px 2px 0 #8B0000, -2px -2px 0 #FF6347;
    background: linear-gradient(45deg, #FF4E50, #F9D423);
    -webkit-text-fill-color: transparent;
    transform: perspective(500px) rotateX(10deg);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#final-subtext.show {
    opacity: 1;
}

#newSEQ-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: red;
  font-size: 10vw;       
  font-weight: bold;
  text-align: center;
  z-index: 3000;
  width: 80vw;         
  line-height: 1.2;
}

#score-display {
  position: fixed;
  bottom: 2vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3vw;
  font-weight: bold;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5vh 1vw;
  border-radius: 1vw;
  text-align: center;
  z-index: 3000;
  box-shadow: 0 0 10px rgba(0,0,0,0.7);

  display: none;
  opacity: 0;
}



/* General styles */

body {
    background: linear-gradient(135deg, #13547a, #179);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    margin: 0;
    padding: 20px;
}

h1 {
    font-family: Arial, sans-serif;
    color: white;
    text-align: center;
}

.better-me {
    color: red;
}

.header-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5%;
    margin-left: -12%;
    font-size: clamp(1.5rem, 2vw, 2em);
    margin-bottom: -20px;
    flex-wrap: wrap;
    position: relative; /* needed for splash text absolute */
}

.row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 20%;
    gap: 80px;
    font-size: clamp(1.5rem, 2vw, 2em);
    flex-wrap: wrap;
}

/* Splash Text Overlay */
#splash-text {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotate(-15deg);
    font-family: "Arial Black", sans-serif;
    font-size: clamp(1rem, 5vw, 1rem);
    color: yellow;
    text-shadow: 2px 2px 0 #000;
    white-space: nowrap;
    z-index: 9999;
    

    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { /* Reminder: modify this Annoying Thing! (or maybe i'll just...) */
    0%, 100% {
        transform: scale(1);
    } 
    50% {
        transform: scale(1.1);
    }
}


#gone {
    margin-left: 0;
    position: static;
}

#stopwatch {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 1000;
    font-family: Arial, sans-serif;
    font-size: 2em;
    color: white;
    background: rgba(0,0,0,0.3);
    padding: 8px 18px;
    border-radius: 10px;
    display: none;
    pointer-events: none;
    user-select: none;
}

/* Responsive tweaks */

@media (max-width: 1280px){
    #splash-text {
        transform: translateX(-160%) translateY(580%) rotate(-3.75deg);
        font-size: clamp(0.8rem, 2vw, 1.5rem);
    }

}


@media (max-width: 1024px) {
    #splash-text {
        transform: translateX(-118%) translateY(420%) rotate(-5.75deg);
        font-size: clamp(0.8rem, 2vw, 1.5rem);
    }
    .header-row {
        margin-left: -5%;
    }
    .row {
        margin-left: 10%;
        gap: 60px;
    }
}

@media (max-width: 768px) {
    #splash-text {
        transform: translateX(-90%) translateY(280%) rotate(-2.5deg);
        font-size: clamp(0.8rem, 6vw, 1.5rem);
    }
    
    .header-row {
        flex-direction: column;
        margin: 5% auto -20px auto;
        font-size: 1.5em;
        text-align: center;
    }
    .row {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        font-size: 1.5em;
        margin: 0 auto;
    }
    #gone {
        margin-left: 0;
    }
    #abstainMe-box {
        font-size: 1.2em;
        width: 90%;
        margin: 10px auto;
    }
    #text-box {
        justify-content: center;
    }
    .red-box {
    width: 85px;
    height: 85px;
    }
}

@media (max-width: 585px) {
    #splash-text {
        transform: translateX(-80%) translateY(290%) rotate(-2.5deg);
        font-size: clamp(0.7rem, 7vw, 1.119rem);
    }
    .wordfade p {
        flex-direction: row;
        text-align: center;
        font-size: .6em;
    }
    .red-box {
    width: 55px;
    height: 55px;
    }
}

@media (max-width: 400px) {
    #splash-text {
        transform: translateX(-85%) translateY(370%) rotate(-2.5deg);
        font-size: clamp(0.6rem, 8vw, 1rem);
    }
    .wordfade {
        flex-direction: column;
        gap: 20px;
        font-size: 3em;
        margin-top: 150px;
    }
    .row {
        gap: 20px;
    }
    #abstainMe-box {
        font-size: 1em;
    }
    .red-box {
    width: 50px;
    height: 50px;
    }
}

/* Navigation styles */
nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
    font-family: inherit;
    margin: 0;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover,
nav ul li a:focus {
    background-color: rgba(255 255 255 / 0.3);
    outline: none;
}

/* Web's Meat Styles */

#text-box input[type="text"] {
    border: none;
    outline: none;
    padding: 16px;
    border-radius: 8px;
    background: transparent;
    color: white;
    width: 200px;
    margin: 20px auto;
    display: block;
    font-size: 1rem;
    box-shadow: none;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    transition: border-color 0.2s;
}

#text-box input[type="text"]:focus {
    border-bottom: 2px solid #fff;
}

#abstainMe-box {
    border: 2px solid #ff2b2be4;
    padding: 10px 25px;      
    border-radius: 8px;
    background: #f9f9f9;
    width: fit-content;
    margin: 20px auto;
    height: auto;            
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;         
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

#abstainMe-box:hover {
    background-color: #ffeded;   
    border-color: #ff2b2b;       
}

#abstainMe-box p {
    font-family: Arial, sans-serif;
    color: #000000e4;
    text-align: center;
    font-weight: bold;
    margin: 0;                   
    font-size: 1rem;             
    user-select: none;           
}

.fade-out {
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

/* Transition Words Styles */

@keyframes fade {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.wordfade {
    display: flex;
    gap: 2.3vw; /* proportional horizontal gap 'cause i forget*/
    justify-content: center;
    margin-top: 13vh; /* proportional vertical spacing */
    font-size: 10vw; /* scales with viewport width */
    flex-wrap: wrap;
}

.wordfade p {
    opacity: 0;
}

.fadein p {
    opacity: 0;
    animation: fade 5s ease-in-out forwards;
}

.fadein p:nth-child(1) { animation-delay: 1s; }
.fadein p:nth-child(2) { animation-delay: 2s; }
.fadein p:nth-child(3) { animation-delay: 3s; }
.fadein p:nth-child(4) { animation-delay: 4s; }
.fadein p:nth-child(5) { animation-delay: 5s; }

.fadeout {
    color: blue;
    display: none;
}

* {
    -webkit-user-drag: none;
    user-select: none; 
}

footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 0;
    text-align: center;
    box-sizing: border-box;
    z-index: 1000;   
}

footer p {
    color: white;
    font-family: Arial, sans-serif;
    margin: 0;
}
