/* =========================
  GOOGLE FONTS
========================= */
@import url('https://fonts.googleapis.com/css2?family=Sacramento&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Delius&display=swap');

/* =========================
  ROOT VARIABLES
========================= */
:root {
  --font-main: "Delius", cursive;
  --color-primary: #222;
  --color-secondary: #333;
  --color-accent: lightblue;
  --color-bg: #f8feff;
  --color-border: #ddd;
  --color-btn-bg: rgba(255, 255, 255, 0.95);  
  --color-btn-hover: rgba(255, 255, 255, 0.95);
  --color-popup-bg: rgba(255, 255, 255, 0.95);
  --color-popup-overlay: rgba(0, 0, 0, 0.7);
  --font-title: "Delius", cursive;
  --font-body: "Sacramento", cursive;
  --radius-btn: 30px;
  --radius-popup: 20px;
  --shadow-btn: 0 20px 40px rgba(0, 0, 0, 0.3);
  --shadow-popup: 0 20px 40px rgba(0, 0, 0, 0.3);
  --shadow-light: 0 10px 18px lightblue;
}

/* =========================
  BASE & LAYOUT (DESKTOP-FIRST)
========================= */
html {
  overflow-x: hidden;
  box-sizing: border-box;
  overflow-y: auto;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
body {
  font-family: var(--font-title);
  background: url("assets/images/bg.png") no-repeat center center fixed;
  background-size: cover;
  margin: 0;
  padding: 5vh 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  color: var(--color-secondary);
}
h1,
.title {
  font-size: 4em;
  margin: 0 0 10px 0;
  color: var(--color-primary);
  font-family: var(--font-title);
}
#music {
  display: none;
  width: 100%;
  max-width: 300px;
  margin-top: 20px;
  box-sizing: border-box;
}

/* =========================
  MAIN CONTAINER
========================= */
main,
.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
  padding: 30px;
  flex: 1;
  padding-bottom: 150px;
}

/* =========================
  COMPONENTS
========================= */

/* --- How Are You Feeling Button --- */
#feeling-btn {
  margin-bottom: 40px;
  height: 110px;
  font-size: 4.2em;
  width: 90%;
  max-width: 820px;
  margin-top: 160px;
  opacity: 0.97;
  border-radius: 2.5em;
  border: 2.5px solid #b3e0ff;
  background: linear-gradient(120deg, #e3f2fd 0%, #b3e5fc 60%, #e0f7fa 100%);
  box-shadow:
    0 8px 32px 0 rgba(179, 224, 255, 0.45),
    0 1.5px 30px 10px #fff,
    0 0px 80px 10px #e6f2ff,
    0 0 120px 20px #b3e5fc,
    0 0 200px 80px #e0f7fa;
  color: #1976d2;
  font-family: var(--font-body);
  letter-spacing: 2.5px;
  text-shadow:
    0 2px 12px #b3e5fc,
    0 1px 0 #fff,
    0 0 16px #b3e5fc;
  transition: background 0.4s, box-shadow 0.4s, color 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  border-bottom: 5px solid #90caf9;
}
#feeling-btn:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 350px;
  height: 140px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(179,229,252,0.28) 0%, rgba(224,247,250,0.18) 60%, rgba(255,255,255,0) 100%);
  transform: translate(-50%, -50%) scale(1.3);
  z-index: 1;
  filter: blur(3px);
  opacity: 0.92;
}
#feeling-btn:hover,
#feeling-btn:focus {
  background: linear-gradient(120deg, #b3e5fc 0%, #e3f2fd 100%);
  color: #0d47a1;
  box-shadow:
    0 16px 64px 0 rgba(179, 224, 255, 0.65),
    0 4px 60px 25px #fff,
    0 0px 120px 30px #b3e5fc;
  transform: translateY(-4px) scale(1.03);
  border-bottom: 7px solid #1976d2;
}

