@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');

:root{
  --bg-start: rgba(182,32,180,1);
  --bg-mid:   rgba(162,39,182,1);
  --bg-end:   rgba(116,55,188,1);
}

/* Basic page */
body{
  background-image: radial-gradient(circle 1437px at -2% 103.3%, var(--bg-start) 0%, var(--bg-mid) 10.5%, var(--bg-end) 100.2%);
  font-family: "Oswald", sans-serif;
  text-align: center;
  min-height: 100vh;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px; /* breathing room on small screens */
}

/* Card / container */
.dice{
  width: 100%;
  max-width: 920px;   /* limits width on large screens */
  padding: 20px;
  box-sizing: border-box;
}

/* Title */
.dice-title{
  margin: 0 0 18px 0;
  font-size: 1.6rem;
  letter-spacing: 0.6px;
}

/* Row layout using flexbox; will wrap on small screens */
.row{
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Each column becomes flexible but has a sensible min width */
.col-6{
  flex: 1 1 260px; /* grow shrink basis */
  max-width: 360px;
  box-sizing: border-box;
}

/* Heading inside each column */
.col-6 h3{
  margin: 6px 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
}

/* Dice images: responsive, smaller, keep aspect ratio */
.img-dice{
  display: block;
  margin: 0 auto;
  width: 70%;          /* relative size inside column */
  max-width: 180px;    /* cap on large screens */
  min-width: 90px;     /* keeps it usable on very small screens */
  height: auto;
  border-radius: 18px;
  box-shadow: 0 12px 16px rgba(0,0,0,0.45);
  transition: transform 180ms ease;
}

/* small hover pop on desktops */
@media (hover: hover) and (pointer: fine) {
  .img-dice:hover { transform: translateY(-6px) scale(1.03); }
}

/* Result text */
.head{
  margin-top: 22px;
  min-height: 28px;
  font-size: 1.15rem;
  font-weight: 700;
}

/* Button styling */
button{
  margin-top: 22px;
  height: 52px;
  border-radius: 8px;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  padding: 8px 20px;
  border: 0;
  font-size: 1.05rem;
  text-transform: uppercase;
  cursor: pointer;
}

/* Smaller devices adjustments */
@media (max-width: 640px) {
  .dice{
    padding: 12px;
  }
  .dice-title{
    font-size: 1.2rem;
  }
  .col-6{
    flex-basis: 100%;   /* stack vertically */
    max-width: 420px;
  }
  .img-dice{
    width: 48%;
    max-width: 140px;
    min-width: 80px;
  }
  .head{
    font-size: 1rem;
  }
  button{
    width: 100%;
    font-size: 1rem;
  }
}

/* Very small / narrow phones */
@media (max-width: 380px) {
  .img-dice{
    width: 56%;
    max-width: 120px;
  }
  .dice-title{
    font-size: 1.05rem;
  }
  .col-6 h3{
    font-size: 0.95rem;
  }
}
