body {
  margin: 0;
}

input {
  display: block;
  height: 32px;
  border: 0;
  border-radius: 16px;
  padding-left: 16px;
}

button, select {
  height: 32px;
  border: 0;
  border-radius: 16px;
}

option {
  padding: 0 16px;
  text-align: center;
}

button:hover {
  background-color: #dfdfdf;
}

#app-container {
  height: 100vh;
  display: grid;
  grid-template-columns: 2fr 8fr;
}

/* Authentication */
#auth-container {
  padding-top: 4vh;
  border-radius: 16px;
  border-right: 1px solid #efefef;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.2);
}

#auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#auth-panel > form {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label {
  display: block;
  width: 100%;
  text-align: center;
  font-size: large;
  font-weight: 500;
}


#user-panel {
  width: 80%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

/* Rooms */
#room-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#room-container {
  overflow-y: scroll;
  max-height: 280px;
  flex: 1;
  min-height: 0;
}

#create-room-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#create-room-form label {
  font-size: medium;
  font-weight: 400;
}

.room-item {
  display: flex;
  flex-direction: column;
  margin: 16px 5%;
  border-radius: 8px;
  padding: 16px;
  background-color: #f9f9f9;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
  gap: 8px;
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.room-count {
  color: #666;
}

.room-join {
  border-radius: 16px;
  line-height: 0;
  vertical-align: middle;
}

.disabled {
  display: none;
}

.room-start {
  color: white;
  background-color: #4ABA5A;
}
.room-start:hover {
  background-color: #388f41;
}

#empty-room {
  text-align: center;
}

/* Game */
#game-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-canvas {
  height: 576px;
  width: 1024px;
  border-radius: 8px;
  background-color: #222;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.2);
  background: #222;
  background-size: cover;
}

/* Notification */
#notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.notification {
  padding: 12px 24px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.2s ease-out;
}

.notification.default {
  background-color: #4ABA5A;
}

.notification.error {
  background-color: #FA4A3A;
}

.notification.perfect {
  background-color: #ffd700;
  color: #222;
  box-shadow: 0 0 16px 2px #ffd70055;
}

.notification.great {
  background-color: #69e5ff;
  color: #222;
  box-shadow: 0 0 16px 2px #88e8ff55;
}

.notification.good {
  background-color: #bfff7d;
  color: #222;
  box-shadow: 0 0 16px 2px #bfff7d55;
}

.notification.miss {
  background-color: #ff6565;
  color: #fff;
  box-shadow: 0 0 16px 2px #ff656655;
}


@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Other */
.panel {
  margin: 16px 5%;
  border-radius: 8px;
  padding: 16px;
  background-color: #f9f9f9;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease-out;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.instruction-step h3 {
    margin-bottom: 5px;
    color: #333;
}

.instruction-step p {
    color: #666;
}

.key-list {
    list-style: none;
    padding: 0;
}

.key-list li {
    margin: 5px 0;
}

.key {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #eee;
    font-family: monospace;
    font-weight: bold;
}

#close-instructions-btn {
    margin-top: 20px;
    width: 100%;
    background-color: #4ABA5A;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

#close-instructions-btn:hover {
    background-color: #388f41;
}

#show-instructions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #69e5ff;
    color: #222;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#show-instructions:hover {
    background-color: #5bc0de;
    transform: scale(1.1);
    transition: transform 0.2s;
}