/* --- Feelings Container --- */
#feelings-container {
  display: none;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  margin-bottom: 80px;
}
.feeling-btn {
  font-family: var(--font-title);
  width: 220px;
  height: 60px;
  padding: 10px 20px;
  border: 2px solid #b3e5fc;
  border-radius: 30px;
  cursor: pointer;
  background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 60%, #b3e5fc 100%);
  color: #1976d2;
  font-size: 1.3em;
  font-weight: bold;
  letter-spacing: 2px;
}
.feeling-btn:hover {
  background: linear-gradient(135deg, #b3e5fc 0%, #e0f7fa 100%);
  color: #0d47a1;
  box-shadow:
    0 12px 48px 0 rgba(179, 224, 255, 0.55),
    0 2px 40px 15px #fff,
    0 0px 100px 20px #b3e5fc;
}

/* --- Verse Display --- */
#verse-display {
  display: none;
  font-family: var(--font-title);
  margin-top: 40px;
  padding: 40px;
  background-color: #fff;
  border-radius: 15px;
  text-align: center;
  font-size: 1.9em;
  line-height: 1.6;
  color: var(--color-primary);
  max-width: 800px;
  border: 1px solid #e6f2ff;
  box-shadow: 0 40px 60px lightblue;
  transition: box-shadow 0.3s ease;
  opacity: 0.9;
}
#verse-display:hover {
  background: linear-gradient(120deg, #e3f2fd 0%, #90caf9 80%, #e3f2fd 100%);
  color: #0d47a1;
  box-shadow:
    0 0 120px 40px #90caf9,
    0 12px 48px 0 rgba(179, 224, 255, 0.55),
    0 2px 40px 15px #fff,
    0 0px 100px 20px #b3e5fc;
  border-color: #1976d2;
}
#verse-display.is-visible {
  display: block;
}

/* --- Random Verse Button --- */
#random-verse-btn {
  display: block;
  margin-top: 60px;
  color: #444;
  font-family: var(--font-body);
  font-size: 2.4em;
  text-decoration: none;
  transition: all 0.9s ease;
}
#random-verse-btn:hover {
  color: #000;
  transform: translateY(-20px);
}

/* --- Header Buttons --- */
#prayer-btn,
#daily-prayer-btn {
  position: fixed;
  top: 5%;
  width: 220px;
  height: 60px;
  padding: 10px 20px;
  border: 2px solid #b3e5fc;
  border-radius: 30px;
  cursor: pointer;
  color: #1976d2;
  font-size: 1.74em;
  font-weight: bold;
  background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 60%, #b3e5fc 100%);
  font-family: var(--font-body);
  letter-spacing: 2px;
  box-shadow:
    0 8px 32px 0 rgba(179, 224, 255, 0.45),
    0 1.5px 30px 10px #fff,
    0 0px 80px 10px #e6f2ff,
    0 0 120px 20px #b3e5fc,
    0 0 40px 10px #e0f7fa,
    0 0 120px 40px #b3e5fc,
    0 0 200px 80px #e0f7fa;
  text-shadow: 0 2px 8px #b3e5fc, 0 1px 0 #fff;
  transition: background 0.4s, box-shadow 0.4s, color 0.3s;
  overflow: visible;
}
#prayer-btn::after,
#daily-prayer-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  height: 120px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(179,229,252,0.25) 0%, rgba(224,247,250,0.18) 60%, rgba(255,255,255,0) 100%);
  transform: translate(-50%, -50%) scale(1.2);
  z-index: 1;
  filter: blur(2px);
  opacity: 0.9;
}
#prayer-btn { right: 5%; }
#daily-prayer-btn { left: 5%; }
#prayer-btn:hover,
#daily-prayer-btn:hover {
  background: linear-gradient(135deg, #b3e5fc 0%, #e0f7fa 100%);
  color: #0d47a1;
  box-shadow:
    0 12px 48px 0 rgba(179, 224, 255, 0.55),
    0 2px 40px 15px #fff,
    0 0px 100px 20px #b3e5fc;
}

