:root {
  --bg-1: #fef9f4;
  --bg-2: #d6f0ff;
  --card: #ffffff;
  --text: #222;
  --muted: #777;
  --primary: #0066ff;
  --accent: #00d4a3;
  --shadow: 0 12px 40px rgba(0,0,0,0.12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: 'Baloo 2', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(circle at top left, var(--bg-1), var(--bg-2));
}
body {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  color: var(--text);
}

/* Splash */
#splash {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #fff, #f0faff);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: splashFade 2s ease forwards;
  animation-delay: 2.5s;
}
#splash img { max-width: 320px; height: auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15)); }
@keyframes splashFade { to { opacity: 0; visibility: hidden; } }

/* Intro container with close */
.container {
  position: relative;
  background: var(--card);
  padding: 36px 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 900px;
  width: 100%;
  transition: opacity 0.5s ease, transform 0.5s ease;
  animation: fadeInUp 0.8s ease;
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: #f5f5f5;
  color: #111;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 0.3s, transform 0.2s;
}
.close-btn:hover { background: #e0e0e0; transform: rotate(90deg); }

.water-fill {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--accent), #00aaff);
  animation: fill 5s forwards;
  border-radius: var(--radius);
  margin-bottom: 24px;
}
@keyframes fill { from { height: 0; } to { height: 80%; } }

h1 { font-size: 2.4rem; color: var(--primary); margin: 0 0 18px; font-weight: 700; }
p { font-size: 1.05rem; line-height: 1.7; margin: 0 0 14px; }
.footer { margin-top: 20px; font-size: 0.9rem; color: var(--muted); text-align: center; }

.hidden { display: none; }

.app {
  margin-left: 220px; /* same width as sidebar */
  padding: 1rem;
}

/* Cards */
.card {
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.15); }
.card h2 { margin: 0 0 16px; color: var(--primary); font-weight: 600; }

/* Forms */
label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
input, textarea, button { font: inherit; }
input, textarea {
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
  transition: border 0.3s, box-shadow 0.3s;
}
input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.15);
  outline: none;
}
button.primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
}
button.primary:hover { background: #0050cc; transform: translateY(-2px); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

/* Results */
.results {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: #f7fbff;
  border: 1px solid #dde9f7;
  font-size: 1rem;
}

/* Accordion */
.accordion .item { border: 1px solid #eee; border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.accordion-toggle {
  width: 100%;
  text-align: left;
  background: #fafafa;
  border: none;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}
.accordion-toggle:hover { background: #f0f0f0; }
.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.accordion-content.open {
  padding: 14px 16px;
}

/* Comments */
.comments {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
}
.comments li {
  border: 1px solid #eee;
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  transition: box-shadow 0.3s;
}
.comments li:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.comment-meta { color: var(--muted); font-size: 0.85rem; }
.delete-btn {
  background: #ff5252;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s;
}
.delete-btn:hover { background: #e04444; }

@media (max-width: 640px) {
  .container, .card { padding: 20px; }
  h1 { font-size: 2rem; }
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100%;
  background: #1e1e1e;
  color: #eee;
  padding: 1rem;
  overflow-y: auto;
  box-shadow: 2px 0 6px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
  z-index: 999;
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin: 0.8rem 0;
}

.sidebar a {
  color: #66ccff;
  text-decoration: none;
  font-weight: bold;
}

.sidebar a:hover {
  text-decoration: underline;
}

