html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1;
}
ol, ul {
  list-style: none;
}
blockquote, q {
  quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

* {
  font-family: "Poppins", sans-serif;
}

a, a:active, a:visited, a:hover {
  text-decoration: none;
  color: #000000;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-family: "Poppins", sans-serif;
  overscroll-behavior: contain;
  overflow: hidden;
  position: fixed;
  top: 0px;
  width: 100%;
}
body.small {
  font-size: .8em;
}

html, body {
  overflow: hidden;
  overscroll-behavior: contain;
}

#all {
  overflow: hidden;
  position: fixed;
  top: 0px;
  width: 100%;
}

.bold {
  font-weight: 800;
}

header {
  background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
  padding: 10px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.creator-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  color: #333;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .instructions-button {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 40px;
}
#logotype {
  font-size: 40px;
  margin: 5px 0px 5px 55px;
  color: #ffffff;
  line-height: 1;
  font-weight: 300;
  display: inline-block;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
#logo {
  position: absolute;
  top: 10px;
  left: 10px;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.small #logotype {
  font-size: 25px;
  margin-left: 40px;
}
.small #logo {
  height: 30px;
  top: 5px;
  left: 5px;
}
.small .instructions-button {
  height: 30px;
  top: 5px;
  right: 5px;
}

/* Hero Section Styles */
.hero-section {
  text-align: center;
  margin-bottom: 25px;
}

.hero-section h2 {
  font-size: 2.2em;
  font-weight: 800;
  color: #2c3e50;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.tagline {
  font-size: 1.1em;
  color: #34495e;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* Game Steps Styles */
.game-steps {
  display: flex;
  justify-content: space-around;
  margin: 25px 0;
  flex-wrap: wrap;
}

.step-card {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  border-radius: 15px;
  padding: 15px;
  margin: 5px;
  flex: 1;
  min-width: 120px;
  max-width: 150px;
  color: white;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.step-card:hover {
  transform: translateY(-5px);
}

.step-number {
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-weight: 800;
  font-size: 1.2em;
}

.step-content h3 {
  font-size: 0.9em;
  font-weight: 700;
  margin-bottom: 5px;
}

.step-content p {
  font-size: 0.8em;
  opacity: 0.9;
  margin: 0;
}

/* Achievement Preview */
.achievement-preview {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  border-radius: 15px;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.achievement-preview p {
  margin: 5px 0;
  color: #2c3e50;
  font-weight: 600;
}

h2 {
  font-size: 1.5em;
  font-weight: bold;
  margin: 20px 20px;
  text-align: center;
  color: #ffffff;
}
h3 {
  font-size: 1.2em;
  font-weight: bold;
  margin: 10px 0;
  color: #2c3e50;
}
p {
  margin: 10px 20px;
}
.center {
  text-align: center;
}
b {
  font-weight: bold;
}

.button {
  position: absolute;
  color: #ffffff;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  border: none;
  border-radius: 25px;
  padding: 12px 20px;
  font-weight: 700;
  text-decoration: none;
  display: block;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.button.primary {
  background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

.button.secondary {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.view {
  width: 90%;
  margin: 0px auto;
  overflow: hidden;
}
#board {
  margin: 10px auto;
  position: relative;
  overflow: hidden;
  border: 4px solid #ffffff;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

#advanced-options {
  display: none;
  margin: 20px 0px;
  width: 80%;
}

#advanced-options input, #advanced-options select {
  width: 100%;
  margin: 5px 0px;
  display: block;
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 0.9em;
}

#advanced-options select {
  background: white;
  cursor: pointer;
}

.admin #advanced-options {
  display: block;
}

.widgetFrame {
  margin: 30px auto;
}

.board {
  margin: 10px auto;
  background-color: #FFFFFF;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.board canvas {
  position: absolute;
  top: 0px;
  left: 0px;
  border-radius: 20px;
}
#canvases {
  opacity: 0.6;
  filter: blur(2px);
}

#pic {
  position: absolute;
  top: 0px;
  left: 0px;
  border-radius: 20px;
}

#upload {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: absolute;
  top: 0px;
  left: 0px;
  text-align: center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
}

.medium #upload {
  background-image: none !important;
}

#upload p {
  margin: 5px 20px;
}
.small #upload p {
  margin: 2px 10px;
}

#upload h2 {
  color: #2c3e50;
  margin: 10px 20px;
}
#upload p {
  color: #2c3e50;
  line-height: 1.25;
}

#upload a {
  text-decoration: underline;
  font-weight: bold;
  color: #0984e3;
}

