@import url('https://fonts.googleapis.com/css2?family=Caveat&family=Roboto:wght@100;300;400;700&display=swap');
:root {
  --bg: #f6f8fa;
  --primary: #f13d5a;
  --primary-light: #F06292;
  --primary-dark: #d11553;
  --border: #cccccc;
  --text: #121212;
}
html, body {
  margin: 0px;
  padding: 0px;
  outline: none;
}
body{
  color: var(--text);
  font-family: "Roboto","Helvetica","Arial",sans-serif;
  background:var(--bg);
  font-style:normal;
  font-weight:400;
  max-width:100%;
  min-height:100vh;
}
main {
  margin: 0px auto 60px;
  padding:10px;
  display:block;
}
section {
  position:relative;
  text-align:center;
}
section:not(:first-child) {
  display: none;
}
a, .link { 
  color:var(--primary);
  text-decoration:none;
} 
a.white, .link.white {
  color: #ffffff;
  text-decoration: underline;
}	
a:hover, .link:hover { 
  color:var(--primary-dark) !important;
  text-decoration:underline !important;
  cursor:pointer !important;
}  
input[type=button], .button {
  color: #FFFFFF;
  background: var(--primary);
  border: 2px solid var(--primary);
  padding: 15px 20px;
  display: block;
  margin: 10px auto 10px;
  font-weight: bold;
  min-width: 150px;
  box-sizing: border-box;
  border-radius: 2px;
  font-size: 16px;
  text-transform: capitalize;
  min-height: 40px;
  max-width: 250px;
  text-align: center;
  -webkit-appearance: none;
  font-family: inherit;
  transition: 0.2s background-color ease-in-out;
}
input[type=button].secondary, .button.secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color:var(--primary);
}
button.left, .button.left {
  margin-left: 0;
}
input[type=button].inline, .button.inline {
  display:inline-block;
}
input[type=button]:hover, .button:hover {
  color:#FFFFFF !important;
  cursor: pointer !important;
  background: var(--primary-dark) !important;
  border:2px solid var(--primary-dark) !important;
  text-decoration:none !important;
}
.hidden {
  display: none;
}
#timer {  
  font-size: 3em;
  font-weight: 100;
  text-align:center;
  height:100px;
}
#timer div {
  display: inline-block;
  margin:0 10px;
}  
#timer span {
  display: block;
  font-size: .35em;
  font-weight: 400;
}
.italic {
  font-style: italic;
}
.open-button {
  background: var(--primary);
  border: var(--primary-light) 0.1em solid;
  border-radius: 50%;
  font-size: 3em;
  animation: pulse 1s infinite;
  cursor: pointer;
  position: absolute;
  line-height: 1.8em;
  top: -1.5em;
  left: -0.8em;
  width: 1.4em;
  height: 1.4em;
}
.open-button:focus {
	outline: none;
	border-color: #F8BBD0
}
.open-button img {
  width: 1em;
  height: 1em;
  left: 0.2em;
  position: absolute;
  top: 0.2em;
}
.envelope.open .open-button {
	animation-play-state: paused;
}
@keyframes pulse {
  from {
    transform: scale3d(1, 1, 1);
  }
  50% {
    transform: scale3d(1.05, 1.05, 1.05);
  }
  to {
    transform: scale3d(1, 1, 1);
  }
}
.envelope {
	background: #d77e35;
	margin-top: 14em;
	position: relative;
	width: 30em;
	height: 18em;
  margin:14em auto 0;
  box-shadow: 0 0 10px 0 #aaa;
}
.envelope-flap {
	border: transparent 0 solid;
	border-style: solid;
	z-index: 1;
	position: absolute;
	left: 0;
	width: 0;
	height: 0;
}
.inside-flap-left {
	border-width: 9em 0 9em 12em;
	border-color: transparent transparent transparent #ecc460;
}
.inside-flap-right {
	border-width: 9em 12em 9em 0;
	border-color: transparent #ecc460 transparent transparent;
	right: 0;
	left: auto;
}
.front-flap {
	border-width: 12em 15em 0 15em;
	border-color: #f9e1a7 transparent transparent transparent;
	transition: transform 0.2s ease;
	transform-origin: top center;
}
.back-flap {
	border-width: 0 12em 9em 12em;
	border-color: transparent transparent #f7d98f transparent;
	width: 6em;
	bottom: 0;
}
.envelope.open .envelope-flap {
	z-index: 3;
}
.envelope.open .front-flap	 {
	transform: rotateX(180deg);
	z-index: 1;
}
.card-flyout {
	background: #eee;
	z-index: 0;
	transition: z-index 0.3s step-start, transform 0s ease-in 0.2s;
	position: absolute;
	width: 29em;
	height: 14em;
	left: 0.5em;
	top: 1em;
  font-family: 'Caveat', cursive;
  text-align:center;
}
.card-flyout > div {
  padding:10px;  
  font-size:1.4em;
  line-height: 1.2em;
}
.envelope.open .card-flyout {
	transform: translateY(-10em);
	z-index: 2;
	transition: z-index 0.3s step-end, transform 1s ease-in 0.5s;
}
.typewriter {
  width: fit-content;
  margin: 20px auto;
}
.typewriter > div {
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  border-right: .15em solid orange; /* The typwriter cursor */
  white-space: nowrap; /* Keeps the content on a single line */
  margin: 0 auto; /* Gives that scrolling effect as the typing happens */
  letter-spacing: .15em; /* Adjust as needed */
  font-size: 1.6em;
  font-family: monospace;
  animation: 
    typing 1.5s steps(40, end),
    blink-caret .75s step-end infinite;
}
#crossword {
  background: #000;
  max-width: 800px;
  margin: 10px auto;
  padding: 30px 20px;
}
#clues {
  margin-bottom: 40px;
}
#clues > div {
  margin: 0px auto 10px;
}
#clues span {
  display: inline-block;
  font-size: 25px;
  margin: 0px 10px;
}
#clues .hint {
  cursor:pointer;
}
#clues input {
  width: 30px;
  height: 30px;
  background-size: 20px;
  border: 1px solid #000;
  font-family: monospace;
  font-size: 13px;
  box-sizing: border-box;
  margin-right: -1px;
  text-align: center;
  font-size: 30px;
  color: #000000;
  background-color: #ffffff;
  padding:0px;
}
#clues input.yes {
  background-color: #56d460;
}
#clues input.no {
  background-color: #e64444;
}
#clues input.letter {
  background-color: #5e54e7;
  color:#ffffff;
}
#hint {
  font-family: 'Caveat', cursive;
  font-size:30px;
  margin-bottom:20px;
  color:#fff;
  transition: height 1s ease;
}
.number {
  color:#fff;
}
#gallery img {
  max-width:45%;
  display:inline-block;
  margin:2%;
  width:600px;
}
#gift {
  display: block;
  margin: 20px auto;
  cursor: pointer;
  width: 200px;
}
#opening {
  top: 0;
  left: 0;
  position: fixed;
  text-align: center;
  width: 100%;
  font-family: 'Caveat', cursive;
  padding: 20px 0px;
  font-size:24px;
}
#confetti-canvas {
  position: fixed;
  left: 0;
  top: 0;
}

