/* style.css */
html, body {
  height: 100%;
}

:root {
    --bg-color: #0f0f0f;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent: #00ffd5;
    --text-color: #f5f5f5;
    --muted: #888;
    --border: rgba(255, 255, 255, 0.1);
    --font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font);
    line-height: 1.6;
    padding: 20px;
    display: flex;
  flex-direction: column;
  }
  
  header {
    text-align: center;
    margin-bottom: 30px;
  }
  
  header h1 {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 10px;
  }
  
  header p {
    font-size: 1.2rem;
    color: var(--muted);
  }
  
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
  }
  
  nav button {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
  }
  
  nav button:hover {
    background: var(--accent);
    color: #000;
    font-weight: bold;
    transform: scale(1.05);
  }
  
  main {
    flex: 1; /* Let main grow and push footer to bottom */
    max-width: 900px;
    margin: auto;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 20px #00ffd566;
    border: 1px solid var(--border);
    width: 100%;
  } 
  textarea,
  input,
  select {
    width: 100%;
    padding: 10px;
    margin: 12px 0;
    background: #1a1a1a;
    color: var(--text-color);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
  }
  
  button {
    padding: 10px 20px;
    background-color: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
  }
  
  button:hover {
    opacity: 0.9;
  }
  
  pre,
  ul,
  div#lorem-output {
    background: #181818;
    border: 1px solid var(--border);
    padding: 12px;
    margin-top: 10px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow-x: auto;
    border-radius: 6px;
    font-size: 0.95rem;
  }
  
  ul {
    list-style: none;
  }
  
  ul li {
    padding: 4px 0;
    border-bottom: 1px solid #222;
  }
  
  .output-container {
    position: relative;
  }

  .copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.8;
  }

  .copy-button:hover {
    opacity: 1;
  }

  footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
    padding: 30px 0 20px;
    border-top: 1px solid var(--border);
  }
  

  #toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
  }
  
  .toast {
    background: #f44336;
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: 500;
    animation: fadeInOut 4s ease-in-out;
  }
  
  .toast.success {
    background: #4CAF50;
  }
  
  @keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
  }

  .input-group {
    margin-bottom: 15px;
  }

  .input-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
  }

  #code-input {
    font-family: monospace;
    min-height: 200px;
    resize: vertical;
  }

  #summary-output {
    min-height: 100px;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.6;
  }

  /* === AI Button Highlighted Label & Animation (Always Visible, Small, Transparent, Contrasting Color) === */
.ai-btn {
  position: relative;
  overflow: visible;
}
.ai-btn .ai-hover-label {
  display: flex;
  align-items: center;
  gap: 0.15em;
  position: absolute;
  left: 50%;
  top: -1.5em;
  transform: translateX(-50%) scale(1);
  background: rgba(30,30,30,0.7);
  color: #ffd700; /* gold for contrast */
  border-radius: 6px;
  padding: 0.08em 0.5em 0.08em 0.5em;
  box-shadow: 0 2px 8px #0008;
  border: 1px solid #ffd700;
  font-weight: 600;
  font-size: 0.85em;
  opacity: 0.7;
  pointer-events: auto;
  z-index: 10;
  transition: opacity 0.2s, transform 0.2s;
}
.ai-label-text {
  letter-spacing: 0.08em;
  color: #ffd700;
  margin-right: 0.1em;
  font-size: 0.95em;
}
.star {
  display: inline-block;
  font-size: 1em;
  animation: star-bounce 1.2s infinite;
}
@keyframes star-bounce {
  0%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
  30% { transform: translateY(-5px) scale(1.15); filter: brightness(1.3); }
  60% { transform: translateY(0) scale(1); filter: brightness(1); }
}

.perma-disabled,
button:disabled {
  background: #444 !important;
  color: #888 !important;
  border: 1px solid #333 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  pointer-events: none;
}