/* styles.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  justify-content: center;
  align-items:  center;
  min-height: 100vh;
  padding: 20px;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}

.container {
  width: 100%;
  max-width: 1200px;
}

.header {
  text-align: center;
  color: #fff;
  margin-bottom: 40px;
}

.header h1 {
  text-shadow: 2px 2px 4px #0000004d;
  margin-bottom: 15px;
  font-size: 2.5em;
}

.info {
  display: flex;
  opacity: .95;
  justify-content: center;
  gap: 30px;
  font-size: .95em;
}

.info p {
  backdrop-filter: blur(10px);
  background: #0003;
  border-radius: 5px;
  padding: 8px 16px;
}

.main-content {
  display: flex;
  justify-content: center;
}

.building {
  overflow: hidden;
  display: flex;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px #0000004d;
}

.floors {
  display: flex;
  border-right: 2px solid #e0e0e0;
  flex-direction: column-reverse;
  flex: 1;
  min-width: 250px;
}

.floor {
  display: flex;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  justify-content: space-between;
  align-items:  center;
  min-height: 80px;
  padding: 20px;
  transition: background .3s;
}

.floor:hover {
  background: #f5f5f5;
}

.floor-number {
  color: #333;
  min-width: 40px;
  font-size: 1.2em;
  font-weight: bold;
}

.floor-buttons {
  display: flex;
  gap: 10px;
}

.floor-button {
  cursor: pointer;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 5px;
  min-width: 45px;
  padding: 8px 12px;
  transition: all .2s;
  font-weight: 600;
}

.floor-button:hover {
  background: #e8f4f8;
  border-color: #667eea;
}

.floor-button.active {
  color: #fff;
  background: #667eea;
  border-color: #667eea;
}

.elevators {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f9f9f9;
  flex: 2;
  gap: 15px;
  min-width: 500px;
  padding: 20px;
}

.elevator {
  color: #fff;
  display: flex;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  flex-direction: column;
  padding: 15px;
  transition: transform .3s, box-shadow .3s;
  box-shadow: 0 4px 15px #667eea33;
}

.elevator:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px #667eea66;
}

.elevator-header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 10px;
  font-size: .9em;
}

.elevator-id {
  font-size: 1.1em;
  font-weight: bold;
}

.elevator-status {
  opacity: .9;
  font-size: .85em;
}

.elevator-display {
  text-align: center;
  background: #0003;
  border: 2px solid #ffffff4d;
  border-radius: 5px;
  margin-bottom: 10px;
  padding: 15px;
}

.floor-display {
  margin-bottom: 5px;
  font-size: 2em;
  font-weight: bold;
}

.direction-indicator {
  opacity: .8;
  font-size: .9em;
}

.elevator-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.elevator-button {
  color: #fff;
  cursor: pointer;
  background: #fff3;
  border: 2px solid #fff6;
  border-radius: 4px;
  padding: 8px;
  transition: all .2s;
  font-size: .8em;
  font-weight: 600;
}

.elevator-button:hover {
  background: #fff6;
  border-color: #fff;
}

.elevator-button.active {
  color: #667eea;
  background: #fffc;
  border-color: #fff;
  box-shadow: 0 0 10px #fff9;
}

.queue-info {
  opacity: .8;
  text-align: center;
  min-height: 20px;
  margin-top: 8px;
  font-size: .8em;
}

@media (max-width: 1024px) {
  .elevators {
    grid-template-columns: repeat(2, 1fr);
    min-width: auto;
  }
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8em;
  }

  .info {
    flex-direction: column;
    gap: 10px;
  }

  .building {
    flex-direction: column;
  }

  .floors {
    overflow-x: auto;
    border-bottom: 2px solid #e0e0e0;
    border-right: none;
    flex-direction: row;
    min-width: auto;
  }

  .floor {
    border-bottom: none;
    border-right: 1px solid #f0f0f0;
    flex-direction: column;
    min-width: 120px;
  }

  .elevators {
    grid-template-columns: 1fr;
    min-width: auto;
  }
}
