:root {
  --progress-degree: 0%;
  --bg-dark: #3D405B;
  --bg-light: #F4F1DE;
  --accent-primary: #E07A5F;
  --accent-secondary: #81B29A;
  --text-dark: #3D405B;
  --text-light: #F4F1DE;
  --transition-speed: 0.4s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', 'Roboto', sans-serif;
}

html, body {
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.main {
  width: 450px;
  max-height: 85vh;
  max-width: 95vw;
  max-height: 900px;
  background: var(--bg-light);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem;
  gap: 1.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.heading h2 {
  color: var(--accent-primary);
  font-size: 2rem;
  font-weight: 700;
}

.inputBox {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 100%;
}

.userInput {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  max-width: 100%;
}

@media screen and (max-width:414px) {
    .userInput{
        flex-direction: column;
    }
}

#username {
  flex: 1;
  padding: 0.7rem 1rem;
  background-color: #ffffff;
  color: var(--text-dark);
  border: 2px solid var(--accent-primary);
  border-radius: 8px;
  outline: none;
  font-size: 1rem;
  transition: border-color var(--transition-speed) forwards;
}

#username::placeholder {
  color: #a9a69a;
}

#username:focus {
  border-color: var(--accent-secondary);
}

button {
  padding: 0.7rem 1.5rem;
  background-color: var(--accent-primary);
  color: var(--text-light);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

button:hover {
  background-color: #e4866b;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(224, 122, 95, 0.3);
}

.stats {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
  width: 100%;
}

.graphicRepresentation {
  display: flex;
  justify-content: space-evenly;
  gap: 1rem;
  margin-bottom: 2rem;
}

.circle {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: conic-gradient(
    var(--accent-secondary) var(--progress-degree, 0%),
    #e0ddd3 0%
  );
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.292);
  color: var(--text-dark);
  transition: transform var(--transition-speed);
}

.circle:hover {
    transform: scale(1.05);
}

.circle h6 {
  font-size: 0.9rem;
  font-weight: bold;
  opacity: 1;
  opacity: 0;
  position: absolute;
}

.circle p {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  width: 100%;
}

.card {
  background: #fdfaf0;
  color: var(--text-dark);
  padding: 1rem;
  border-radius: 12px;
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(61, 64, 91, 0.1);
  text-align: center;
  transition: all var(--transition-speed) ease-in-out;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(61, 64, 91, 0.2);
  border-color: var(--accent-secondary);
}

.card h6 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.card p {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-primary);
}
