body {
  background-color: #fdf6ec;
  font-family: 'Poppins', sans-serif;
  padding: 50px 20px;
}

h1 {
  text-align: center;
  margin-bottom: 50px;
  font-family: 'Comic Neue', cursive;
  font-size: 2.5rem;
  color: #333;
}

body.dark-mode .service-heading {
  color: var(--bs-heading-color);
}




.game-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 50px;
}



.btn-primary {
  background-color: #ff7ca8;
  border: none;
}

.btn-primary:hover {
  background-color: lch(62.97% 65 4.01);
}

/* Prevent service-heading overlap with navbar */
#about {
  margin-top: 80px;
}



/* Color Recall */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color:#fdf6ec;
  margin: 0;
  padding: 40px 20px;
  text-align: center;
}
.container { padding-top: 60px; }
@media (max-width: 1000px) { .container { padding-top: 55px; } }
@media (max-width: 450px) { .container { padding-top: 50px; } }

h2 { color: #2c3e50; }


.games-section{
 display: flex;
  justify-content: center;   /* center horizontally */
  width: 100%;
  height:1000px;
  margin-top: 100px;          /* some space below the text */
}

.outer-games{
  display: flex;
  flex-direction:column;
  justify-content: center;
  align-items: center;
  width: 750px;
  height: 950px;
  background-color:rgb(242, 208, 135);
  border: 1px solid #000; 
  border-radius:20px;
  padding:30px;
  box-sizing: border-box;
  
}
.inner-games{
  display: flex;   
  flex-direction: column;
  justify-content: center;
  align-items: center; 
  background-color:rgba(250, 235, 221, 0.6); ;
  min-width:690px;
  min-height:830px;
  box-sizing: border-box;
  margin-top:20px;
  padding:10px;
}
.play-games{
  display: flex;
  flex-direction: column; /* stack games vertically */
  justify-content: flex-start; /* align to top so tall games fit */
  align-items: center; /* center horizontally */
  background-color: #faebdd;
  width: 90%;       /* use full width */
  min-height: 700px; /* optional: ensures some height */
  padding: 20px;
  box-sizing: border-box;
  border-radius:20px;
}
body.dark-mode .outer-games {
  background-color: var(--nav-bgcolor);
}
body.dark-mode .inner-games{
  background-color: var(--img-bg-shade);
}
body.dark-mode .play-games{
  background-color: rgba(80, 78, 78, 0.5);
}
body.dark-mode h2{
  color:white;
}
body.dark-mode h1{
  color:white;
}

.tabs-wrapper {
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      margin: 20px 0;
    }
    .tabs {
      display: flex;
      overflow-x: auto;
      scroll-behavior: smooth;
      white-space: nowrap;
      width: 580px;
      scrollbar-width: none;
    }
    .tabs::-webkit-scrollbar { display: none; }

    .tab-button {
      flex: 0 0 auto;
      margin: 0 5px;
      padding: 10px 16px;
      border: none;
      background: rgb(70, 108, 213);
      cursor: pointer;
      border-radius: 20px;
      font-weight: 500;
    }
    .tab-button :hover{
      background-color: #0056b3;
    }
    .tab-button.active {
      background: #0056b3;
      color: white;
    }
     
    .arrow {
      background: #0056b3;
      border: none;
      color: white;
      padding: 8px 12px;
      cursor: pointer;
      border-radius: 50%;
      margin: 0 5px;
      position: relative;
    }

    .tab-content {
      margin-top: 20px;
    }
    .tab-pane { display: none; }
    .tab-pane.active { display: block; }

.visitor {
  text-align: center;
  display:flex;
  flex-direction: column;
  justify-content: center;
  margin-top:10px;
  margin-bottom: 10px;
}
.visitor h4 {
  
  margin: 0;
  font-size: 18px;
  vertical-align: middle;
}
.visitor #counter {
  vertical-align: middle;
}

.game-box {
  background-color: #060c29;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border: 2px solid #060c29;
  padding: 30px;
  max-width: 600px;
  margin: 0 auto;
  color: white;
}

