/* Reset and Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background-color: #1a1a1a;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* allow page scrolling */
  min-height: 100vh;
}

/* Background Container */
.wtp-background-map {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 50px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 500"><path fill="%232c2c2c" d="M0 0h1000v500H0z"/><path fill="none" stroke="%233f3f3f" stroke-width=".5" d="M0 250h1000M500 0v500"/><path fill="%234a4a4a" d="M100 100c-20 0-40 20-40 40s20 40 40 40h80c-20 0-40-20-40-40s20-40 40-40h-80zM300 200c0-20 20-40 40-40s40 20 40 40v80c0 20-20 40-40 40s-40-20-40-40v-80zM700 300c20 0 40-20 40-40s-20-40-40-40h-80c20 0 40 20 40 40s-20 40-40 40h80zM900 400c0 20-20 40-40 40s-40-20-40-40v-80c0-20 20-40 40-40s40 20 40 40v80z"/></svg>');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  height: 100vh; /* desktop full height */
}

/* Left Content */
.wtp-left-content {
  color: #f0f0f0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  margin-right: 100px;
}

.wtp-left-content h1 {
  font-size: 3em;
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 30px;
}

.wtp-legend {
  list-style: none;
  font-size: 1.1em;
  padding-left: 0;
}

.wtp-legend li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.wtp-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 10px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.wtp-green { background-color: #5cb85c; }
.wtp-yellow { background-color: #f0ad4e; }
.wtp-red { background-color: #d9534f; }

/* Time Converter Window */
.wtp-time-converter-window {
  width: 350px;
  max-height: 550px;
  background-color: #1e1e1e;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Window Header */
.wtp-window-header {
  background-color: #161616;
  height: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  font-size: 0.8em;
  color: #888;
  user-select: none;
}

.wtp-window-title {
  font-weight: bold;
}

.wtp-window-controls {
  display: flex;
  gap: 5px;
}

.wtp-control-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #555;
}

.wtp-close {
  background-color: #d9534f;
}

/* App Controls */
.wtp-app-controls {
  display: flex;
  justify-content: flex-end;
  padding: 10px;
  color: #aaa;
  font-size: 1.5em;
}

.wtp-app-controls .wtp-icon {
  margin-left: 15px;
  cursor: pointer;
}

.wtp-app-controls .wtp-add {
  font-weight: bold;
}

/* Timezone Cards */
.wtp-timezone-list {
  flex-grow: 1;
  padding: 0 20px;
  overflow-y: auto;
}

.wtp-timezone-card {
  background-color: #2c2c2c;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: row;
  width: 100%;
}

.wtp-primary {
  background-color: #242424;
}

.wtp-timezone-card-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 4;
}

.wtp-timezone-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 4;
}

.wtp-city {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 5px;
}

.wtp-time-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.wtp-time-value {
  font-size: 1.5em;
  font-weight: 300;
  flex-grow: 1;
  text-align: right;
  line-height: 1;
}

.wtp-status-indicator {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  column-gap: 4px;
  margin-left: 10px;
}

.wtp-today {
  font-size: 0.8em;
  color: #888;
}

.wtp-icon-sleep {
  font-size: 14px;
  margin-top: 3px;
}

.wtp-offset {
  font-size: 0.8em;
  color: #aaa;
  text-align: right;
  margin-top: 3px;
}

/* Time Slider */
.wtp-time-slider {
  height: 50px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-top: 1px solid #3a3a3a;
}

.wtp-ruler {
  width: 100%;
  height: 5px;
  background-image: linear-gradient(to right, #555 1px, transparent 1px, transparent 10px);
  background-size: 10px 100%;
  position: relative;
  border-radius: 2px;
}

/* Toggle Button */
.wtp-toggle-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
  margin: 10px;
  font-size: 0.9em;
}

.wtp-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Scrollbar Styling */
.wtp-timezone-list::-webkit-scrollbar {
  width: 6px;
}

.wtp-timezone-list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.wtp-timezone-list::-webkit-scrollbar-track {
  background: transparent;
}

/* Footer */
.wtp-footer {
  text-align: center;
  font-size: 0.8em;
  color: #888;
  margin: 20px 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .wtp-background-map {
    flex-direction: column;
    row-gap: 30px;
    padding: 10px 20px;
    height: auto; /* allow page scroll */
  }

  .wtp-left-content {
    margin-right: 0;
    text-align: center;
  }

  .wtp-time-converter-window {
    width: 100%;
  }

  .wtp-timezone-card {
    flex-direction: row;
    align-items: flex-start;
  }

  .wtp-timezone-card-left{
  flex: 3;
    width: 100%;
    align-items: flex-start;
    margin-bottom: 5px;
  }
  .wtp-timezone-card-right {
    flex: 2;
    width: 100%;
    align-items: flex-end;
    margin-bottom: 5px;
  }

  .wtp-time-value {
    font-size: 1.3em;
  }

  .wtp-status-indicator {
    flex-direction: row;
    margin-left: 0;
  }

  .wtp-offset {
    text-align: left;
  }
  .wtp-footer{
    display: none;
  }
}
