@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
  --accent-color: #3b82f6; /* default value */
}

/* gift-alert.css */
#gift-alert-container {
  position: absolute;
  top: 50%; /* adjust based on webcam/game overlay */
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none; /* don't block clicks */
  opacity: 0; /* fade in/out whole container */
  transition: opacity 0.5s ease-in-out;
  transform: translateY(-50%);
}

.alert-bar {
  position: relative;
  width: 100%;
  height: 2.25em;
  background: color-mix(in srgb, var(--accent-color) 80%, black 30%);
  border-top: 2px solid color-mix(in srgb, var(--accent-color) 80%, white 30%);
  border-bottom: 2px solid color-mix(in srgb, var(--accent-color) 80%, white 10%);
  box-shadow:
    0 0 12px color-mix(in srgb, var(--accent-color) 70%, white 20%),
    inset 0 0 6px color-mix(in srgb, var(--accent-color) 80%, white 10%);
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  border-radius: 0.4em;
  color: white;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.alert-left,
.alert-right {
  z-index: 1;
  flex: 1;
  text-align: center;
  text-shadow:
    0 0 6px rgba(0, 0, 0, 1),
    0 0 8px rgba(0, 0, 0, 0.9);
}

.alert-left { 
  padding-right: 3vh; 
  padding-left: 10px;
  white-space: nowrap;
  overflow: hidden;
}

.alert-right {
  text-transform: uppercase;
  padding-left: 3vh;
}

.repeat-count {
  margin-left: 3px;
}

.alert-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
}

.gift-circle {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-color) 80%, black 30%);
  border: 8px solid color-mix(in srgb, var(--accent-color) 80%, white 20%);
  box-shadow:
    0 0 15px color-mix(in srgb, var(--accent-color) 70%, white 20%),
    inset 0 0 8px color-mix(in srgb, var(--accent-color) 80%, white 10%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  font-weight: 900;
}

.gift-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: giftFloat 1s ease-in-out infinite;
}

@keyframes giftFloat {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.gift-circle.tier-2 {
  border: 8px solid transparent;
  background-image: 
    linear-gradient(color-mix(in srgb, #ffd900ff 60%, black 40%), 
                    color-mix(in srgb, #ffd900ff 60%, black 40%)),
    conic-gradient(from 0deg, #FFD700, #FFA500, #FFEF9F, #FFD700);
  box-shadow: 
    0 0 12px rgba(255, 215, 0, 0.8),
    0 0 20px rgba(255, 223, 0, 0.6),
    0 0 30px rgba(255, 240, 128, 0.4);
  background-origin: border-box;
  background-clip: content-box, border-box;
  animation: spinGold 4s linear infinite;
}

@keyframes spinGold {
  to {
    background-image:
      linear-gradient(color-mix(in srgb, #ffd900ff 60%, black 40%), 
                    color-mix(in srgb, #ffd900ff 60%, black 40%)),
      conic-gradient(from 360deg, #FFD700, #FFA500, #FFEF9F, #FFD700);
  }
}

.gift-circle.tier-3 {
  border: 8px solid #FFD700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Base uneven glow */
  box-shadow:
    0 0 15px rgba(255, 215, 0, 0.7),
    5px -5px 20px rgba(255, 223, 0, 0.6),
    -5px 5px 25px rgba(255, 200, 0, 0.5),
    8px 3px 18px rgba(255, 240, 128, 0.4),
    -8px -3px 22px rgba(255, 215, 0, 0.5);

  /* Shining animation */
  animation: goldShine 1.5s ease-in-out infinite alternate;
}

@keyframes goldShine {
  0% {
    box-shadow:
      0 0 15px rgba(255, 215, 0, 0.7),
      5px -5px 20px rgba(255, 223, 0, 0.6),
      -5px 5px 25px rgba(255, 200, 0, 0.5),
      8px 3px 18px rgba(255, 240, 128, 0.4),
      -8px -3px 22px rgba(255, 215, 0, 0.5);
  }
  50% {
    box-shadow:
      2px -2px 18px rgba(255, 215, 0, 0.8),
      6px -6px 22px rgba(255, 223, 0, 0.7),
      -6px 6px 28px rgba(255, 200, 0, 0.6),
      10px 4px 20px rgba(255, 240, 128, 0.5),
      -10px -4px 26px rgba(255, 215, 0, 0.6);
  }
  100% {
    box-shadow:
      -2px 2px 17px rgba(255, 215, 0, 0.75),
      4px -4px 21px rgba(255, 223, 0, 0.65),
      -4px 4px 26px rgba(255, 200, 0, 0.55),
      9px 3px 19px rgba(255, 240, 128, 0.45),
      -9px -3px 24px rgba(255, 215, 0, 0.55);
  }
}


/* Toast Layout */
.notifications {
  position: fixed;
  top: 50%;               /* center vertically */
  left: 50%;              /* center horizontally */
  transform: translate(-50%, -50%); /* pull back by half of width and height */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;          /* space between multiple toasts */
  z-index: 10;
}

.toast {
  position: relative;
  padding: 10px;
  color: #fff;
  margin-bottom: 10px;
  max-width: 500px;
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  border-radius: 5px;
  --color: #0abf30;
  background: #202022;
  animation: show 0.3s ease 1 forwards;
}

.toast i{
  color: var(--color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: x-large;
}

.toast .content {
  text-align: left;       
  display: flex;          
  flex-direction: column; 
  justify-content: center; 
  align-items: flex-start; 
}

.toast .title{
  font-size: x-large;
  font-weight: bold;
}

.toast span, .toast i:nth-child(3){
  color: #fff;
  opacity: 0.6;
}

@keyframes show {
  0% {
    transform: translateY(100%);
  }
  40% {
    transform: translateY(-5%);
  }
  80% {
    transform: translateY(0%);
  }
  100% {
    transform: translateY(-10%);
  }
}

.toast::before{
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: var(--color);
  width: 100%;
  height: 3px;
  content: '';
  box-shadow: 0 0 10px var(--color);
  animation: timeOut 3s linear 1 forwards
}

@keyframes timeOut{
  100%{
      width: 0;
  }
}

.toast.error{
  --color: #f24d4c;
  background: #202022;
}

.toast.warning{
  --color: #e9bd0c;
  background: #202022;
}

.toast.info{
  --color: #3498db;
  background: #202022;
}

.toast-logo {
width: 28px;   /* adjust */
height: 28px;
object-fit: contain;
display: block;
margin: auto;
}
