body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
}

/* Hero section background with pattern */
.hero-bg {
    background-color: #111827;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.1) 1px, transparent 0);
    background-size: 2rem 2rem;
}

/* Sticky sidebar for donation box */
.sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 6rem; /* Adjust based on header height */
}

/* Ensure prose styles don't constrain width */
.prose { 
    max-width: none; 
}

/* Dropdown menu for user profile */
.dropdown-container {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    border-radius: .5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    min-width: 160px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .2s ease-out, transform .2s ease-out, visibility .2s;
    padding: .5rem 0;
}
.dropdown-container:hover .dropdown-menu,
.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu a {
    display: block;
    padding: .75rem 1rem;
    color: #4B5563;
    text-decoration: none;
    transition: background-color .1s ease-in-out;
    font-weight: 500;
}
.dropdown-menu a:hover {
    background-color: #F3F4F6;
    color: #4F46E5;
}
.dropdown-menu a.logout-option {
    color: #EF4444;
}
.dropdown-menu a.logout-option:hover {
    background-color: #FEF2F2;
    color: #DC2626;
}

/* Image carousel styles */
#image-carousel img,
#image-carousel video {
    width: 100%;
    height: 450px;
    object-fit: contain;
    background-color: #f3f4f6;
}

/* Tooltip for canvas pixels */
#pixel-tooltip {
    position: fixed;
    display: none;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
}

/* ───────────────────────────────────────────── */
/* Global message / toast in top-right corner   */
/* Uses #global-message-container already in HTML */
/* ───────────────────────────────────────────── */

#global-message-container {
    min-width: 260px;
    max-width: 380px;
    background-color: #ecfdf3;        /* default: success */
    border: 1px solid #4ade80;
    color: #065f46;
    font-size: 0.95rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* visible state */
#global-message-container.show {
    opacity: 1;
    transform: translateY(0);
}

/* variants */
#global-message-container.warning {
    background-color: #fffbeb;
    border-color: #facc15;
    color: #92400e;
}

#global-message-container.error {
    background-color: #fef2f2;
    border-color: #f97373;
    color: #991b1b;
}

#global-message-container.loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: #065f46;
  animation: stripe-spin 0.7s linear infinite;
  vertical-align: -2px;
}

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