/* body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9fafc; 
  } */
  
#hero h1 {
    font-size: 3em;
    font-weight: bold;
    font-family:  'Segoe UI';
}

/* .logo img {
    max-width: 27px; /* Resize logo 
    height: auto; /* Maintain aspect ratio  
}*/

.card-img-fixed {
    object-fit: cover;
    width: 100%;
    height: 100%;
    max-height: 200px;
}

/* General Section Styling */
section {
    margin: 0; /* Remove any default margin between sections */
    padding: 0; /* Remove padding around each section */
}

.cipher-header {
    padding: 40px 20px;
    /* background-color: #f9fafc; */
    border-bottom: 1px solid #171717;
  }
  
  .cipher-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 600;
    color: #1c2b36;
    margin-bottom: 10px;
  }
  
  .cipher-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: #4a4a4a;
    margin-bottom: 0;
  }
  
/* Centering the content within the containers  */
 .container {
    text-align: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* cipher principle */
  .cipher-section-title {
    font-size: 2rem;
    color: #007acc;
    margin-bottom: 20px;
  }
  
  .cipher-highlight {
    color: #e67e22;
    font-weight: bold;
  }
  
  .cipher-box-section {
    background: #f9f9f9;
    border-left: 5px solid #1b1b1c;
    padding: 20px 25px;
    margin-top: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  
  .cipher-formula {
    background: #171717;
    color: #fff;
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
    font-size: 1rem;
  }

  .cipher-table {
    width: 100%;
    text-align: center;
    border-collapse: collapse;
    font-family: monospace;
    margin: 20px 0;
  }

  .cipher-table th {
    background-color: #007bff;
    color: white;
    padding: 10px;
    font-size: 16px;
  }

  .cipher-table td {
    background-color: #2c2c3e;
    color: #00d9ff;
    padding: 10px;
    border: 1px solid #444;
    font-weight: bold;
    font-size: 18px;
    width: 30px;
  }

  .cipher-label {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    padding: 10px;
    text-align: right;
    white-space: nowrap;
  }

  
  .cipher-did-you-know {
    background-color: #fff3cd;
    border-left: 5px solid #f39c12;
    padding: 15px 20px;
    margin-top: 40px;
    border-radius: 10px;
    font-size: 1rem;
    color: #1c2b36;
    line-height: 1.6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }
  
  
  /* step by step guidance */
  .guidance-box {
    background-color: #f4f9ff;
    border-left: 5px solid #007acc;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  }
  
  .cipher-example {
    background-color: #1f1f1f;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    margin-top: 20px;
    white-space: pre-line;
    font-size: 1.2rem;
  }


/* Section Styling */
 .section {
    background: #2a2a40;
    margin: 30px auto;
    padding: 30px;
    border-radius: 16px;
    max-width: 950px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: #00aaff;
} 

/* Game Mode Section */
/* #game-section h2 {
    font-size: 2em;
    color: #00aaff;
    margin-bottom: 20px;
} */

.game-section p {
    color: #fff;
    text-align: center;
  }
  

/* Buttons */
.options button, .btn-option, .quiz-box button, .game-box button {
    padding: 10px 15px;
    margin: 5px;
    font-size: 18px;
    cursor: pointer;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 5px;
    transition: transform 0.2s, background-color 0.2s;
}

.options button:hover, .btn-option:hover, .quiz-box button:hover, .game-box button:hover {
    background-color: #00aaff;
    transform: scale(1.1);
}

/* Input Fields */
input[type="text"], input[type="number"] {
    padding: 8px;
    font-size: 16px;
    margin: 10px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}

input[type="number"] {
    width: 50px;
}

input[type="range"] {
    vertical-align: middle;
}

/* Slider Group */
.slider-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

/* Tables */
table {
    margin: auto;
    text-align: center;
    border-collapse: collapse;
    border: 1px solid #555;
    width: 100%;
    max-width: 100%;
}

th, td {
    border: 1px solid #555;
}

th {
    background-color: #007acc;
    color: white;
    font-weight: bold;
    padding: 12px;
    width: 160px;
}

td.row-cell {
    padding: 0;
}

/* Letter Grid (alphabet preview) */

.letter-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.letter-box {
    width: 25px;
    height: 25px;
    line-height: 25px;
    margin: 1px;
    border: 1px solid #555;
    background-color: #333;
    font-weight: bold;
    color: #00ccff;
    text-align: center;
    transition: background-color 0.3s, transform 0.2s;
}

.letter-box:hover,
.letter-box.match {
    background-color: #879999;
    transform: scale(1.1);
    cursor: pointer;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #2e2e3e;
    color: #f5f6fa;
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    animation: fadeIn 0.3s ease-in-out;
    max-width: 400px;
}

.modal-content button {
    margin-top: 15px;
    padding: 8px 20px;
    background: #00aaff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.modal-content button:hover {
    background: #00ccff;
}

/* Tooltip Styling */
.form-group label[title] {
    position: relative;
    cursor: help;
}

.form-group label[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 130%;
    left: 0;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10;
    opacity: 1;
    pointer-events: none;
}

  .layout-wrapper {
    display: flex;
    min-height: 100vh;
    /* background: #f9fafc; */
  }
  
  .sidebar-nav {
    width: 260px;
    background: #202942;
    color: #fff;
    padding: 30px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
  }
  
  .sidebar-nav h2 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 25px;
  }
  
  .sidebar-nav ul {
    list-style: none;
    padding: 0;
  }
  
  .sidebar-nav ul li {
    margin: 15px 0;
  }
  
  .sidebar-nav a {
    color: #cfd8e2;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.3s;
  }
  
  .sidebar-nav a:hover,
  .sidebar-nav a.active {
    background: #007acc;
    color: #fff;
  }
  
  .main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
  }
  
  
  .cipher-wrapper {
    padding: 60px 20px;
    background: #f5f7fa;
  }
  

  .cipher-section {
    background: #fff;
    padding: 50px 60px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    margin: 40px auto;
    line-height: 1.8;
    font-size: 1.1rem;
    column-count: initial !important;
    column-width: auto !important;
    display: block !important;
  }

  #historical-background.cipher-section {
    width: 100%;
    max-width: 100%;
    padding: 50px 60px;
    margin: 40px auto;
    display: block;
  }
  
  .cipher-section h1 {
    font-size: 2rem;
    color: #007acc;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  
  .cipher-section h2 {
    color: #007acc;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
  }

  #learn-and-play.caesar-section h2,h3 {
    color: #007acc;
    margin-bottom: 20px;
    text-align: center;
  }

  .cipher-section h3 {
    color: #007acc;
    margin-bottom: 20px;
    text-align: left;
  }

  
  #learn-and-play.caesar-section p {
    color: #f6f7f8;
    margin-bottom: 20px;
    text-align: center;
  }
 
  .cipher-section p {
    column-count: initial !important;
    column-width: auto !important;
    max-width: 100%;
    display: block;
    text-align: left;
  }

  
  .cipher-highlight {
    color: #e67e22;
    font-weight: bold;
  }
  
  .cipher-quote {
    font-style: italic;
    text-align: center;
    color: #777;
    margin: 30px 0;
  }
  
  /* .cipher-fun-fact {
    background: #fff3cd;
    padding: 16px 20px;
    border-left: 5px solid #f39c12;
    border-radius: 8px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); 
  } */

  .cipher-fun-fact {
    background: #fff3cd;
    padding: 16px 20px;
    border-left: 5px solid #f39c12;
    border-radius: 8px;
    margin-top: 25px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); 
    /* flex-wrap: wrap; */
  }
  
  
  /* .cipher-box {
    background: #5d4037;
    color: #fff;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 10px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
  } */
  
  .cipher-section ul {
    padding-left: 20px;
    margin-top: 10px;
  }
  
 /* vigenere quiz */
#quiz-container {
    text-align: center;
    padding: 20px;
}

#quiz-options {
    margin-top: 20px;
    display: block;
}

.quiz-option {
    background-color: #4CAF50;
    color: rgb(17, 17, 17);
    padding: 10px 20px;
    margin: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    
}

.quiz-option:hover {
    background-color: #45a049;
}

#quiz-feedback {
    font-size: 20px;
    margin-top: 20px;
    font-weight: bold;
}

#quiz-progress {
    font-size: 16px;
    margin-top: 20px;
}

/* playfair grid */
    .matrix {
      display: grid;
      grid-template-columns: repeat(5, 60px);
      grid-template-rows: repeat(5, 60px);
      gap: 5px;
      /* background-color: #22223b; */
      padding: 10px;
      width: max-content;
    }
    .cell {
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #22223b;
      font-weight: bold;
      font-size: 20px;
      width: 60px;
      height: 60px;
      color: #007acc;
    }

    .keyword {
    color:  #f39c12; 
    font-weight: bold;
  }
  
  



