:root {
  --bg:#0d1b2a;
  --card:#1b263b;
  --accent:#415a77;
  --hover:#a9bcd0;
  --text:#e0e1dd;
  --radius:16px;
}

* { box-sizing:border-box; margin:0; padding:0 }

body {
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:20px;
}


header {
  margin:20px 0;
  text-align:center;
}

header h1 {
  font-size:2rem;
  font-family: 'Russo One', sans-serif;
  font-weight:700;
  letter-spacing:2px;
  color:#fff;
  display:inline-block;
}


header h1 span {
  display:inline-block;
  animation: colorShift 2s linear infinite;
  background: linear-gradient(90deg, #ff0084, #ff00a6, #ff00ee, #bb00ff, #6a00ff, #00fbff, #ff2f00);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes colorShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


.grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:15px;
  width:100%;
  max-width:1000px;
  margin-top:30px;
}

.card {
  background:var(--card);
  padding:16px;
  border-radius:var(--radius);
  box-shadow:0 6px 20px rgba(0,0,0,0.3);
  transition:transform 0.25s ease, box-shadow 0.25s ease;
  cursor:pointer;
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.card:active {
  transform:scale(0.98);
}

.word {
  font-size:1.3rem;
  color:var(--hover);
  font-family:'Russo One', sans-serif;
  margin-bottom:8px;
}

.definition {
  font-size:1rem;
  line-height:1.4;
  color:var(--text);
  font-family:'Roboto', sans-serif;
}


.example {
  font-size:0.9rem;
  line-height:1.3;
  color:#ddd;
  font-family:'Raleway', sans-serif;
  margin-top:10px;
  opacity:0;
  max-height:0;
  overflow:hidden;
  transform: translateY(10px);
  transition: opacity 0.4s ease, max-height 0.4s ease, transform 0.4s ease;
}

.card.active .example {
  opacity:1;
  max-height:200px;
  transform: translateY(0);
}


footer {
  margin-top:40px;
  font-size:0.9rem;
  color:#bbb;
  font-family:'Raleway', sans-serif;
  transition:color 0.3s ease;
}

footer:hover {
  color:var(--hover);
  cursor:pointer;
}


@media (max-width:600px) {
  header h1 {
    font-size:1.6rem;
  }
  .word {
    font-size:1.1rem;
  }
}