/*<!-- Hangman CSS -->*/
    
    :root {
      --bg-color: #fdf6ec;
      --card-bg: #ffffffd3;
      --primary: #1c1919;
      --success: #f849e6;
      --danger: #d63031;
      --text: #baccd1;
      --muted: #c5d0d3;
      --radius: 10px;
      --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    * {
      box-sizing: border-box;
    }

   
    
/* Game-specific styles only - navbar styles come from index.css */

section{
    padding: 50px var(--padding-inline-section);
    background: var(--bg-shade);
    
    
}
.main-page{
    margin-top: 60px; /* Since hangman doesn't use .main wrapper */
    justify-content: center;
    gap: 50px;
    padding-bottom: 5%;
    
 
}

/* Mobile responsive fix for main content */
@media (max-width: 1000px) {
    .main-page {
        margin-top: 55px;
    }
}

@media (max-width: 450px) {
    .main-page {
        margin-top: 50px;
    }
}
.header-left{
   max-width: 40vw;
}
.header-left h1{
    margin-top: 20px;
}
.header-right img{
    width: 100%;
    margin-left: 10%;
}
.get-started-btn{
    margin-top: 20px;
    transition: all 0.3s ease;

}

.get-started-btn:hover{
    transform: translate(1.3);
    background-color: #577592;
}
#click{
    display: none;
}
@media (max-width: 768px) {
  nav ul {
    position: fixed;
    top: 15vh;
    left: -100%;
    width: 100%;
    height: calc(100vh - 15vh);
    background-color: var(--nav-bgcolor);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: left 0.3s ease;
    z-index: 9;
  }

  #click:checked ~ ul {
    left: 0;
  }

  nav .menu-btn i {
    display: block;
  }
}

    .game-title {
      text-align: center;
      margin-top: 100px; /* Offset for fixed navbar */
      font-size: 2rem;
      font-weight: 600;
      color: var(--primary);
    }

    .hangman-container {
      background: var(--card-bg);
      padding: 30px 25px;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      max-width: 500px;
      width: 100%;
      margin: 20px auto;
      text-align: center;
    }

    #hint {
      font-size: 1em;
      color: var(--muted);
      margin-bottom: 15px;
      font-style: italic;
    }

    #word {
      font-family: monospace;
      font-size: 2em;
      letter-spacing: 0.5em;
      margin: 20px 0;
    }

    .input-group {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
      margin-top: 20px;
    }

    input#guess {
      font-size: 1.2em;
      width: 60px;
      padding: 10px;
      text-align: center;
      border: 1px solid #ccc;
      border-radius: var(--radius);
      outline: none;
      transition: all 0.2s ease;
    }

    input#guess:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 2px rgba(154, 150, 181, 0.2);
    }

    button {
      padding: 10px 20px;
      font-size: 1em;
      font-weight: 600;
      color: #fff;
      background-color: var(--primary);
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
      transition: background-color 0.2s ease;
    }

    button:hover {
      background-color: #574b90;
    }

    button:disabled {
      background-color: #ccc;
      cursor: not-allowed;
    }

    #status {
      font-size: 1em;
      margin-top: 20px;
      font-weight: 500;
      min-height: 1.5em;
    }

    .status-success { color: var(--success); }
    .status-danger { color: var(--danger); }
    .status-info { color: var(--primary); }
    .status-win { color: var(--success); }
    .status-lose { color: var(--danger); }

    #guessed-letters-container {
      margin-top: 10px;
      font-size: 0.95em;
      color: var(--muted);
    }

    #guessedLetters {
      font-family: monospace;
      font-weight: bold;
      color: var(--text);
    }

    #newGameButton {
      margin-top: 25px;
      background-color: var(--success);
    }

    #newGameButton:hover {
      background-color: #019875;
    }
  
  /*<!-- Sudoku -->*/
  
      .sudoku-board { display: grid; grid-template-columns: repeat(9, 40px); grid-template-rows: repeat(9, 40px); gap: 2px; margin: 20px auto; }
      .cell { border: 1px solid #999; text-align: center; font-size: 1.2rem; font-weight: bold; background: #ecf0f1; }
      .cell input { width: 100%; height: 100%; border: none; text-align: center; font-size: 1.2rem; background: none; }
      .cell input:focus { outline: 2px solid #74b9ff; background: #dfe6e9; }
      .cell:nth-child(3n+1) { border-left: 2px solid black; }
      .cell:nth-child(n+19):nth-child(-n+27), .cell:nth-child(n+46):nth-child(-n+54) { border-top: 2px solid black; }
      #newGameBtn { margin-top: 15px; padding: 10px 20px; border: none; border-radius: 8px; background: #82ccdd; font-size: 1rem; cursor: pointer; }
   
   /*<!-- Memory -->

     Global Styles */

    body {
      
      color: var(--text-color);
      
    }

    /* Mobile responsive fixes */
    @media (max-width: 1000px) {
      body {
        padding-top: 55px;
      }
    }

    @media (max-width: 450px) {
      body {
        padding-top: 50px;
      }
    }

    h1 {
      font-size: 2.2em;
      color: var(--main-color);
      margin-bottom: 25px;
      font-weight: 700;
    }

    .game-info {
      display: flex;
      justify-content: space-around;
      width: 100%;
      max-width: 500px;
      margin-bottom: 20px;
      padding: 10px 0;
      background-color: var(--card-front-color);
      border-radius: var(--border-radius);
      box-shadow: 0 2px 8px var(--shadow);
      font-size: 1em;
      font-weight: 700;
      color: var(--main-color);
    }

    .controls {
      margin-bottom: 25px;
      display: flex;
      gap: 15px;
      align-items: center;
    }

    select,
    button {
      padding: 10px 20px;
      font-size: 0.95em;
      border: none;
      border-radius: var(--border-radius);
      cursor: pointer;
      box-shadow: 0 2px 5px var(--shadow);
      transition: background-color 0.2s ease;
    }

    select {
      background-color: var(--card-front-color);
      border: 1px solid #ddd;
      appearance: none;
      background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13.2-6.5H18.5c-4.1%200-7.9%201.5-10.9%204.5-3%203-4.6%206.8-4.6%2011.1%200%204.2%201.6%208%204.6%2011l128.8%20128.9c3%203%206.8%204.6%2011%204.6s8-.5%2011-4.6l128.7-128.9c3.1-3.1%204.7-6.9%204.7-11.1%200-4.2-1.6-8-4.6-11z%22%2F%3E%3C%2Fsvg%3E');
      background-repeat: no-repeat;
      background-position: right 10px center;
      background-size: 10px auto;
      min-width: 130px;
    }

    button {
      background-color: var(--main-color);
      color: white;
      font-weight: 700;
    }

    button:hover {
      background-color: #0056b3;
    }

    button:disabled {
      background-color: #ccc;
      cursor: not-allowed;
      box-shadow: none;
    }

    /* Grid & Card Styles */
    .grid-container {
      display: grid;
      gap: 12px;
      width: fit-content;
      margin: 0 auto;
      padding: 20px;
      background-color: var(--card-front-color);
      border-radius: var(--border-radius);
      box-shadow: 0 5px 20px var(--shadow);
      border: 1px solid #eee;
    }

    .card {
      width: 80px;
      height: 80px;
      perspective: 1000px;
      cursor: pointer;
    }

    .card-inner {
      width: 100%;
      height: 100%;
      position: relative;
      transform-style: preserve-3d;
      transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
      border-radius: var(--border-radius);
      box-shadow: 0 2px 5px var(--shadow);
    }

    .card.flipped .card-inner {
      transform: rotateY(180deg);
    }

    .card-face {
      position: absolute;
      width: 100%;
      height: 100%;
      backface-visibility: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.2em;
      font-weight: bold;
      border-radius: var(--border-radius);
      user-select: none;
    }

    .card-front {
      background-color: var(--card-front-color);
      color: var(--text-color);
      transform: rotateY(180deg);
    }

    /* Icon color */
    .card-back {
      background-color: var(--card-back-color);
      color: white;
    }

    /* Back of the card */

    /* Card States */
    .card.matched .card-inner {
      background-color: var(--matched-color);
      box-shadow: 0 0 10px var(--matched-color);
    }

    .card.matched .card-front,
    .card.matched .card-back {
      background-color: var(--matched-color);
      color: white;
    }

    .card.matched {
      cursor: default;
      pointer-events: none;
    }

    .card.wrong .card-inner {
      background-color: var(--error-color);
      box-shadow: 0 0 10px var(--error-color);
    }

    .card.wrong .card-front,
    .card.wrong .card-back {
      background-color: var(--error-color);
      color: white;
    }

    /* Messages & Modal */
    #game-message {
      margin-top: 20px;
      font-size: 1.1em;
      font-weight: 700;
      color: var(--main-color);
      min-height: 1.5em;
    }

    #game-over-modal {
      display: none;
      position: fixed;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.7);
      justify-content: center;
      align-items: center;
      z-index: 100;
    }

    .modal-content {
      background-color: white;
      padding: 30px;
      border-radius: var(--border-radius);
      box-shadow: 0 5px 15px var(--shadow);
      text-align: center;
      max-width: 90%;
    }

    .modal-content h2 {
      font-size: 1.8em;
      color: var(--main-color);
      margin-bottom: 15px;
    }

    .modal-content p {
      font-size: 1em;
      margin-bottom: 25px;
      line-height: 1.4;
    }

    .modal-content button {
      background-color: var(--main-color);
      color: white;
      padding: 10px 25px;
      font-weight: 700;
    }

    .modal-content button:hover {
      background-color: #0056b3;
    }

    /* Media Queries */
    @media (max-width: 768px) {
      h1 {
        font-size: 2em;
      }

      .card {
        width: 70px;
        height: 70px;
        font-size: 2em;
      }

      .game-info {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px;
      }

      .game-info div {
        flex-basis: 45%;
      }

      .controls {
        flex-direction: column;
        gap: 8px;
      }

      select,
      button {
        width: 100%;
        max-width: 200px;
      }
    }

    @media (max-width: 480px) {
      h1 {
        font-size: 1.5em;
      }

      .card {
        width: 55px;
        height: 55px;
        font-size: 1.5em;
      }

      .grid-container {
        padding: 5px;
        gap: 5px;
      }

      select,
      button {
        padding: 8px 10px;
        font-size: 0.85em;
      }

      .modal-content {
        padding: 20px;
      }
    }
  