/* --- About Jesus Button --- */
#about-jesus-btn {
  margin-top: 20px;
  font-size: 2.5em;
  background: linear-gradient(120deg, #e0f7fa 0%, #90caf9 0%, #e0f7fa 100%);
  color: #1976d2;
  border: 3px solid #90caf9;
  border-radius: 40px;
  font-family: var(--font-body);
  letter-spacing: 2.5px;
  font-weight: bold;
  box-shadow:
    0 0 60px 20px #90caf9,
    0 8px 32px 0 rgba(179, 224, 255, 0.45),
    0 1.5px 30px 10px #fff,
    0 0px 80px 10px #e6f2ff,
    0 0 120px 20px #b3e5fc;
  text-shadow:
    0 2px 8px #90caf9,
    0 1px 0 #fff,
    0 0 16px #b3e5fc;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
#about-jesus-btn:hover {
  background: linear-gradient(120deg, #e3f2fd 0%, #90caf9 80%, #e3f2fd 100%);
  color: #0d47a1;
  box-shadow:
    0 0 120px 40px #90caf9,
    0 12px 48px 0 rgba(179, 224, 255, 0.55),
    0 2px 40px 15px #fff,
    0 0px 100px 20px #b3e5fc;
  border-color: #1976d2;
}

/* =========================
  POPUPS
========================= */

/* --- Popup backdrop --- */
.popup-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* --- Popup content --- */
.popup-content {
  font-family: var(--font-title);
  font-size: 1.3em;
  background: linear-gradient(135deg, #e3f2fd 0%, #b3e5fc 60%, #e0f7fa 100%);
  max-width: 540px;
  padding: 48px 40px 44px 40px;
  border-radius: 30px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 80px 20px #b3e5fc,
    0 0 120px 40px #e0f7fa,
    0 8px 32px 0 rgba(179, 224, 255, 0.45);
  overflow-y: auto;
  max-height: 80vh;
  width: 95%;
  color: #1976d2;
  text-shadow:
    0 2px 16px #fff,
    0 1px 0 #b3e5fc,
    0 0 24px #e0f7fa;
  border: 3px solid #b3e5fc;
  box-decoration-break: clone;
  position: absolute;
}

/* --- Close button --- */
.popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

/* --- Prayer & Daily Prayer Popups --- */
#prayer-popup,
#daily-prayer-popup {
  font-family: var(--font-body);
  font-size: 1.2em;
  background: linear-gradient(135deg, #e0f7fa 0%, #b3e5fc 100%);
  color: #1976d2;
  box-shadow: 0 0 60px 20px #90caf9, 0 8px 32px 0 rgba(179, 224, 255, 0.45);
  border: 3px solid #90caf9;
  border-radius: 20px;
  text-shadow: 0 2px 8px #90caf9, 0 1px 0 #fff;
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-popup-overlay);
  backdrop-filter: blur(5px);
}

/* --- About Jesus Popup --- */
#about-jesus-popup {
  font-size: 1.2em;
}

/* --- Prayer Form Elements --- */
#prayer-text,
#prayer-name {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--color-accent);
  border-radius: 10px;
  margin-top: 15px;
  font-family: var(--font-body);
  font-size: 1em;
  transition: border-color 0.3s ease;
}
#prayer-text:focus,
#prayer-name:focus {
  outline: none;
  border-color: var(--color-accent);
}
#prayer-text {
  min-height: 120px;
  resize: vertical;
}
.popup-actions {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  justify-content: center;
}
.popup-actions button {
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}
#close-popup {
  background: #ccc;
  color: var(--color-secondary);
}
#close-popup:hover {
  background: #bbb;
}
.popup-actions button:last-child {
  background: var(--color-accent);
  color: var(--color-secondary);
}
.popup-actions button:last-child:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--color-accent);
}
#daily-prayer-content {
  margin: 20px 0;
  padding: 20px;
  background: rgba(173, 216, 230, 0.1);
  border-radius: 10px;
  border-left: 4px solid var(--color-accent);
}
#prayer-text-display {
  font-family: var(--font-title);
  font-style: italic;
  line-height: 1.2em;
  margin: 0;
  color: #555;
}

