/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Inter", Arial, sans-serif;
  background: linear-gradient(135deg, #eef2ff, #fdf2f8);
  color: #1e293b;
  min-height: 100vh;
}

/* Header */
header {
  background: #4f46e5;
  color: white;
  padding: 1.2rem;
  text-align: center;
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Container */
.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Accordion (details) */
details {
  background: white;
  border-radius: 14px;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
details:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
summary {
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
}
summary::after {
  content: "➕";
  font-size: 1rem;
  transition: transform 0.3s ease;
}
details[open] summary::after {
  content: "➖";
}

/* Problem List */
ul {
  list-style: none;
  margin-top: 0.6rem;
  padding-left: 0.5rem;
  animation: fadeIn 0.4s ease;
}
li {
  margin: 0.6rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  transition: background 0.2s;
}
li:hover {
  background: #f1f5f9;
}

/* Links */
a {
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
  transition: color 0.2s;
}
a:hover {
  color: #1e40af;
  text-decoration: underline;
}

/* Difficulty Badges */
.difficulty {
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.easy { background: #dcfce7; color: #166534; }
.medium { background: #fef9c3; color: #854d0e; }
.hard { background: #fee2e2; color: #b91c1c; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
  summary { font-size: 1rem; }
  li { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
}
