:root {
  --aw-modal-overlay: rgba(15, 23, 42, 0.6);
  --aw-modal-card-bg: #ffffff;
  --aw-modal-card-radius: 1rem;
  --aw-modal-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --aw-modal-color: #0f172a;
  
  --aw-toast-bg: #ffffff;
  --aw-toast-border: 1px solid #e2e8f0;
  --aw-toast-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.18);
  --aw-toast-color: #0f172a;
  --aw-toast-font: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

.dark {
  --aw-modal-overlay: rgba(2, 6, 23, 0.7);
  --aw-modal-card-bg: #0f172a;
  --aw-modal-color: #f8fafc;
  
  --aw-toast-bg: #0b1220;
  --aw-toast-border: 1px solid #1f2937;
  --aw-toast-color: #e2e8f0;
  --aw-toast-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.6);
}

.aw-modal-root {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--aw-modal-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1400;
}

.aw-modal-root[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.aw-modal-root .aw-modal-card {
  position: relative;
  max-width: 32rem;
  width: min(90vw, 32rem);
  background: var(--aw-modal-card-bg);
  border-radius: var(--aw-modal-card-radius);
  box-shadow: var(--aw-modal-shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.aw-modal-root[data-open="true"] .aw-modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.aw-modal-card h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--aw-modal-color);
  letter-spacing: -0.025em;
}

.aw-modal-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: #64748b;
  line-height: 1.6;
}

.dark .aw-modal-card p {
  color: #94a3b8;
}

.aw-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.aw-modal-button {
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aw-modal-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.aw-modal-primary {
  background: #2563eb;
  color: white;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.aw-modal-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3);
}

.dark .aw-modal-primary {
  background: #3b82f6;
  color: white;
}

.dark .aw-modal-primary:hover {
  background: #2563eb;
}

.aw-modal-secondary {
  background: transparent;
  color: #475569;
  border-color: #e2e8f0;
}

.aw-modal-secondary:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.dark .aw-modal-secondary {
  color: #94a3b8;
  border-color: #334155;
}

.dark .aw-modal-secondary:hover {
  background: #1e293b;
  color: #f8fafc;
}

.aw-toast-root {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  bottom: auto;
  left: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1500;
  pointer-events: none;
}

.aw-toast {
  width: min(22rem, calc(100vw - 3rem));
}

.aw-toast-root .aw-toast {
  min-width: 0;
}

@media (max-width: 640px) {
  .aw-toast-root {
    right: 0.75rem;
    left: 0.75rem;
  }
}

.aw-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: max-content;
  max-width: calc(100vw - 3rem);
  padding: 1rem;
  background: var(--aw-toast-bg);
  border: var(--aw-toast-border);
  border-radius: 0.75rem;
  box-shadow: var(--aw-toast-shadow);
  font-family: var(--aw-toast-font);
  font-size: 0.9375rem;
  color: var(--aw-toast-color);
  opacity: 0;
  transform: translate3d(48px, 0, 0) scale(0.98);
  max-height: 400px;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              max-height 0.35s ease,
              padding 0.35s ease;
  will-change: transform, opacity;
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.aw-toast--entering {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transform: translate3d(48px, 0, 0) scale(0.98);
}

.aw-toast--visible {
  opacity: 1;
  transform: translateX(0);
  max-height: 400px;
}

.aw-toast--leaving {
  opacity: 0;
  transform: translate3d(40px, 0, 0);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.aw-toast--success .aw-toast-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.aw-toast--error .aw-toast-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.aw-toast--info .aw-toast-icon {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.aw-toast-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 9999px;
  font-size: 1rem;
}

.aw-toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.125rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.aw-toast-close:hover {
  color: #475569;
  background: rgba(0,0,0,0.05);
}

.dark .aw-toast-close:hover {
  color: #e2e8f0;
  background: rgba(255,255,255,0.05);
}

body.aw-modal-active {
  overflow-y: scroll;
}

.aw-notify-hidden {
  display: none !important;
}
