* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8fafc;
}

#main {
  max-width: 1200px;
  margin: 0 auto 15px auto;
  padding: 0 20px;
}

#header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 30px;
  padding: 0.75rem 2rem;
}

#header .logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-right: auto;
  cursor: default;
  user-select: none;
  line-height: 2rem;
}

#header .logo a {
  color: #fff;
  text-decoration: none;
  vertical-align: middle;
}

#header .logo .profile__name {
  font-weight: 100;
  font-size: 1.2rem;
}

#header .profile {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-around;
  gap: 10px;
}

.inpt {
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.inpt:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
  all: unset;
  display: inline-block;
  box-sizing: border-box;
  text-align: center;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #fefefe;
  user-select: none;
  color: #333;
}

.btn:hover {
  background: #eee;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px #fefefe33;
  text-decoration: none;
}

.btn.btn-small {
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.45px;
}

.btn.btn-primary {
  background: #48bb78;
  color: white;
}

.btn.btn-primary:hover {
  background: #38a169;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px #48bb7833;
}

.btn.btn-secondary {
  background: #ed8936;
  color: white;
}

.btn.btn-secondary:hover {
  background: #dd6b20;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(237, 137, 54, 0.2);
}

#overlays, .custom-overlays {
  pointer-events: none;
  position: fixed;
  top: 0%;
  left: 0%;
  width: 100%;
  height: 100%;
  background: #0000;
  transition: 0.2s ease;
}

#overlays > div, .custom-overlays > div {
  pointer-events: none;
  position: fixed;
  top: 52%;
  left: 50%;
  translate: -50% -50%;
  transition: 0.1s ease-in, opacity 0.15s;
  opacity: 0%;
  min-width: 25%;
  min-height: 20%;
  max-height: 90%;
  background: #fefefe;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

#overlays > div > .header, .custom-overlays > div > .header {
  background: linear-gradient(311deg, #667eea 0%, #764ba2 100%);
  padding: 8px 12px;
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: space-between;
}

#overlays > div > .header > .header__title, .custom-overlays > div > .header > .header__title {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}

#overlays > div > .header > .header__close, .custom-overlays > div > .header > .header__close {
  all: unset;
  cursor: pointer;
  transition: 0.1s;
}

#overlays > div > .header > .header__close:hover, .custom-overlays > div > .header > .header__close:hover {
  scale: 115%;
}

#overlays > div > .content, .custom-overlays > div > .content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

#overlays > div.active, .custom-overlays > div.active {
  transition: 0.1s ease-out, opacity 0.15s;
  pointer-events: all;
  opacity: 100%;
  top: 40%;
}

#overlays:has(div.active), .custom-overlays:has(div.active) {
  pointer-events: all;
  background: #33333355;
  backdrop-filter: blur(1.5px);
}

#overlays > div > .content, .custom-overlays > div > .content {
  padding-top: 15px;
  overflow-y: auto;
}

#messages {
  z-index: 1;
  position: fixed;
  bottom: 15px;
  right: 10px;
  max-width: 70%;
  min-width: 25%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 7px;
}

#messages > div {
  position: relative;
  user-select: none;
  background: #fff;
  border-radius: 10px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  border: 2px solid #ddd;
  box-shadow: 1px 1px 2px 1px #ddd8;
  padding: 10px 12px 13px 12px;
  overflow: hidden;
  transition: 0.1s;
}

#messages > div:hover {
  background: #f5f5f5;
}

#messages > div::before {
  content: '';
  position: absolute;
  height: 3px;
  width: var(--percent, 100%);;
  bottom: 0;
  left: 0;
  background: #ddd;
}

#messages > div.error {
  background: #fcc;
  color: #f00;
  border: 2px solid #d44;
  box-shadow: 1px 1px 2px 1px #d448;
}

#messages > div.error:hover {
  background: #f5c5c5;
}

#messages > div.error::before {
  background: #d44;
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .btn {
    width: 100%;
  }

  #messages {
    left: 10px;
    max-width: 100%;
  }

  #overlays > div, .custom-overlays > div {
    left: 10px;
    right: 10px;
    translate: 0% -50%;
  }
}
