/* ===== ANIMATION-SPECIFIC STYLES ===== */

/* Notification Banner (top-right toast) */
.notification-banner {
  position: fixed;
  top: 40px;
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  background: rgba(245, 245, 245, 0.92);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  z-index: 100001;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: top 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.notif-message {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
}

.notif-close {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.notif-close:hover {
  background: rgba(0,0,0,0.08);
}

/* Dock Badges */
.dock-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #FF3B30;
  color: #fff;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  line-height: 1.4;
  pointer-events: none;
}

/* Event Modal (Calendar) */
.event-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100002;
  animation: fadeIn 0.15s;
}

.modal-content {
  background: rgba(245,245,245,0.95);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 16px;
  padding: 24px;
  width: 400px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.modal-content input[type="text"],
.modal-content textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  background: rgba(255,255,255,0.6);
  color: var(--text);
  margin-bottom: 12px;
}

.modal-content input[type="text"]:focus,
.modal-content textarea:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.9);
}

.modal-content textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font);
}

.modal-content button {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.modal-content button:first-of-type {
  background: var(--accent);
  color: #fff;
}

.modal-content button:first-of-type:hover {
  filter: brightness(1.1);
}

.modal-content button:not(:first-of-type) {
  background: rgba(0,0,0,0.06);
  color: var(--text);
}

.modal-content button:not(:first-of-type):hover {
  background: rgba(0,0,0,0.12);
}

/* Calendar Event Indicator */
.cd.has-event {
  position: relative;
}

.event-dot {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* Vim Modal (Terminal) */
.vim-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100002;
  animation: fadeIn 0.15s;
}

.vim-editor {
  background: rgba(25,25,25,0.95);
  backdrop-filter: blur(40px);
  border-radius: 12px;
  padding: 0;
  width: 700px;
  max-width: calc(100vw - 40px);
  height: 500px;
  max-height: calc(100vh - 80px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vim-status {
  background: rgba(0,0,0,0.3);
  color: #4AF626;
  padding: 8px 16px;
  font-family: 'SF Mono', 'Menlo', 'Courier New', monospace;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.vim-editor #vim-content {
  flex: 1;
  background: rgba(25,25,25,0.98);
  color: #33FF33;
  font-family: 'SF Mono', 'Menlo', 'Courier New', monospace;
  font-size: 13px;
  padding: 12px 16px;
  border: none;
  outline: none;
  resize: none;
  caret-color: #4AF626;
}

.vim-hint {
  background: rgba(0,0,0,0.3);
  color: rgba(255,255,255,0.5);
  padding: 6px 16px;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 11px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Focus Ring Animations (Accessibility) */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  animation: focusRing 0.2s cubic-bezier(0.2, 0, 0.13, 1);
}

@keyframes focusRing {
  from { outline-width: 1px; }
  to { outline-width: 2px; }
}

/* Notes New Button */
.nnew {
  margin: 8px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
  display: block;
  width: calc(100% - 16px);
}

.nnew:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.nnew:active {
  transform: translateY(0);
}

/* Note Delete Button */
.ndel {
  opacity: 0;
  cursor: pointer;
  color: #FF3B30;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.nli:hover .ndel {
  opacity: 1;
}

.ndel:hover {
  background: rgba(255, 59, 48, 0.1);
}

/* Improved Photo Gallery Hover */
.gitem {
  transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 250ms cubic-bezier(0.2, 0, 0.13, 1);
}

.gitem:hover {
  transform: scale(1.08);
  filter: brightness(1.15) drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

/* Improved Menu Item Transitions */
.mi {
  transition: background 200ms cubic-bezier(0.2, 0, 0.13, 1),
              color 200ms cubic-bezier(0.2, 0, 0.13, 1);
}

.mi:hover {
  transition-duration: 150ms;
}

/* Loading Spinner (for future use) */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 920px) {
  .notification-banner {
    width: calc(100vw - 40px);
    right: 20px;
  }

  .modal-content,
  .vim-editor {
    width: calc(100vw - 40px);
  }
}

@media (max-width: 600px) {
  .notification-banner {
    font-size: 12px;
  }

  .notif-icon {
    font-size: 24px;
  }

  .notif-title {
    font-size: 13px;
  }

  .notif-message {
    font-size: 12px;
  }
}
