/* ---------------------------- */
/* Dragon animations & sizing   */
/* ---------------------------- */
.hero-dragon {
  width: 700px;          /* noticeably bigger */
  max-width: 95vw;       /* prevents overflow on small screens */
  height: auto;          /* keeps aspect ratio */
  animation: dragonPulse 2s infinite ease-in-out,
             dragonGlow 2s infinite ease-in-out;
}

/* Pulse animation: subtle scale up and down */
@keyframes dragonPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Glow animation: pulsating drop-shadow */
@keyframes dragonGlow {
  0%   { filter: drop-shadow(0 0 10px red); }
  50%  { filter: drop-shadow(0 0 40px red); } /* stronger glow for bigger dragon */
  100% { filter: drop-shadow(0 0 10px red); }
}

/* ---------------------------- */
/* Product card hover glow       */
/* ---------------------------- */
.product-card-container {
  border: 2px solid rgba(255, 0, 0, 0.4);
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.6), 
              0 0 24px rgba(255, 0, 0, 0.4);
  border-radius: 1rem; 
  transition: box-shadow 0.3s ease;
}

.product-card-container:hover {
  box-shadow: 0 0 18px rgba(255, 50, 50, 0.9),
              0 0 32px rgba(255, 0, 0, 0.7);
}

/* Add to your custom.css */
.ember {
  position: fixed;
  background: red;
  border-radius: 50%;
  opacity: 0.6;
  z-index: -1; /* behind content */
  pointer-events: none;
  box-shadow: 0 0 10px red, 0 0 20px red;
  animation-name: emberFloat;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes emberFloat {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-50vh) translateX(20px) scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100vh) translateX(-10px) scale(0.8);
    opacity: 0;
  }
}

/* ---------------------------- */
/* Discord Compact Widget       */
/* ---------------------------- */
.discord-widget {
    position: fixed;
    top: 120px; /* lowered from header */
    right: 20px; /* moved farther to right */
    width: 250px; /* adjusted width for rectangle */
    height: 200px; /* smaller height to make it rectangular */
    padding: 8px; 
    background: rgba(0,0,0,0.7);
    border: 1px solid red;
    border-radius: 12px;
    box-shadow: 0 0 25px red;
    backdrop-filter: blur(4px);
    z-index: 1500;

    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    align-content: flex-start; /* avatars start from top and fill down */
    overflow: hidden;          /* hide overflowing avatars */
    transform: none !important; /* remove any previous scaling */
}

/* Hide join button if not needed */
.dw-join-btn {
    display: none !important;
}

/* Optional: keep title and count, shrink margin */
.dw-header,
.dw-title,
.dw-count {
    margin: 0;
    padding: 0;
    font-size: 14px;   /* slightly smaller to give more space for avatars */
}

/* Avatars container fills widget */
.dw-avatars {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* fewer columns to match smaller widget */
    grid-auto-rows: 50px; /* each avatar row height */
    gap: 4px;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-content: flex-start; /* fill top to bottom */
    overflow: hidden;
}

/* Avatar images - scale to fill nicely */
.dw-avatars img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 6px red;
    flex-shrink: 0;
    transition: transform 0.2s;
    cursor: pointer;
}

.dw-avatars img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px red;
}

/* Base widget styling (desktop) */
.discord-widget {
  font-family: inherit;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
}

/* ---------------------------- */
/* Discord Widget - Mobile Compact */
/* ---------------------------- */
@media screen and (max-width: 600px) {
    .discord-widget {
        position: fixed;
        top: 110px;           /* right under header */
        right: 10px;           /* corner padding */
        width: 120px;          /* small width */
        height: auto;          /* shrink to content */
        max-height: 150px;     /* prevents blocking hero */
        padding: 4px;
        background: rgba(0,0,0,0.5); /* semi-transparent */
        border-radius: 10px;
        border: 1px solid red;
        box-shadow: 0 0 10px red;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: 1500;
    }

    /* Avatar grid */
    .dw-avatars {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 avatars per row */
        gap: 2px;
        width: 100%;
        max-height: 80px;   /* only shows a couple of rows */
        overflow: hidden;
    }

    .dw-avatars img {
        width: 100%;
        height: auto;
        border-radius: 50%;
        object-fit: cover;
    }
}