* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, system-ui, sans-serif;
}

body {
  background: #0f0f0f;
  color: #f5f5f5;
  height: 100vh;
  overflow: hidden; /* No scrolling allowed */
  position: relative;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  position: relative;
  z-index: 1; 
}

/* --- MAIN CONTENT (Text) --- */
.content {
  flex: 1; /* This makes the text area grow to fill all empty space */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Keeps the text centered in the upper area */
  align-items: center;
  text-align: center;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.subtitle {
  color: #bdbdbd;
  margin-bottom: 30px;
  font-size: 1rem;
}

/* Loader */
.loader {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.loader span {
  width: 10px;
  height: 10px;
  background: #ffd500;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loader span:nth-child(1) { animation-delay: -0.32s; }
.loader span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

#status {
  font-size: 0.9rem;
  color: #ffd500;
}

footer {
  text-align: center;
  font-size: 0.8rem;
  color: #777;
  padding-bottom: 10px;
  flex: 0 0 auto; /* Ensures footer stays at very bottom and doesn't squash */
}

/* --- SIDE WRAPPER (DESKTOP) --- */
.side-wrapper {
    position: fixed;
    left: auto;   
    right: 30px;  
    bottom: 0px; 
    
    display: flex;
    flex-direction: row; 
    align-items: flex-end; 
    gap: 0;
    z-index: 100;
    pointer-events: none; 
}

/* --- BOX DESIGN --- */
.minion-note {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 20px;
    border-radius: 16px;
    border-bottom-right-radius: 4px; 
    
    max-width: 280px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    margin-bottom: 80px; 
    margin-right: -10px; 
    
    pointer-events: auto;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.minion-note:hover {
    background: rgba(30, 30, 30, 1);
    border-color: rgba(255, 213, 0, 0.3);
}

.note-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e5e5e5;
    margin-bottom: 8px;
}

.note-mail {
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffd500;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.minion-note:hover .note-mail {
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 213, 0, 0.8);
}

/* --- MINION CONTAINER --- */
.minion-real-container {
    position: relative;
    width: 160px; 
    height: 160px;
    pointer-events: auto;
    opacity: 0;
    animation: popIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.head-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.4));
}

.real-head {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    transition: opacity 0.2s ease;
}

.smile-face { opacity: 0; }
.minion-real-container.isSmiling .base-face { opacity: 0; }
.minion-real-container.isSmiling .smile-face { opacity: 1; }


/* =========================================
   MOBILE FIXES (Max Width 768px)
   ========================================= */
@media (max-width: 768px) {
  
  .container {
    height: 100dvh; /* Exact mobile screen height */
    padding: 20px 20px 10px 20px;
    /* This ensures layout is Top (Content) -> Bottom (Minion+Footer) */
    justify-content: flex-end; 
  }
  
  /* 1. Push everything else to the bottom */
  .content {
    flex: 1; /* Takes ALL available upper space */
    justify-content: center; /* Centers text vertically in that space */
  }

  /* 2. Minion & Box Formatting - Sits below content */
  .side-wrapper {
    position: relative; 
    right: auto; left: auto; bottom: auto;
    width: 100%;
    
    display: flex;
    justify-content: center;
    align-items: flex-end;
    
    flex: 0 0 auto; /* Do not grow or shrink */
    margin-bottom: 5px; /* Tiny gap above copyright */
  }

  .minion-real-container {
      width: 120px;
      height: 120px;
      margin-left: -15px;
  }

  .minion-note {
     margin-bottom: 35px; /* Align with Minion head */
     margin-right: 0;
     max-width: 60%; 
     padding: 12px 14px;
     font-size: 0.85rem;
     border-bottom-right-radius: 4px; 
  }
  
  .note-text br { display: none; } 
  .note-mail { font-size: 0.75rem; word-break: break-all; } 

  footer {
     flex: 0 0 auto;
     margin-top: 0;
  }
}