/* ===========================================
   🌌 BASE.CSS – Global styles for all pages
=========================================== */

/* 🔠 IMPORT FONTS */
@import url('fonts.css');

:root {
  /* Backgrounds */
  --bg-darker: #0d101b;
  --bg-dark: #121524;
  --bg-medium: #2e4566;
  --bg-light: #b4c5db;
  --bg-white: #ffffff;
  --text-light: #e6ecf4;
  --text-dark: #2e3b4e;
  --accent: #506d96;
  --border-light: #627b9d;
  --shadow-light: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.footer {
  width: 100%;
  margin-top: auto;   /* THIS is the push */
  flex: 0 0 auto;
}

body::before{
  content: "";
  position: fixed;
  min-height: 100vh !important;
  width: 100%;
  top: 0; left: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 1px, transparent 1px),
              radial-gradient(circle, rgba(255,255,255,0.2) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: sparkleMove 30s linear infinite;
  z-index: 0;
  margin: 0em auto !important;
  padding: 0em !important;
}

body {
  font-family: 'loubag';
  color: black;
  background:  #2e4566;
  margin: 0em auto !important;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 0em !important;
}

.iframe_wrapper { 
    background-image: none !important;
    position: relative !important;
    background: transparent !important;
    width: 100%;
}

@keyframes sparkleMove {
  from { background-position: 0 0, 25px 25px; }
  to { background-position: 50px 50px, 75px 75px; }
}

/* ✨ HEADINGS */
h1, h2, h3, h4, h5, h6 {
  margin: 0.25em;
}

h1 {
  font: 800 2em 'loubag', sans-serif;
  color: #c0c9db;
  animation: fadeUp 0.8s ease-out;
}

h2 {
  font: bold 2em 'askwhy';
  color: black;
  background-color:  white;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: slideInLeft 0.8s ease-out;
  padding: .5em;
    white-space: normal;       /* allow wrapping */
  word-wrap: break-word;     /* break long words */
  overflow: hidden;          /* hide overflow */
  text-overflow: ellipsis;   /* optional: add "…" to clipped text */
  max-width: 100%;           /* prevent spillover */
}

h3 {
  font: normal 3em 'tidelines', cursive;
  text-align: center;
  display: inline-block;
  padding: .25em;
  background: linear-gradient(
    90deg,
    #121524,
    #384c65,
    #485f88,
    #9daccc,
    #485f88,
    #384c65,
    #121524
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: waveGradient 4s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes waveGradient {
  0% {
    background-position: 0% 50%;
    transform: translateY(0);
  }
  50% {
    background-position: 100% 50%;
    transform: translateY(-5px);
  }
  100% {
    background-position: 0% 50%;
    transform: translateY(0);
  }
}

h4 {
  font: normal 2.5em 'anthem';
  color: #485f88;
  animation: scaleIn 0.5s ease-out;
}

h5 {
  font: 500 1.5em 'spicykebab', monospace;
  color: white !important;
  background: black !important;
  padding: 0.5em;
  animation: fadeInBottom 0.8s ease-out;
}

h6 {
  font: normal 1.5em 'spicykebab';
  color: black!important;
  background: white !important;
  padding: 0.5em;
  letter-spacing: 0.5px;
  animation: rotateIn 0.6s ease-out;
}

/* Optional additional animations */
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  0% { opacity: 0; transform: translateX(-100px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes fadeInBottom {
  0% { opacity: 0; transform: translateY(50px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes rotateIn {
  0% { opacity: 0; transform: rotate(-10deg); }
  100% { opacity: 1; transform: rotate(0deg); }
}


/* ✨ UNIVERSAL BUTTONS */
.button, button, a.button, a.btn, a.logout, .back-cancel-button, .top-links a,
.main-post-button, .draft-option button, #loginToggle, #loginForm button[type="submit"] {
  display: inline-block;
  background: #3d5775;
  color: white !important;
  border: none;
  border-radius: 25px;
  font: 1em 'loubag', sans-serif;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  text-decoration: none;
  padding: .5em 1em; 
}


.button:hover, button:hover, a.button:hover, a.btn:hover, a.logout:hover,
.back-cancel-button:hover, .top-links a:hover, .main-post-button:hover,
.draft-option button:hover, #loginToggle:hover, #loginForm button[type="submit"]:hover {
  background: #506d96;
  transform: scale(1.05);
}

.button:active, button:active, a.button:active, a.btn:active, a.logout:active,
.back-cancel-button:active, .top-links a:active, .main-post-button:active,
.draft-option button:active, #loginToggle:active, #loginForm button[type="submit"]:active {
  background: #2c415e;
  transform: scale(0.95);
}

.back-cancel-button {
  background: linear-gradient(135deg, #627b9d, #4a6fa5);
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  margin-bottom: 20px;
}

.back-cancel-button:hover {
  background: linear-gradient(135deg, #4a6fa5, #627b9d);
}

/* Modal Base Style */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 2em;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 1001;
  width: 90%;
  max-width: 420px;
}

/* Hidden Class (you already use this!) */
.hidden {
  display: none;
}

/* Optional: Dim background when modal is open*

/* ✨ IMAGE-BG BUTTONS */
.img-bg {
  position: relative;
  color: #fff;
  overflow: hidden;
  z-index: 1005;
  width: 150px;
  height: 75px;
  margin-bottom: 0em !important;
  padding-bottom: 0em !important;
}

.img-bg::before, .img-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.img-bg::before {
  background: var(--btn-img, none) center/cover no-repeat;
  background-size: contain;
}
