body {
  background: #181426;
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.dashboard {
  background: #181426e6;
  border-radius: 22px;
  box-shadow: 0 8px 40px #a449c6cc;
  padding: 2.2rem;
  width: 700px;
  max-width: 97vw;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #f0a9ee;
  font-size: 2rem;
  text-shadow: 0 0 15px #f527f9;
  margin-bottom: 2.2rem;
}
.dashboard-header #date-display {
  color: #42e0cf;
  font-size: 1rem;
  text-shadow: none;
}
.dashboard-main {
  display: flex;
  gap: 2rem;
}
.joke-card {
  flex: 2;
  background: #16121c;
  border-radius: 13px;
  padding: 2.2rem 1.7rem 1.4rem;
  box-shadow: 0 0 18px #e8f04166, 0 0 22px #8f0ffc20 inset;
  border: 2px solid #f4f63c;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.joke-category {
  background: #ffe600;
  color: #232323;
  font-weight: bold;
  border-radius: 18px;
  padding: 0.44em 1.22em;
  margin-bottom: 1em;
  box-shadow: 0 0 7px 2px #f4f63c99;
  font-size: 1.14rem;
}
.joke-content {
  font-size: 1.27rem;
  margin: 0.6em 0 1.1em 0;
  text-align: center;
  min-height: 58px;
}
.joke-emoji {
  font-size: 2.4rem;
  margin-bottom: 1.1em;
  animation: pop 0.5s;
}
@keyframes pop { from {transform: scale(0.7);} to {transform: scale(1);} }
.get-joke-btn {
  background: linear-gradient(90deg, #ffba4b, #ff664a, #f527f9);
  color: #fff;
  padding: 0.8em 2em;
  border: none;
  border-radius: 2.5rem;
  box-shadow: 0 0 9px #f527f9;
  font-size: 1.12rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  letter-spacing: 1px;
  margin-top: 0.5em;
  transition: background 0.2s;
}
.get-joke-btn:hover { background: #f527f9; }

.api-selector {
  display: flex;
  gap: 1em;
  margin-top: 1.2em;
  font-size: 1em;
}

.api-selector label {
  color: #cdceee;
  font-size: 0.98em;
}
.api-selector select { margin-left: 0.25em; background: #222; color:#fff; border-radius:4px; border:none; }

.history-card {
  flex: 1;
  background: #1a1943d6;
  border-radius: 12px;
  border: 2px solid #d05fff;
  box-shadow: 0 0 14px #d05fffcc;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  max-height: 340px;
}
.history-header {
  color: #fc97ff;
  font-size: 1.1rem;
  margin-bottom: 1em;
  font-weight: bold;
}
#joke-history-list {
  list-style: none;
  padding: 0;
  overflow-y: auto;
  max-height: 234px;
}
#joke-history-list li {
  padding: 0.55em 0.1em;
  border-bottom: 1px solid #40407563;
  color: #cdceee;
  font-size: 0.93rem;
  cursor: pointer;
}
#joke-history-list li:hover {color:#f0a9ee;}

@media (max-width: 800px) {
  body {
    align-items: flex-start;
    padding: 0.5rem;
  }

  .dashboard {
    width: 95vw;
    padding: 0.8rem;
    margin: 0 auto;
  }

  /* Header always visible */
  .dashboard-header {
    font-size: 1.5rem;
    position: sticky;
    top: 0;
    background: #181426;
    padding: 0.5rem 0;
    z-index: 10;
    text-align: center;
  }

  /* Cards scroll horizontally in a compressed row */
  .dashboard-main {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
  }

  .joke-card, .history-card {
    flex: 0 0 260px;  /* narrower cards */
    min-width: 260px;
    padding: 1rem;
    font-size: 0.9rem; /* smaller text */
  }

  /* Stack API selectors vertically */
  .api-selector {
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
  }

  /* Hide scrollbar for cleaner look */
  .dashboard-main::-webkit-scrollbar { display: none; }
  .dashboard-main { -ms-overflow-style: none; scrollbar-width: none; }
   .dashboard-main { flex-direction: column; gap: 1.1rem; }
}
