/* 管理员模式样式 */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#login-modal .modal-content,
#edit-modal .modal-content {
  background: linear-gradient(180deg, #ffffff, #f8fbfb);
  padding: 28px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 450px;
  width: 90%;
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#login-modal .modal-content h2,
#edit-modal .modal-content h2 {
  margin-bottom: 24px;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
}

#login-modal .modal-content input,
#login-modal .modal-content select,
#edit-modal .modal-content input,
#edit-modal .modal-content select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid #cfdbe5;
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: all 0.2s;
  background: #ffffff;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

#login-modal .modal-content input:focus,
#login-modal .modal-content select:focus,
#edit-modal .modal-content input:focus,
#edit-modal .modal-content select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  background: #ffffff;
}

.login-cooldown-message {
  display: none;
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 12px;
  background: rgba(254, 242, 242, 0.95);
  color: #991b1b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.login-cooldown-message.is-visible {
  display: block;
}

.login-cooldown-message.is-info {
  border-color: rgba(99, 102, 241, 0.22);
  background: rgba(238, 242, 255, 0.95);
  color: #3730a3;
}

#login-modal .modal-content button,
#edit-modal .modal-content button {
  min-height: 42px;
  padding: 0 16px;
  margin: 0;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s;
  font-size: 14px;
}

#login-modal .modal-actions,
#edit-modal .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#login-submit-btn, #edit-save-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #168a7f 100%);
  color: white;
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.16);
}

#login-submit-btn:hover, #edit-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.22);
}

#login-cancel-btn, #edit-cancel-btn {
  border: 1px solid #d7e1e8;
  background: #ffffff;
  color: var(--text);
}

#login-cancel-btn:hover, #edit-cancel-btn:hover {
  background: #f4f8f7;
}

.admin-mode .tool-card-mini {
  cursor: grab;
}

.admin-mode .tool-card-mini:active {
  cursor: grabbing;
}

/* 管理员控制按钮样式已移至 style.css */

@media (max-width: 480px) {
  #login-modal .modal-content,
  #edit-modal .modal-content {
    width: calc(100vw - 24px);
    padding: 22px;
  }

  #login-modal .modal-actions,
  #edit-modal .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
