:root {
  --bg: #0f172a;
  --bg2: #111827;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-2: #a78bfa;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg2: #e2e8f0;
  --card: rgba(255, 255, 255, 0.75);
  --card-border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #475569;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg), var(--bg2));
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-1 {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.22), transparent 30%),
    radial-gradient(circle at bottom right, rgba(167, 139, 250, 0.16), transparent 32%);
}

.bg-2 {
  background:
    linear-gradient(120deg, rgba(255,255,255,0.02), transparent 35%);
  opacity: 0.8;
}

.app {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
}

.hero,
.panel,
.section,
.footer {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px;
  margin-bottom: 20px;
}

.badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(96, 165, 250, 0.12);
}

h1 {
  margin: 0 0 8px;
  font-size: 36px;
  line-height: 1.1;
}

p {
  margin: 0;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 10px;
}

.btn,
.icon-btn {
  border: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.search-wrap {
  display: flex;
  gap: 10px;
  flex: 1;
}

#searchInput {
  flex: 1;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

#searchInput::placeholder {
  color: var(--muted);
}

.clock {
  min-width: 190px;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.section {
  padding: 22px;
  margin-bottom: 20px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.section h2 {
  margin: 0;
  font-size: 20px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

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

.card {
  display: flex;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(96, 165, 250, 0.35);
}

.icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(96, 165, 250, 0.16);
  color: var(--accent);
  font-weight: 800;
  flex-shrink: 0;
}

.card-content h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.card-content p {
  font-size: 14px;
  line-height: 1.6;
}

.footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
  padding: 16px 20px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .hero,
  .panel,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .clock {
    text-align: left;
    min-width: auto;
  }

  .search-wrap {
    flex-direction: column;
  }

  .btn,
  .icon-btn {
    width: 100%;
  }

  h1 {
    font-size: 30px;
  }
}
