* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 20% 30%, #1e2a3a, #0b0f17);
  color: #e0d5c0;
}

.login-container {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-content {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  background: rgba(18, 25, 35, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 150, 0.1);
  border-radius: 2.5rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dragon-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.glow-text {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f9e0a0, #dbb87c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(218, 165, 50, 0.2);
  letter-spacing: 2px;
  line-height: 1.2;
}

.subtitle {
  display: block;
  color: #96a9bb;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}

.login-form {
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #b6a68b;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.selected-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #17212b;
  border: 2px solid #3d4e5f;
  border-radius: 2rem;
  cursor: pointer;
  min-height: 70px;
  transition: border-color 0.2s ease;
}

.selected-profile:hover {
  border-color: #c9a758;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #c9a758;
}

.profile-info {
  flex: 1;
}

.profile-name {
  color: #f2d9b3;
  font-size: 1.2rem;
  font-weight: 600;
}

.profile-username {
  color: #96a9bb;
  font-size: 0.9rem;
}

.select-placeholder {
  color: #b6a68b;
  font-style: italic;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.select-placeholder span {
  font-size: 1.5rem;
  color: #c9a758;
}

.select-icon {
  margin-left: auto;
  color: #b6a68b;
  font-size: 1.2rem;
}

.password-input {
  position: relative;
}

.password-input input {
  width: 100%;
  padding: 1rem 3rem 1rem 1.5rem;
  background: #17212b;
  border: 2px solid #3d4e5f;
  border-radius: 2rem;
  color: #f2d9b3;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.password-input input:focus {
  border-color: #c9a758;
}

.password-input input::placeholder {
  color: #5f6e7c;
  font-style: italic;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #b6a68b;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

.toggle-password:hover {
  color: #c9a758;
}

.login-btn {
  width: 100%;
  padding: 1rem;
  background: #b48b4b;
  border: none;
  border-radius: 2.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: #11161f;
  cursor: pointer;
  box-shadow: 0 6px 0 #6b4f2b;
  transition: transform 0.07s linear, box-shadow 0.07s linear;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.login-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #5a401f;
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 6px 0 #6b4f2b;
}

.error-message {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid #dc3545;
  border-radius: 1rem;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  color: #ff8a8a;
  font-size: 0.9rem;
  text-align: center;
  animation: shake 0.3s ease;
  display: none;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  pointer-events: auto;
}

.modal-content {
  background: #1e2a3a;
  border-radius: 2rem;
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  border: 2px solid #5c533b;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.8rem;
  border-bottom: 2px solid #3f4b5b;
  background: #1a2533;
  border-radius: 2rem 2rem 0 0;
}

.modal-header h3 {
  color: #f2d9b3;
  font-size: 1.4rem;
}

.close-modal {
  background: none;
  border: none;
  color: #96a9bb;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f2d9b3;
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: #0d151f;
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #b48b4b;
  border-radius: 3px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.2rem 1.8rem;
  border-top: 2px solid #3f4b5b;
  background: #1a2533;
  border-radius: 0 0 2rem 2rem;
}

.cancel-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 2rem;
  border: 2px solid #3f4b5b;
  background: transparent;
  color: #e0d5c0;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.cancel-btn:hover {
  background: #253241;
  border-color: #c9a758;
}

.search-box {
  margin-bottom: 1rem;
}

.search-box input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #17212b;
  border: 2px solid #3d4e5f;
  border-radius: 2rem;
  color: #f2d9b3;
  font-size: 0.95rem;
  outline: none;
}

.search-box input:focus {
  border-color: #c9a758;
}

.search-box input::placeholder {
  color: #5f6e7c;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  background: #17212b;
  border: 2px solid #3d4e5f;
  border-radius: 1.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.member-item:hover {
  border-color: #c9a758;
  background: #1a2533;
}

#profileList {
  max-height: 400px;
  overflow-y: auto;
}

#profileList::-webkit-scrollbar {
  width: 6px;
}

#profileList::-webkit-scrollbar-track {
  background: #0d151f;
  border-radius: 3px;
}

#profileList::-webkit-scrollbar-thumb {
  background: #b48b4b;
  border-radius: 3px;
}

.admin-badge {
  background: #c9a758;
  color: #11161f;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: bold;
  margin-left: 0.5rem;
}

.footer-note {
  text-align: center;
  margin-top: 1rem;
  color: #5f6e7c;
  font-size: 0.8rem;
}

.footer-note p {
  margin: 0.2rem 0;
}

@media screen and (max-width: 480px) {
  .login-content {
    padding: 2rem 1.5rem;
  }
  
  .glow-text {
    font-size: 2.5rem;
  }
  
  .profile-avatar {
    width: 40px;
    height: 40px;
  }
  
  .profile-name {
    font-size: 1rem;
  }
  
  .profile-username {
    font-size: 0.8rem;
  }
  
  .modal-content {
    max-width: 95%;
  }
}