/* =========================
  FOOTER & SHARE BUTTONS
========================= */
.footer {
  height: 70px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 25px 15px 35px 15px;
  text-align: center;
  background: linear-gradient(to top, #e0f7fa 80%, rgba(173,216,230,0.9) 100%);
  z-index: 100;
  box-shadow: 0 -8px 32px 0 rgba(179, 224, 255, 0.25);
}
.share-buttons {
  display: flex;
  margin-top: 10px;
  justify-content: center;
  align-items: center;
  gap: 40px;
  height: 100%;
  width: 100%;
  position: relative;
}
.share-buttons button {
  border: none;
  background: rgba(255, 255, 255, 0.8);
  font-size: 1.3em;
  cursor: pointer;
  color: #666;
  padding: 12px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
.share-buttons button:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
/* --- Social Buttons Hover --- */
#fb:hover,
#tw:hover,
#wa:hover {
  background: linear-gradient(135deg, #b3e5fc 0%, #e0f7fa 100%);
  color: #0d47a1;
  box-shadow:
    0 12px 48px 0 rgba(179, 224, 255, 0.55),
    0 2px 40px 15px #fff,
    0 0px 100px 20px #b3e5fc;
}

/* =========================
  RESPONSIVE DESIGN
========================= */

/* --- Medium Screens (Tablets) --- */
@media (max-width: 900px) {
  #feeling-btn {
    width: 100%;
    max-width: 650px;
    font-size: 2.8em;
  }
}

/* --- Small Tablets & All Phones --- */
@media (max-width: 768px) {
  body {
    overflow-x: hidden !important;
    padding-bottom: 150px;
    background-attachment: scroll;
  }
  h1,
  .title {
    font-size: 3.5em;
  }
  #prayer-btn,
  #daily-prayer-btn {
    font-family: var(--font-title);
    font-size: 1.2em;
    position: absolute;
    top: 15px;
    width: 130px;
    height: 60px;
    border: none;
    box-shadow: var(--shadow-light);
    text-align: center;
    color: #1976d2;
    background: rgba(255, 255, 255, 0.97);
    text-shadow:
      0 2px 12px #b3e5fc,
      0 1px 0 #fff,
      0 0 8px #aeefff;
    letter-spacing: 1.5px;
    border-color: rgb(13, 163, 213);
    opacity: 0.93;
  }
  #daily-prayer-btn { left: 15px; }
  #prayer-btn { right: 15px; }
  #feeling-btn {
    font-family: var(--font-title);
    margin-top: 150px;
    width: 100%;
    max-width: 400px;
    font-size: 1.7em;
    opacity: 0.9;
    border-radius: 2em;
    border-color: lightblue;
    text-transform: uppercase;
  }
  #about-jesus-btn {
    font-family: var(--font-title);
    font-size: 1.6em;
  }
  .feeling-btn {
    background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 60%, #b3e5fc 100%);
  }
  .footer {
    position: fixed;
    padding: 30px;
    height: 70px;
    width: 100%;
    background: rgba(173, 216, 230, 0.9);
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .share-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100%;
    gap: 20px;
  }
  .mobile-header {
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    padding: 0 15px;
    background: rgba(173, 216, 230, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 500;
  }
  #random-verse-btn {
    font-family: var(--font-title);
    margin-top: 40px;
    font-size: 1.2em;
    border-radius: 10px;
    color: black;
    font-family: quicksand, sans-serif;
    font-style: normal;
  }
  .share-buttons button {
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    box-shadow: white 0px 0px 30px;
  }
}

/* --- Extra Small Screens --- */
@media (max-width: 600px),
  (max-width: 420px),
  (max-width: 400px),
  (max-width: 320px),
  (max-width: 280px) {
  body,
  html {
    width: 100vw;
    height: 100vh;
    min-height: 100vh !important;
    margin: 0;
    padding: 0;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    overflow-x: hidden !important;
  }
  .main {
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  h1,
  .title {
    font-size: 2.8em;
  }
  #feelings-container.is-visible {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    width: 100%;
  }
  #feelings-container {
    padding-top: 50px;
  }
  .feeling-btn-container {
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 100px;
  }
  .feeling-btn {
    background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 60%, #b3e5fc 100%);
    width: 47%;
    height: 60px;
    max-width: 300px;
    font-size: 1em;
    padding: 4px 18px;
    border: none;
    box-shadow: lightblue 0px 0px 16px;
  }
  #feeling-btn {
    opacity: 0.88;
    box-shadow:
      0 0 40px 10px #e0f7fa,
  }
  #about-jesus-btn {
    font-family: var(--font-body);
    font-size: 2em;
    opacity: 0.88;
    box-shadow:
      0 0 40px 10px #e0f7fa,
  }
  #random-verse-btn {
    font-size: 1.9em;
    margin-bottom: 20px;
    font-family: var(--font-body);
  }
  #music {
    display: none;
  }
}
