:root {
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --accent: #a78bfa;
}

* {
    margin: 0%;
    padding: 0%;
    box-sizing: border-box;
}

html,
body {
    background: linear-gradient(135deg, #0f0c29, #322d68, #24243e);
    background-attachment: fixed;
    min-height: 100%;
}

#main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}


#header {
    text-align: center;
    padding: 40px 20px 10px;
    animation: fadeDown 0.8s ease both;
}

.game-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 30px rgba(167, 139, 250, 0.6);
}

.game-title span {
    color: var(--accent);
}

.game-desc {
    margin-top: 10px;
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#hud {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px auto 0;
    padding: 14px 30px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    width: fit-content;
    animation: fadeDown 0.9s ease both;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.hud-label {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
}

.hud-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    transition: color 0.3s;
}

#combo-box.active .hud-value {
    color: #facc15;
    text-shadow: 0 0 10px #facc15;
}

#color-history {
    display: flex;
    gap: 5px;
    align-items: center;
}

.color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: scale(1.3);
}

.rect {
    display: flex;
}

.shape {
    height: 200px;
    width: 200px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    margin: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease; 
  cursor: pointer;
}

.shape:hover {
  transform: scale(1.07) translateY(-4px); 
}

h1 {
    font-family: 'Rajdhani', sans-serif;
    color: #6e52c0;
}

.name {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    color: #513b95;
    line-height: 1.4;
    transition: opacity 0.3s;
    pointer-events: none;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .shape {
    height: 130px;
    width: 130px;
    margin: 5px;
    border-radius: 14px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .name {
    font-size: 0.65rem;
  }

  #hud {
    gap: 15px;
    padding: 10px 16px;
    flex-wrap: wrap;
  }

  .hud-value {
    font-size: 0.95rem;
  }

  .game-title {
    font-size: 1.8rem;
    letter-spacing: 2px;
  }

  .game-desc {
    font-size: 0.8rem;
    padding: 0 15px;
  }

  #header {
    padding: 20px 15px 10px;
  }
}

@media (max-width: 340px) {
  .shape {
    height: 100px;
    width: 100px;
  }
}