.game-intro {
  font-family: 'Caveat', cursive;
}
.game-container {
  width: 400px;
  height: 400px;
  margin: 0 auto;
  text-align: center;
  margin-top: 10px;   
  padding: 0px;
  position: relative;
}
.game-container > div {
  width: 100%;
  height:100%;
  position:absolute;
  left:0;
  top:0;
}
.game-image {
  background-color: var(--border);
}
.game-image img {
  width: 100%;
  height:100%;
}
.game-cover.blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.presentdescription {
  font-family: 'Caveat', cursive;
  color:var(--primary);
  font-size: 1.2em;
  margin-top: 20px;
  margin-bottom: 20px;
}
.presentfeatures span {
  display:inline-block;
  padding:5px;
  border-left: 10px solid var(--primary);
  margin: 5px;
  border-radius: 7px;
  border-right: 0px solid var(--primary);
  border-top: 0px solid var(--primary);
  border-bottom: 8px solid var(--primary);
}

.game-cover span {
  width: 32.5%;
  height: 32.5%;
  background-color: var(--primary);
  display: inline-block;
  margin: 1px;
  border: 0px;
  line-height: 1;
  aspect-ratio: 1;
}
.game-cover span:hover {
  background-color: var(--primary-dark);
  cursor:pointer;
}

.picq {
  font-weight:bold;
  font-family:'Caveat', cursive;
  font-size:1.4em;
  margin-bottom:20px;
  color:var(--primary)
}

#picturequestion {
  text-align: center;
}

