/* Reset & base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #e9f0ea; /* subtle green tint */
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background-color: #2f4f2f;
  color: #f0f0f0;
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  user-select: none;
}

header h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 1.2px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.nav-btn {
  background: transparent;
  border: 2px solid transparent;
  color: #e8f0e8;
  font-size: 1rem;
  padding: 8px 18px;
  cursor: pointer;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.3s ease;
  user-select: none;
}

.nav-btn:hover,
.nav-btn:focus {
  background-color: #496c49;
  border-color: #aadbaa;
  outline: none;
  color: #d6efd6;
  box-shadow: 0 0 8px #aadbaa;
}

.dropdown-parent {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 120%;
  left: 0;
  background: #fafafa;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 0.4rem 0;
  min-width: 180px;
  display: none;
  z-index: 1500;
  user-select: none;
}

.dropdown li {
  margin: 0;
}

.dropdown li a {
  display: block;
  padding: 12px 20px;
  color: #2f4f2f;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.25s ease;
}

.dropdown li a:hover,
.dropdown li a:focus {
  background-color: #c9e3ca;
  outline: none;
}

.dropdown-parent:hover > .dropdown,
.dropdown-parent:focus-within > .dropdown {
  display: block;
}

main {
  flex: 1;
  padding: 3rem 2rem 5rem;
  max-width: 1100px;
  margin: auto;
  width: 95%;
}

/* Homepage Hero */
.home-section {
  background: linear-gradient(135deg, #c9e3ca 0%, #f5f9f6 100%);
  padding: 6rem 2rem 5rem;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 15px 30px rgba(46, 70, 46, 0.15);
  user-select: none;
}

.home-section h2 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 900;
  color: #2f4f2f;
  letter-spacing: 2px;
  line-height: 1.1;
}

.home-section .highlight {
  color: #496c49;
  text-shadow: 1px 1px 2px #acd7ac;
}

.home-section p {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #354935;
  font-weight: 600;
}

.primary-btn,
.secondary-btn,
.back-btn {
  cursor: pointer;
  border-radius: 8px;
  font-weight: 700;
  user-select: none;
  border: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 18px rgba(73, 108, 73, 0.4);
}

.primary-btn {
  background-color: #496c49;
  color: white;
  padding: 16px 42px;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
}

.primary-btn:hover,
.primary-btn:focus {
  background-color: #3b583b;
  box-shadow: 0 8px 20px rgba(59, 88, 59, 0.7);
  outline: none;
}

.secondary-btn {
  background-color: #c9e3ca;
  color: #2f4f2f;
  padding: 12px 28px;
  font-size: 1.1rem;
  margin-left: 1rem;
}

.secondary-btn:hover,
.secondary-btn:focus {
  background-color: #a3cba3;
  outline: none;
  box-shadow: 0 5px 15px rgba(46, 70, 46, 0.4);
}

.back-btn {
  background-color: #496c49;
  color: white;
  padding: 10px 24px;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  box-shadow: 0 7px 22px rgba(73, 108, 73, 0.55);
}

.back-btn:hover,
.back-btn:focus {
  background-color: #3b583b;
  outline: none;
  box-shadow: 0 8px 26px rgba(59, 88, 59, 0.8);
}

/* Papers Grid */
.grid-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.8rem;
  margin-top: 1rem;
}

.paper {
  background-color: white;
  border-radius: 18px;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  font-weight: 800;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  user-select: none;
  border: 3px solid transparent;
  color: #2f4f2f;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
}

.paper:hover,
.paper:focus {
  transform: translateY(-8px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.15);
  border-color: #83b683;
  outline: none;
}

/* Game viewer */
#gameViewer {
  text-align: center;
  margin-top: 2rem;
}

#gameViewer iframe {
  border-radius: 14px;
  border: 2px solid #83b683;
  box-shadow: 0 15px 40px rgba(131, 182, 131, 0.5);
  max-width: 100%;
  height: 600px;
}

#loader {
  font-weight: 700;
  color: #496c49;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  user-select: none;
}

.hidden {
  display: none !important;
}

/* Resources List */
.resources {
  margin-top: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  user-select: none;
}

.resources li {
  margin: 1rem 0;
  font-weight: 700;
  font-size: 1.1rem;
}

.resources li a {
  color: #3c7d3c;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.resources li a:hover,
.resources li a:focus {
  border-color: #83b683;
  outline: none;
}

/* Login Screen */
#loginScreen {
  max-width: 400px;
  margin: 4rem auto 5rem;
  background: white;
  padding: 3rem 2rem 2rem;
  border-radius: 24px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  text-align: center;
  user-select: none;
}

#loginScreen h2 {
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
  font-weight: 900;
  color: #2f4f2f;
}

#loginScreen input {
  width: 100%;
  padding: 14px;
  margin: 12px 0 24px;
  border-radius: 12px;
  border: 2px solid #83b683;
  font-size: 1.15rem;
  transition: border-color 0.3s ease;
}

#loginScreen input:focus {
  border-color: #3c7d3c;
  outline: none;
  box-shadow: 0 0 12px #3c7d3caa;
}

.error-text {
  color: #b30000;
  font-weight: 700;
  margin-top: 10px;
  user-select: none;
}

/* Footer */
footer {
  background-color: #2f4f2f;
  color: #a5c4a5;
  text-align: center;
  padding: 1.2rem 2rem;
  font-size: 1rem;
  margin-top: auto;
  user-select: none;
  letter-spacing: 0.06em;
}
