:root {
  --primary: #0EA5E9;
  --secondary: #38BDF8;
  --accent: #7DD3FC;
  --background: #0C1929;
  --surface: #1E293B;
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --danger: #EF4444;
  --success: #22C55E;
  --border-radius: 12px;
  --nav-height: 60px;
  --header-height: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
}

/* Header */
.app-header {
  height: var(--header-height);
  background-color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.app-header h1 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* Main Content Area */
.content-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 16px;
  background-color: var(--background);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}

.view.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

/* Map View */
#view-map {
  padding: 0; /* Full screen map */
}

.map-container {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #000;
  overflow: hidden;
}

#map-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.compass-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: rgba(30, 41, 59, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s linear;
}

.compass-arrow {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 20px solid var(--danger); /* North */
}

.compass-arrow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 0);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 20px solid var(--text-secondary); /* South */
}

.navigation-info {
  position: absolute;
  bottom: 80px; /* Above nav bar */
  left: 16px;
  right: 16px;
  background-color: var(--surface);
  padding: 16px;
  border-radius: var(--border-radius);
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 5;
}

.instruction-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#instruction-text {
  font-size: 1.1rem;
  font-weight: 500;
}

#distance-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

/* Venue List */
.list-group {
  list-style: none;
  padding: 0;
  margin-top: 16px;
}

.list-group-item {
  background-color: var(--surface);
  padding: 16px;
  margin-bottom: 12px;
  border-radius: var(--border-radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-group-item h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.venue-actions button {
  margin-left: 8px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

input[type="text"],
input[type="file"],
select {
  width: 100%;
  padding: 12px;
  background-color: var(--surface);
  border: 1px solid #334155;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
  display: inline-block;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text-secondary);
  border: 1px solid #334155;
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}

.full-width {
  width: 100%;
}

/* Bottom Nav */
.bottom-nav {
  height: var(--nav-height);
  background-color: var(--surface);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #334155;
  z-index: 10;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex: 1;
  height: 100%;
  justify-content: center;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item .icon {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.nav-item .label {
  font-size: 0.75rem;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.3s;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background-color: var(--surface);
  padding: 24px;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 400px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.import-export-area {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Utility */
.hidden {
  display: none !important;
}