.fadeout {
  opacity: 0;
  transition: opacity 1s; /* Apply a smooth transition to opacity over 0.5 seconds */
}

.card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  margin: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 300px;
  text-align:left;
  display: inline-block;
  vertical-align: top;
}

.card img {
  max-width: 100%;
  border-radius: 6px;
}

.card-title {
  font-size: 1.5rem;
  margin-top: 10px;
}

.card-summary {
  margin-top: 10px;
  color: #555;
}

.card-features {
  list-style-type: disc;
  margin-top: 10px;
  padding-left: 20px;
}

.card-features li {
  margin-bottom: 5px;
}

#present2023 .title {
  font-size: 30px;
  color: var(--primary);
  font-family: 'Caveat', cursive;
  margin: 20px auto;
}


.divider {
  height:200vh;
  display: block;
}

#placeholderimg {
  width:250px;
  height:250px;
  margin:0 auto;
  display:block;
}
#placeholderimg img {
  width:100%;
}
#wordgameanswer {
  display: none;
}
.videocircle {
  position: relative;
  text-align: center;
  width: 250px;
  height: 250px;
  border-radius: 125px;
  margin: 0 auto;
  -webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
}
.wordgamequestion > div {
  margin-top:40px;
}
.wordgamequestion > div > div {
  display: inline-block;
  width: fit-content;
}
.wordgamequestion input[type=text] {
  width: 30px;
  height: 30px;
  font-size:24px;
  text-align:center;
}
.wordgamequestion input[type=text].correct {
  border:1px solid green;
}
.wordgamequestion input[type=text].incorrect {
  border:1px solid red;
}
#iphone {
  display:none;
  margin:0 auto;
  max-width:400px;
}
#iphone {
  position: relative;
}
#underneath {
  margin: 40px auto 0px;
  max-height:350px;
  height:100%;
  max-width:90%;
  display:none;
}
/*#scratcher {
  position: absolute;
  left:0;
  top:0;
  width:100%;
  min-height:600px;
  height:70vh;
  background-color:#555;
}
#iphone .coin {
  position: absolute;
  left:40%;
  top:80px;
  width:50px;
  height:50px;
}*/
video {
  width: 500px;
  height: 500px;
  position: absolute;
  top: -125px;
  left: -245px;
}
.wordclue {
  max-width: 70px;
  margin: 0 auto;
}
.p1,.p2,.p3,.p4,.p5,.p6 {
  margin-right: 10px;
}
#phoneanswers, #videoextras > div, #phoneextras > div {
  display: none;
}


.sc__container {
  position: relative;
  overflow: hidden;
  height: 440px;
  max-width: 400px;
}

.sc__container > img {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  max-width: 70%;
  margin-top: 20px;
}

.sc__container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
}



/* The typing effect */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: orange; }
}

@media only screen and (max-width: 800px) {
  .envelope {
    font-size:14px;
  }
}
@media only screen and (max-width: 600px) {
  .envelope {
    font-size:12px;
  }
  #hint {
    font-size: 25px;
  }
  #clues {
    margin-bottom: 25px;
  }
  #clues span {
    font-size: 20px;
    margin: 0px 5px;
  }
  #clues input {
    width: 25px;
    height: 25px;
    font-size: 25px;
  }
}


/*2025 styles */

:root{
  --card:#191a2e;
  --ink:#f6f7ff;
  --muted:#aab0d4;
  --accent:#8bf6d2;
  --accent-2:#ffd166;
  --danger:#ff6b6b;
  --good:#191a2e;
}


.wrapper{
  max-width: 940px;
  margin: 0 auto;
  padding: 10px;
}

.hero{
  text-align:center;
  margin: 12px 0 24px;
}
.hero h1{
  margin:0 0 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.sub{ color: var(--muted); margin:0; }

.game{
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.top-row{
  display:flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.status{
  display:flex;
  align-items:center;
  justify-content: space-between;
  width: 100%;
}

.lives .label{ color: var(--muted); margin-right: 6px; }
#livesHearts{ font-size: 22px; letter-spacing: 2px; }

.progress{ color: var(--muted); }

.hint-area{
  display:flex;
  align-items:center;
  gap: 10px;
}
.hint{
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.25);
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--text);
}
.hidden{ display:none; }
#nextBtn{ display: none; }
.word-group{
  display: inline-flex;
  white-space: nowrap;
  gap: 6px;
  margin: 0 10px;
  background: rgba(25, 26, 46, 0.2);
  padding: 4px;
  border-radius: 14px;
}
.word-area{
  display:flex;
  gap: 10px;
  justify-content:center;
  flex-wrap: wrap;
  padding: 18px 10px;
  min-height: 70px;
  background: rgba(0,0,0,0.15);
  border-radius: 14px;
  margin: 8px 0 14px;
  border: 1px solid rgba(255,255,255,0.08);
}

.letter-box{
  width: 38px;
  height: 52px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 22px;
  font-weight: 600;
  background: var(--card);
  border-radius: 12px;
  text-transform: uppercase;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--ink);
}
.letter-box.space{
  width: 20px;
  background: transparent;
  box-shadow: none;
  border: none;
}