#upload-field {
  display: none;
}
#upload-label {
  color: #ffffff;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  border: none;
  border-radius: 30px;
  padding: 15px 30px;
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
  max-width: 90%;
  margin: 20px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  font-size: 1.1em;
}

#upload-label:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

#hit {
  position: absolute;
  top: 0px;
  left: 0px;
  border-radius: 20px;
}

.controls {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  margin: 20px auto;
  text-align: center;
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.controls .button {
  font-size: 1em;
  display: inline-block;
  position: relative;
  padding: 12px 20px;
  margin: 10px 8px;
  border-radius: 25px;
}

.controls input {
  font-size: 1em;
  padding: 12px 15px;
  border: 3px solid #74b9ff;
  border-radius: 25px;
  margin: 10px 8px;
  outline: none;
  transition: all 0.3s ease;
}

.controls input:focus {
  border-color: #0984e3;
  box-shadow: 0 0 10px rgba(116, 185, 255, 0.3);
}

.instructions-modal {
  position: absolute; 
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 25px;
  width: 85%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: none;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.instructions-modal h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.3em;
}

.instructions-modal p {
  font-size: 1em;
  line-height: 1.4;
  color: #34495e;
  margin: 10px 0;
}
.instructions-modal .button {
  display: inline-block;
  position: relative;
  margin-top: 15px;
}

#message {
  background-size: cover;
  background-image: url("../img/themes/bgs/1.jpg");
  position: absolute;
  top: 0px;
  left: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border-radius: 20px;
}
#message-title {
  color: #000;
  padding: 15px;
  margin: 15px 0;
  font-size:1.5em;
  font-weight: bold;
  text-align: center;
  border: none;
  background: rgba(255,255,255,0.9);
  width: 80%;
  outline: none;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
#message-title:focus {
  outline: none;
  border: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
#message #message-body {
  margin: 15px 0;
  padding: 15px;
  text-align: center;
  border: none;
  background: rgba(255,255,255,0.9);
  resize: none;
  height: 120px;
  font-size: 1em;
  width: 80%;
  outline: none;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
#message #message-body:focus {
  outline: none;
  border: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

#theme-select img {
  border: 4px solid #74b9ff;
  border-radius: 10px;
  width: 15%;
  margin: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#theme-select img:hover {
  transform: scale(1.1);
  border-color: #0984e3;
}

#theme-select p {
  font-weight: bold;
  color: #2c3e50;
}

/* Success/Confirmation Styles */
#confirm {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
  color: white;
  border-radius: 20px;
}

.success-celebration {
  text-align: center;
  padding: 20px;
}

.success-celebration h2 {
  color: #ffffff;
  font-size: 2.2em;
  margin: 0px 20px 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.achievement-badge {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #2c3e50;
  padding: 15px 25px;
  border-radius: 25px;
  font-weight: 800;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.share-section {
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
}

.challenge-link {
  display: block;
  background: rgba(255,255,255,0.9);
  color: #2c3e50;
  padding: 15px;
  border-radius: 10px;
  margin: 10px 0;
  font-weight: bold;
  text-decoration: none;
  word-break: break-all;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.share-btn {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.challenge-stats {
  color: rgba(255,255,255,0.9);
  font-size: 0.9em;
  margin-top: 15px;
}

#confirm p {
  margin: 15px 30px;
  text-align: center;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
}

#confirm a {
  display: block;
  text-align: center;
  font-weight: bold;
  color: #ffffff;
}

#clue-field {
  border: 3px solid #74b9ff;
  border-radius: 25px;
  padding: 12px 20px;
  min-width: 250px;
  font-size: 1em;
  outline: none;
  transition: all 0.3s ease;
}

#clue-field:focus {
  border-color: #0984e3;
  box-shadow: 0 0 15px rgba(116, 185, 255, 0.3);
}

.medium #disclaimer {
  font-size: .7em;
}
.small #logotype {
  font-size: 30px;
}

/* Mode-specific styles */
#create-intro, #holiday-intro {
  width: 100%;
}

#create-intro li {
  text-align: left;
  margin-bottom: 3px;
}
#create-intro ul {
  margin: 0px auto;
  display: inline-block;
  text-align: left;
}
#create-intro {
  text-align: center;
}

#create-intro b {
  display: inline-flex;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  margin-right: 5px;
  border-radius: 999px;
  color: #ffffff;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  font-size: 0.9em;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Hide elements by default */
#message, #message-controls, #confirm {
  display: none;
}

#hit, #hit-controls, #clue-controls {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .game-steps {
    flex-direction: column;
    align-items: center;
  }
  
  .step-card {
    max-width: 200px;
    margin: 8px 0;
  }
  
  .share-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-section h2 {
    font-size: 1.8em;
  }
}