/* 🎨 CORE DESIGN SYSTEM */
html,
body {
  overflow-x: clip;
  width: 100%;
}

/* 🧱 THE GRID SYSTEM */
.md-grid,
.md-header__inner,
.md-main__inner {
  max-width: 61rem !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* 📢 ANNOUNCEMENT BANNER SYSTEM */
.md-banner {
  background: transparent !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* Force theme container to be full-width */
.md-banner__inner {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 💫 ACCESSIBLE FLUID FOCUS (High Contrast & Compact) */
.md-option:focus + .md-header__button,
.md-option:focus-visible + .md-header__button,
.md-option:focus ~ .md-header__button,
.md-option:focus-visible ~ .md-header__button,
.md-header__button:hover,
.md-header__button:focus-within,
.md-header__button:focus,
[data-md-color-scheme="slate"] .md-option:focus + .md-header__button,
[data-md-color-scheme="slate"] .md-option:focus ~ .md-header__button {
  background-color: rgba(255, 255, 255, 0.35) !important;
  color: #fff !important;
  border-radius: 50% !important;
  transition: all 0.2s ease-in-out !important;
  outline: none !important;
  /* High visibility AdMob Yellow, 25% more compact (3px) */
  box-shadow: 0 0 0 3px #FBBC04 !important; 
  z-index: 10 !important;
}



/* THE CONTAINER (Full Width Background) */
.announcement-wrapper {
  width: 100% !important;
  position: relative;
  overflow: hidden !important;
  background: linear-gradient(-45deg, #4285F4, #EA4335, #FBBC04, #34A853) !important;
  background-size: 400% 400% !important;
  animation: gradientShift 15s ease infinite !important;
  animation-delay: calc(var(--sync-clock, 0) * -1s) !important;
  z-index: 3;
  min-height: 100px;
  /* Balanced high impact */
  display: flex !important;
  align-items: center;
}

/* Glassmorphism Overlay */
.announcement-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
  transition: backdrop-filter 0.6s ease;
}

[data-md-color-scheme="slate"] .announcement-wrapper::before {
  background: rgba(15, 17, 26, 0.93) !important;
}

/* INTERNAL STRUCTURE */
.announcement-content {
  position: relative;
  z-index: 2;
  display: flex !important;
  align-items: center;
  justify-content: center !important;
  gap: 32px;
  padding: 4rem 20px;
  width: 100%;
  margin: 0 auto;
}

/* 🌀 ANIMATION LOGIC (ZERO JUMP SYSTEM) */
.shape {
  position: absolute;
  opacity: 0.15;
  /* Soft base */
  animation: shapes-drift 20s infinite ease-in-out;
  animation-delay: calc(var(--sync-clock, 0) * -1s) !important;
  transition:
    opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  filter: blur(4px);
}

@keyframes shapes-drift {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(60px, -30px) rotate(5deg);
  }

  66% {
    transform: translate(-40px, 40px) rotate(-5deg);
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* 🐭 HOVER INTERACTION (Desktop Only) */
@media (hover: hover) {
  .announcement-wrapper:hover .shape {
    opacity: 0.4 !important;
    /* Subtle boost */
    filter: blur(0px);
    transform: translate(0, -10px) scale(1.15) !important;
  }

  .announcement-wrapper:hover::before {
    backdrop-filter: blur(4px);
  }
}

/* 📝 ELEMENTS */
.announcement-title {
  background: #FBBC04 !important;
  color: #000 !important; /* Dark text for better contrast on yellow */
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.announcement-text {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: var(--md-default-fg-color);
}

.announcement-badge {
  background: rgba(66, 133, 244, 0.1);
  color: #4285F4 !important;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
}

.announcement-link {
  color: #4285F4 !important;
  font-weight: 700;
  text-decoration: underline;
}

/* 💠 FLOATING SHAPES POSITIONING */
.announcement-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
}

.shape-1 {
  font-size: 120px;
  top: 10%;
  left: 10%;
}

.shape-2 {
  font-size: 100px;
  bottom: 15%;
  right: 15%;
  animation-delay: -5s;
}

.shape-3 {
  font-size: 80px;
  top: 30%;
  right: 35%;
  animation-delay: -10s;
}

/* 📱 RESPONSIVENESS */
@media screen and (max-width: 76.25em) {
  .announcement-content {
    flex-direction: column;
    padding: 2.5rem 1rem;
    gap: 20px;
  }
}

/* 🏠 THEME SYNC */
.md-header {
  position: sticky !important;
  top: 0;
}

.md-main__inner {
  margin-top: 2rem !important;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* 📱 MOBILE NAVIGATION FIXES */
@media screen and (max-width: 76.25em) {
  /* Keep the banner bright and visible above the dark overlay when the drawer is open */
  [data-md-component="announce"] {
    z-index: 99 !important;
  }

  /* Compact the banner and fix its height for mobile alignment */
  .announcement-content {
    padding: 1.2rem 1rem !important; /* Sightly tighter padding */
    min-height: 3.4rem;
    box-sizing: border-box;
    gap: 16px !important;
  }

  .announcement-wrapper {
    min-height: auto !important;
  }

  .announcement-text {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
  }
}