/* Keyboard container */
.keyboard{
  width: calc(100% - 12px);
  display: flex;
  flex-direction: column;
  gap: 10px;              /* space between rows */
  background: var(--card);
  padding: 6px;
  border-radius: 12px;
  align-items: center;
}

/* Each row fills full width, keys split evenly via JS repeat(N, 1fr) */
.kb-row{
  display: grid;
  width: 100%;
  gap: 10px;              /* space between keys */
  min-width: 0;           /* avoid overflow on narrow screens */
}

.kb-row:nth-child(2){ max-width:90% }
.kb-row:nth-child(3) {
  max-width: 70%;
  padding-right: 10%;
}

/* Keys fill their grid cell and scale nicely */
.key{
  width: 100%;
  min-height: 44px;       /* good tap target */
  padding: 10px 0;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.2s ease, opacity 0.2s;
  user-select: none;
}

/* Hover/disabled behavior stays the same (optional) */
.key:hover{ transform: translateY(-1px); }
.key:disabled{ opacity: 0.45; cursor: not-allowed; }



.controls{
  display:flex;
  gap: 10px;
  justify-content:center;
  margin: 14px 0 6px;
}

.btn{
  background: var(--accent);
  color: #052b1f;
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.06s ease, filter 0.2s ease;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(1.05); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn.small{ padding: 8px 12px; font-weight: 600; }

.message{
  text-align:center;
  min-height: 28px;
  margin: 6px 0 12px;
  font-weight: 600;
}

.message.win{ color: var(--good); }
.message.lose{ color: var(--danger); }

.rewards{
  display:grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.reward-card{
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.98);
  opacity: 0;
  translate: 0 8px;
  transition: transform 0.25s ease, opacity 0.25s ease, translate 0.25s ease;
}
.reward-card.show{
  opacity: 1;
  translate: 0 0;
  transform: scale(1);
}

.reward-card img{
  width: 100%;
  height: 140px;
  object-fit: cover;
  display:block;
}
.reward-body{ padding: 12px; }
.reward-title{ 
  margin: 0 0 6px; 
  font-size: 18px; 
  color: var(--ink);
}
.reward-text{ margin: 0 0 10px; color: var(--muted); }
.reward-actions{
  display:flex; justify-content:flex-end;
}
.reward-actions a{
  text-decoration:none;
  color:#091a14;
  background: var(--accent-2);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
}

/* Confetti-ish hearts */
.confetti{
  pointer-events:none;
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.heart{
  position:absolute;
  width: 12px; height: 12px;
  background: #ff88b7;
  transform: rotate(45deg);
  animation: floatUp 1800ms ease-in forwards;
}
.heart:before, .heart:after{
  content:'';
  position:absolute;
  width:12px; height:12px;
  background:#ff88b7;
  border-radius:50%;
}
.heart:before{ left:-6px; }
.heart:after{ top:-6px; }

@keyframes floatUp{
  0%{ opacity:0; transform: translateY(0) rotate(45deg) scale(0.6);}
  15%{ opacity:1; }
  100%{ opacity:0; transform: translateY(-160px) rotate(45deg) scale(1.1); }
}

/* Mobile tweaks */
@media (max-width: 560px){
  .keyboard{ 
    grid-template-columns: repeat(9, minmax(0,1fr)); 
  }
  .letter-box{ 
    width: 34px; 
    height: 46px; 
  }
  .key{
    min-height: 40px;
    padding: 8px 0;
    font-size: 15px;
  }
  .word-group{
    gap:2px;
  }
  #gift {
    width: 130px;
  }
  .lives > span {
    display: block;
    text-align: left;
  }
  .game {
    border-radius: 8px;
    padding: 10px;
  }
}