/*  <!-- colour recall CSS -->*/
   
       
    .container { padding-top: 60px; }
    @media (max-width: 1000px) { .container { padding-top: 55px; } }
    @media (max-width: 450px) { .container { padding-top: 50px; } }
    .color-board { display: grid; grid-template-columns: repeat(2, 100px); grid-template-rows: repeat(2, 100px); gap: 20px; margin: 20px auto; }
    .color-btn { width: 100px; height: 100px; border-radius: 15px; cursor: pointer; opacity: 0.7; transition: opacity 0.2s, transform 0.2s; }
    .color-btn:active { opacity: 1; transform: scale(1.1); }
    #red { background-color: red; } #green { background-color: green; } #blue { background-color: blue; } #yellow { background-color: yellow; }

    button { margin-top: 15px; padding: 10px 20px; border: none; border-radius: 8px; background: #82ccdd; font-size: 1rem; cursor: pointer; }

    #level { margin-top: 15px; font-size: 1.2rem; font-weight: bold; color: #ffffff; }

    h2 { color: #2c3e50; }
   
  /* <!-- Guess the output CSS -->*/
    
        .question { margin-top: 20px; background-color: #1a1f3a; padding: 15px; border-radius: 10px; }
        .options button { display: block; width: 100%; margin: 5px 0;  background-color: #82ccdd; border: none; cursor: pointer; color: black; }
        .options button:hover { background-color: #6bb7c9; }
        #guess-output-score { margin-top: 20px; font-size: 1.2rem; }
        #language{color:black; background-color: white;}
    
    /*<!-- lock logic CSS -->*/
     
        .lock { display: flex; gap: 20px; justify-content: center; margin: 20px 0; }
        .dial { width: 60px; height: 80px; background: #fff; border: 3px solid #333; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 2rem; cursor: pointer; user-select: none; color: #000; }
        .clues { margin-top: 20px; font-size: 1.1rem; text-align: left; color: #fff; }
        .clues ul { padding-left: 20px; }
        .success { color: #4ade80; font-weight: bold; margin-top: 15px; }
    /*
     <!-- Quiz CSS -->
    
    /* Mobile responsive fixes */
    @media (max-width: 1000px) {
      .container {
        padding-top: 55px;
      }
    }

    @media (max-width: 450px) {
      .container {
        padding-top: 50px;
      }
    }

    h2 {
      color: #2c3e50;
    }

    .quiz-box {
      background: #926f57;
      border-radius: 15px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.1);
      padding: 30px;
      max-width: 600px;
      margin: 0 auto;
      transition: 0.3s;
    }

    .quiz-question {
      font-size: 1.3rem;
      margin: 20px 0;
      color: #34495e;
    }

    .quiz-options button {
      display: block;
      width: 100%;
      padding: 12px;
      margin: 10px 0;
      border: none;
      border-radius: 8px;
      background: #d1eaff;
      font-size: 1rem;
      transition: 0.2s;
      cursor: pointer;
    }

    .quiz-options button:hover {
      background: #9ad5ff;
    }

    .quiz-result {
      font-size: 1.1rem;
      margin-top: 10px;
    }

    .quiz-quote {
      font-style: italic;
      color: #555;
      margin-top: 15px;
    }

    .progress {
      margin: 15px 0;
      height: 10px;
      width: 100%;
      background: #eee;
      border-radius: 5px;
      overflow: hidden;
    }

    .progress-bar {
      height: 10px;
      background: #7ed6df;
      width: 0%;
      transition: width 0.4s;
    }

    .quiz-score {
      font-size: 1rem;
      margin: 10px 0;
    }

    #quiz-restart {
      margin-top: 20px;
      padding: 10px 20px;
      font-size: 1rem;
      border: none;
      border-radius: 8px;
      background: #82ccdd;
      cursor: pointer;
    }
  
/*  <!-- Sliding Tile CSS -->*/
  
    .puzzle-box { background-color: #2d3436; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); padding: 30px; max-width: 400px; margin: 0 auto; }
    .puzzle-board { display: grid; grid-template-columns: repeat(3, 100px); grid-template-rows: repeat(3, 100px); gap: 8px; margin: 20px auto; }
    .tile { display: flex; justify-content: center; align-items: center; background-color: #74b9ff; border-radius: 8px; font-size: 1.5rem; cursor: pointer; font-weight: bold; }
    .tile.empty { background: #eee; cursor: default; }
    #status { margin-top: 10px; font-size: 1.1rem; font-weight: bold; }
  
/*  <!-- Typing Speed CSS -->*/
  
       @media (max-width: 450px) {
      .container {
        padding-top: 50px;
      }
    }

    .sentence {
      padding: 1rem;
      margin-bottom: 1rem;
      font-size: 1.2rem;
      background: #fff;
      border-radius: 10px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      line-height: 2rem;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
    }

    .char {
      padding: 2px 3px;
      border-bottom: 2px dotted #ccc;
    }

    .correct {
      color: green;
      font-weight: bold;
    }

    .incorrect {
      color: red;
      font-weight: bold;
    }

    input {
      width: 100%;
      padding: 10px;
      font-size: 1rem;
      margin-bottom: 20px;
    }

    .stats {
      font-size: 1.1rem;
      margin-bottom: 10px;
    }

    .btn {
      background: #4a2900;
      color: white;
      padding: 10px 20px;
      border: none;
      border-radius: 8px;
      font-size: 1rem;
      cursor: pointer;
    }

    .btn:hover {
       background-color: var(--accent-color-dark);}
  

