/* ===== Theme ===== */
:root {
    --primary-color: #2660A4;
    --secondary-color: #859db8;
    --text-color: #000000;

    --bg-color: #C9D8E9;
    --card-bg: #FFFFFF;

    --border-radius: 12px;
    --input-radius: 8px;

    --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.1);

    --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== Layout ===== */
body {
  min-height: 100vh;
  padding: 20px;

  display: flex;
  flex-direction: column;
  align-items: center;

  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

.home-button {
  align-self: flex-start;

  margin-bottom: 15px;
  padding: 10px 16px;

  background: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: 600;

  border-radius: var(--input-radius);
  box-shadow: var(--shadow);

  transition: background-color 0.3s ease;
}

.home-button:hover {
  background: #1d4a90;
}

header,
#controlPanel,
#mapContainer {
  width: 100%;
  max-width: 800px;
}

/* ===== Header ===== */
header {
  margin-bottom: 30px;
  padding: 20px;

  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: white;

  background: var(--primary-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* ===== Control Panel ===== */
#controlPanel {
  background: var(--card-bg);
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);

  padding: 20px;
  margin-bottom: 20px;

  transition: all 0.2s ease;
}

#controlPanel:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

/* ===== Form ===== */
#nodeForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#nodeForm label {
  font-size: 1.1rem;
  font-weight: 600;
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-row input {
  flex: 1;
  min-width: 0;

  padding: 14px;
  border: 2px solid #ddd;
  border-radius: var(--input-radius);
  font-size: 1rem;
}

.search-row input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(38, 102, 102, 0.2);
}

/* ===== Buttons ===== */
button {
  padding: 14px 24px;
  min-height: 44px;

  border: none;
  border-radius: var(--input-radius);

  background: var(--primary-color);
  color: white;

  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;

  transition: background-color 0.3s ease;
}

button:hover {
  background: #1d4a90;
}

/* ===== Map Container ===== */
#mapContainer {
  background: var(--card-bg);
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);

  padding: 25px;
}

#mapContainer h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 15px;
}

#nodeResult {
  margin-top: 10px;
  font-style: italic;
}

/* ===== Tablet ===== */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  header,
  #controlPanel,
  #mapContainer {
    max-width: 100%;
  }
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
  body {
    padding: 12px;
  }

  header {
    padding: 16px;
    font-size: 1.3rem;
  }

  #controlPanel,
  #mapContainer {
    padding: 15px;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-row input,
  .search-row button {
    width: 100%;
  }
}

/* ===== Small Phones ===== */
@media (max-width: 480px) {
  header {
    font-size: 1.2rem;
  }

  #controlPanel,
  #mapContainer {
    padding: 12px;
  }

  button {
    padding: 12px;
  }
}