html{

      width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
   font-family: 'Orbitron', sans-serif;

}

body {
    background: rgb(224, 149, 10);
    color: #111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
     overflow-x: hidden; /* Still hides horizontal overflow */
    overflow-y: auto;   /* Allows vertical scroll */
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    width: 100%;
    margin: 0;
    padding: 0;
    max-width: 100vw;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 1%;
    background: rgb(255, 235, 199);
    border-bottom: 1px solid rgb(255, 42, 0);
    position: relative;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, rgb(255, 42, 0), #ff5e00);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color:#fff;
    box-shadow: 0 0 15px rgba(255, 42, 0, 0.5);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: rgb(255, 94, 0);
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    color: rgb(255, 94, 0);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a:hover {
    background: rgba(255, 42, 0, 0.1);
    color:rgb(255, 150, 0);
}

.game-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #fff;
    position: relative;
    max-width: 100%;
    width: 100%;
    padding: 0 10%;
}

.game-title h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ff5e00;
    margin-bottom: 10px;
    text-align: center;
}

.game-title p {
    color: #555;
    font-size: 1.1rem;
     text-align: center;
}

.start-lights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    margin: 40px auto;
    padding: 20px;
    border: 1.90px solid rgb(255, 94, 0);
    background-color: rgb(255, 255, 255);
    border-radius: 12px;
    width: 90vw;
    max-width: 480px;
    box-sizing: border-box;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    aspect-ratio: 4 / 3;
    
}

.light {
    width: 100px;
    height: 90px;
    border-radius: 50%;
    background: #ddd;
    box-shadow: 0 0 5px #aaa;
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.light.active {
    background: #ff2a00;
    box-shadow: 0 0 20px rgba(255, 42, 0, 0.9);
}

.light.go {
    background: transparent;
    box-shadow: none;
}

.timer-display {
    font-size: 4rem;
    font-weight: 700;
    color: #228B22;
    background: #e0ffe0;
    padding: 10px 30px;
    border-radius: 15px;
    font-family: 'Courier New', monospace;
    margin-bottom: 20px;
}

.message {
    font-size: 1.5rem;
    font-weight: 600;
    color: #cc5500;
    margin: 20px 0;
    height: 50px;
    text-align: center;
}

.stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
     margin-bottom: 30px; /* 👈 Add this line */
}

.stat-card {
    background: #f2f2f2;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 160px;
    border: 1px solid #ddd;
}

.stat-card h3 {
    color: #888;
    font-size: 1rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-family: 'Courier New', monospace;
}

.best .stat-value {
    color: #d4af37;
}

.average .stat-value {
    color: #228b22;
}

.attempts .stat-value {
    color: #dc143c;
}

footer {
  background-color: #fff7e6;
  color: #333;
  text-align: center;
  padding: 10px 10px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  border-top: 1px solid #ff5e00;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.05);
  line-height: 1.4;
}

footer p {
  margin: 6px 0;
}

footer a {
  color: #ff5e00;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #ff2a00;
  text-decoration: underline;
}

footer strong {
  color: #ff2a00;
}

footer small,
footer p:last-of-type {
  font-size: 11px;
  color: #666;
}

.jump-start .message {
    color: #dc143c;
    animation: shake 0.4s ease;
}
.announcement-bar {
    width: 100%;
    overflow: hidden;
    background:  rgb(253, 199, 91);
    color: #fff;
    font-weight: bold;
    padding: 8px 0;
    position: relative;
    z-index: 200;
}

.announcement-text {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 25s linear infinite;
    font-size: 1rem;
    padding-left: 100%;
    will-change: transform;
    text-shadow: none;
    transform: translateZ(0); /* Improves performance on some mobile browsers */
    -webkit-backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    backface-visibility: hidden;
}

.announcement-text:hover {
    animation-play-state: paused;
    cursor: pointer;
}

.announcement-bar:hover .announcement-text {
    animation-play-state: paused;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  max-width: 90%;
  text-align: center;
  font-family: 'Segoe UI', sans-serif;
}

.modal-text {
  font-size: 18px;
  color: #333;
  white-space: pre-wrap;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 22px;
  cursor: pointer;
  color: #888;
}


@keyframes marquee {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@media (max-width: 600px) {
    .game-container {
        align-items: center; /* Keep it centered */
        padding-left: 16px;
        padding-right: 16px;
    }
    header{
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 15px;

    }
    .light {
        width: 60px;
        height: 60px;
    }

    .timer-display {
        font-size: 2.5rem;
        padding: 8px 20px;
    }

    .game-title h1 {
        font-size: 1.8rem;
    }

    .message {
        font-size: 1.1rem;
    }

    .stat-card {
        min-width: 100px;
        padding: 10px;
    }
}
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 15px;
    }

    .logo {
        gap: 8px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .logo-text {
        font-size: 18px;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    nav a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

