/* =========================
   base
   ========================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  padding: 0;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: #fff;
  overflow: hidden;
}

h1, h2 {
  font-family: "Bebas Neue", sans-serif;
  font-weight: bold;
  letter-spacing: 0.15rem;
  font-size: 28px;
  margin: 0 0 10px 0;
}

/* links */
a {
  cursor: pointer;
  color: #39ff14;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #2ac40f;
}

/* scrollbars */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}

/* =========================
   layout
   ========================= */

body {
  height: 100vh;
  background: url("img/background.webp") center / cover no-repeat fixed;
}

#header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding: 20px 30px 40px 30px;
}

.header-left {
  justify-self: start;
}

.header-center {
  display: flex;
  justify-content: center;
  align-items: center;
  justify-self: center;
}

.header-right {
  justify-self: end;
  display: flex;
  align-items: flex-start;
}

#main {
  display: flex;
  gap: 16px;
  height: calc(100vh - 100px);
  padding: 0 30px;
}

.panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.panel-content {
  overflow-y: auto;
  padding-bottom: 120px;
  flex: 1;
}

.left-panel {
  width: 260px;
}

.right-panel {
  flex: 1;
}

#results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 80px;
}

@media (max-width: 1500px) {
  #results {
    grid-template-columns: 1fr;
  }
}

/* footer */
#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  z-index: 1000;
  background: rgba(20,20,20,0.4);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08);
}

#footer::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(20,20,20,0.6), transparent);
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.hidden {
  display: none;
}

/* =========================
   components
   ========================= */

/* logo */
.logo-wrap {
  display: inline-block;
  position: relative;
}

#logo-img {
  max-height: 50px;
  display: block;
}

/* version badge */
.version-badge {
  position: absolute;
  top: 1px;
  right: -60px;

  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;

  border: 1px solid rgba(44, 206, 15, 0.5);
  background: rgba(44, 206, 15, 0.12);
  color: #2cce0f;

  line-height: 1;
  white-space: nowrap;
}

/* header text */
#user-count {
  color: #39ff14;
  font-size: 12px;
}

/* buttons */
button {
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  padding: 6px 12px;
  margin-right: 6px;
  margin-bottom: 10px;

  cursor: pointer;

  color: #ccc;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;

  backdrop-filter: blur(6px);
  transition: all 0.15s ease;
}

button:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

button.active {
  color: #000;
  background: #39ff14;
  border-color: #39ff14;
}

.reset-btn {
  border-color: rgba(255,80,80,0.4);
  color: #ff6b6b;
}

.reset-btn:hover {
  background: rgba(255,80,80,0.1);
}

/* symptoms */
.symptom {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
}

/* condition */
.condition {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px 30px 15px 20px;
  margin-bottom: 10px;
  margin-right: 30px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

.section-title {
  font-weight: bold;
  margin-top: 8px;
  margin-bottom: 2px;
  font-size: 18px;
}

.condition-name {
  margin-bottom: 6px;
}

/* grids */
.symptom-list,
.treatment-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 12px;
}

/* treatment */
.treatment-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.treatment-color {
  width: 14px;
  height: 14px;
}

/* theme button */
#theme-switch {
  width: 34px;
  height: 34px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-right: -3px;
  padding: 0;

  cursor: pointer;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
}

#theme-switch .material-symbols-rounded {
  font-size: 18px;
  line-height: 1;
  color: #ccc;
  transition: color 0.2s ease;
}

/* footer link */
#footer-link {
  cursor: pointer;
  color: #888;
  transition: color 0.2s ease, opacity 0.2s ease;
}

#footer-link:hover {
  color: #545454;
}

/* modal */
.modal-content {
  background: #111;
  padding: 0 20px 10px 20px;
  width: 500px;
  max-width: 90%;
  border-radius: 10px;
  position: relative;
}

.modal-content p {
  font-size: 12px;
}

.modal-content h4 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 16px;
  letter-spacing: 0.1rem;
  margin-bottom: -8px;
}

#modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  cursor: pointer;
  font-size: 18px;
  color: #aaa;
}

#modal-close:hover {
  color: #fff;
}

/* =========================
   theme
   ========================= */

body.light {
  background:
    radial-gradient(circle at 20% 20%, #ffffff 0%, #e6f0ff 40%, transparent 60%),
    radial-gradient(circle at 80% 30%, #dbeafe 0%, transparent 60%),
    linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #111;
}

body.light #theme-switch {
  background-color: rgba(51, 51, 51, 0.055);
  border: 1px solid rgba(51, 51, 51, 0.258);
}

body.light #theme-switch .material-symbols-rounded {
  color: rgba(51, 51, 51, 0.395);
}

body.light #logo-img {
  content: url("img/logo-black.webp");
}

body.light .version-badge {
  border: 1px solid rgba(44, 206, 15, 0.6);
  background: rgba(44, 206, 15, 0.15);
  color: #1fa80c;
}

body.light #user-count {
  color: #2cce0f;
}

body.light button {
  color: #333;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
}

body.light button:hover {
  background: rgba(0,0,0,0.08);
  color: #000;
}

body.light button.active {
  background: #2cce0f;
  border-color: #2cce0f;
  color: #fff;
}

body.light .reset-btn {
  color: #ff2b2b;
  border-color: rgba(255, 43, 43, 0.45);
  background: rgba(255, 43, 43, 0.08);
}

body.light .condition {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.08);
  color: #111;
  border: 1px solid #c0c0c0;
}

body.light #footer {
  background: rgba(240, 240, 240, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,0,0,0.08);
}

body.light #footer::before {
  background: linear-gradient(to top, rgba(255,255,255,0.7), rgba(255,255,255,0));
}

body.light a {
  color: #2cce0f;
}

body.light a:hover {
  color: #23a10d;
}

body.light #footer-link {
  color: #888;
}

body.light #footer-link:hover {
  color: #505050;
}

body.light .modal-content {
  background: #ebebeb;
}

body.light .modal-content p,
body.light .modal-content h4 {
  color: #222;
}

body.light #modal-close {
  color: #222;
}

body.light #modal-close:hover {
  color: rgba(255, 43, 43, 0.7);
}

body.light ::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.25);
}