/* GLOBAL RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* BODY */
body {
  background-color: #f6a6a6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

/* HEADER */
.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #222;
}

/* DROPDOWN */
.dropdown {
  position: relative;
}

.dropbtn {
  background: white;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: white;
  border-radius: 12px;
  padding: 8px 0;
  margin-top: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  min-width: 180px;
}

.dropdown-content a {
  display: block;
  padding: 10px 15px;
  color: #222;
  text-decoration: none;
}

.dropdown-content a:hover {
  background: #f6a6a6;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* MAIN SECTION */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 50px; /* reduced gap between header & title */
  padding: 20px;
}

.main-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px; /* balanced with buttons */
}

/* BUTTONS */
.button-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}

button {
  border: 0;
  padding: 10px 18px;
  border-radius: 26px;
  background: #fff;
  color: #222;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform .12s, background .12s;
}
button:active {
  transform: translateY(2px);
}

/* WORDS + ARTICLE BOX */
.words {
  background: rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 14px 20px;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  width: 60%;
}

.article-section {
  background: #fceaea;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: left;
  max-width: 600px;
  margin: 30px auto 0; /* nice clean gap below words box */
  color: #222;
}

.article-section h2 {
  margin-bottom: 15px;
  color: #111;
}
/* BODY layout */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* make body take full viewport height */
  margin: 0;
}

/* MAIN content takes remaining space */
main {
  flex: 1;
}


/* ===== FOOTER (Full Width + Black Hover Underline) ===== */
.glass-footer {
  position: relative;
  width: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 25px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  margin-top: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 12px;
}

.footer-links a {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #000;
  text-shadow: none;
}

.glass-footer p {
  font-size: 0.9rem;
  color: #333;
}

/* Ensure footer stays full width */
body, html {
  width: 100%;
  overflow-x: hidden;
}



.content-box {
  max-width: 900px; /* standard desktop width */
  margin: 0 auto;   /* centers the box */
  padding: 20px;
  background: #fceaea; /* optional, for better readability */
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .content-box {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
}


.logo-title {
  text-decoration: none; /* removes underline from link */
  display: flex;
  align-items: center;
  gap: 10px;
  color: #222;
}
article {
    font-family: "Poppins", Arial, sans-serif;
    line-height: 1.8;
    color: #222;
  }

  h2 {
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #000;
  }

  h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #333;
  }

  p {
    margin-bottom: 20px; /* space between paragraphs */
  }

  br {
    line-height: 2;
  }

  ul {
    margin-bottom: 20px;
  }

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
  --bg: #fba3ad;
  --accent: #ff5876;
  --muted: #7b4950;
  --dark: #222;
  --white: #fff;
}

/* --- Base Layout --- */
html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 25px;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: none;
}
body::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* --- Structure --- */
.wrap {
  width: 100%;
  max-width: 520px;
  text-align: center;
  position: relative;
}

h1 {
  font-size: 18px;
  margin: 6px 0 8px;
  color: var(--dark);
}

.fill-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}

/* --- Board --- */
.board-wrap {
  margin: 0 auto;
  width: min(72vmin, 420px);
  height: min(72vmin, 420px);
  position: relative;
}

svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Diagram box */
.diagram-box {
  border: 3px solid var(--dark);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Connecting buttons (circle) */
.connect-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--dark);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.connect-btn:hover {
  background: #ff7189;
  transform: scale(1.1);
}

/* --- Controls & Buttons --- */
.stats {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.message {
  min-height: 18px;
  margin-top: 8px;
  color: var(--dark);
}
.controls {
  text-align: center;
  margin-top: 12px;
}
.controls .top-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.controls .bottom-btn {
  margin-top: 10px;
}

button {
  border: 0;
  padding: 10px 18px;
  border-radius: 26px;
  background: #fff;
  color: var(--dark);
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform .12s, background .12s;
}
button:active {
  transform: translateY(2px);
}
.restart {
  background: #ffd6db;
}
.delete {
  background: #ffb3b9;
}
.enter {
  background: #ff8b94;
}
.check {
  background: var(--white);
  color: var(--dark);
  font-weight: 600;
}
.check:hover {
  background: #f1f1f1;
}

/* Word List */
.words {
  background: rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 14px 20px;
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  width: 60%;
}
.word-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.04);
}
#currentWord {
  font-size: 24px;
  font-weight: 700;
  margin-top: 12px;
  color: var(--dark);
  letter-spacing: 2px;
}

/* --- Top Buttons Layout --- */
.top-buttons {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
}
.top-buttons button {
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--white);
  font-weight: 600;
  flex: 1;
}

/* --- Find Today’s Answer Section --- */
#answerArea {
  display: none;
  margin: 30px auto 20px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  max-width: 480px;
  overflow: visible !important;
}

/* Inputs inside answer section */
.side-input {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
.side-input label {
  width: 70px;
  text-align: right;
  font-weight: 600;
  color: var(--dark);
}
.side-input input {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #ccc;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Output area */
#wordsOutput {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  min-height: 120px;
  background: rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 14px 20px;
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  width: 100%;
}

/* SVG border thickness */
#gameBoard svg rect {
  stroke: #000;
  stroke-width: 3;
  fill: none;
  rx: 10;
}

/* Responsive adjustments */
@media (max-width:420px) {
  .top-buttons {
    gap: 6px;
  }
  .top-buttons button {
    padding: 9px;
    font-size: 14px;
  }
  .side-input label {
    width: 58px;
    font-size: 14px;
  }
  .side-input input {
    width: 30px;
    font-size: 16px;
    padding: 5px;
  }
  h1 {
    font-size: 16px;
  }
}
