/* ---------------------------
   1. LOCAL FONT IMPORT
   --------------------------- */

   @font-face {
    font-family: 'Al-Jazeera';
    src: url('aljazeera.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
  }
  
  /* Local font definitions */
  @font-face {
    font-family: 'Orbitron';
    src: url('Orbitron-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Orbitron';
    src: url('Orbitron-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Roboto';
    src: url('Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Roboto';
    src: url('Roboto-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Roboto Mono';
    src: url('RobotoMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Roboto Mono';
    src: url('RobotoMono-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Poppins';
    src: url('Poppins-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Poppins';
    src: url('Poppins-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
  }
  
  /* 
    Color Palette:
    Gradient: #A89FBA → #CFCCD7 → #ECEBEF
    Header/Footer: #262626
    Wireframe boxes: #000000 (black)
    Accents & Text: #F2D194, #F2B66D, #A66832, #F2F2F2
  */
  
  /* Root Variables */
  :root {
    --grad1:    #A89FBA;
    --grad2:    #CFCCD7;
    --grad3:    #ECEBEF;
    --dark-gray: #262626;
    --black:    #000000;
    --gold1:    #F2D194;
    --gold2:    #F2B66D;
    --brown:    #A66832;
    --off-white:#F2F2F2;
  }
  
  /* Base Reset & Body Background */
  *, *::before, *::after {
    box-sizing: border-box;
  }
  html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    /* Gradient Background */
    background: linear-gradient(135deg, var(--grad1), var(--grad2), var(--grad3));
    color: var(--off-white);
    overflow-x: hidden;
    position: relative;
    z-index: 0;
  }
  
  /* Pseudo-element for the background image */
  body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('sandooq_pass_background_removed.png') no-repeat center center;
    background-size: auto;
    opacity: 1;
    pointer-events: none;
    z-index: -1;
  }
  
  /* Layout wrapper (removed min-height to avoid extra vertical space) */
  .wrapper {
    display: flex;
    flex-direction: column;
  }
  
  /* Fixed HEADER - centered, matching your design */
  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--dark-gray);
    padding: 10px 20px;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    font-family: 'Orbitron', sans-serif;
    height: 75px;
    border-radius: 10px;
    border: 1px solid var(--off-white);
  }
  
  /* Ensure content isn’t hidden under the fixed header */
  body {
    padding-top: 75px; /* Match header height */
  }
  
  /* LOGO & BRAND */
  .logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .logo-image {
    height: 140px;
    width: auto;
  }
  .brand-name {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--off-white);
  }
  
  /* DROPDOWN CONTAINERS */
  .dropdown-container {
    position: relative;
    margin-left: 15px;
  }
  .dropdown-btn {
    display: flex;
    align-items: center;
    background: var(--gold1);
    color: var(--brown);
    border: 2px solid var(--brown);
    padding: 6px 12px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    font-family: 'Orbitron', sans-serif;
  }
  .dropdown-btn:hover {
    background: var(--gold2);
  }
  .dropdown-icon {
    width: 14px;
    height: 14px;
    margin-left: 10px;
  }
  .dropdown-menu {
    position: absolute;
    top: 40px;
    right: 0;
    background: var(--gold1);
    border: 2px solid var(--brown);
    border-radius: 6px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(166,104,50,0.2);
  }
  .dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .dropdown-menu ul li {
    padding: 10px;
  }
  .dropdown-menu ul li a {
    display: block;
    color: var(--brown);
    text-decoration: none;
    padding: 8px;
    transition: background 0.3s ease-in-out;
    font-family: 'Poppins', sans-serif;
  }
  .dropdown-menu ul li a:hover {
    background: var(--gold2);
  }
  .dropdown-container:hover .dropdown-menu {
    display: block;
  }
  
  /* ADDED: Show the menu when .open class is added (for mobile click/tap) */
  .dropdown-container.open .dropdown-menu {  
    display: block;
  }
  
  /* MAIN CONTAINER (Wireframe Boxes) */
  .container {
    display: flex;
    gap: 30px;
    padding: 10px;
    max-width: 1200px;
    width: 100%;
    margin: auto;
  }
  
  /* BOXES - Black background, off-white text */
  .box {
    flex: 1;
    background: var(--black);
    color: var(--off-white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px #000;
    width: 100%;
    min-height: 200px;
    font-family: 'Poppins', sans-serif;
  }
  
  /* Responsive: Stack boxes vertically on smaller screens */
  @media (max-width: 768px) {
    .container {
      flex-direction: column;
    }
  }
  
  /* HEADLINE & SUBHEADLINE in Info Box */
  #headline {
    font-size: 35px;
    margin: 0 0 10px;
    font-family: 'Roboto', sans-serif;
  }
  #subheadline {
    font-size: 25px;
    margin: 0;
    font-family: 'Roboto', sans-serif;
  }
  
  /* Use the custom Al-Jazeera font for Arabic headlines */
  html[lang="ar"] #headline,
  html[lang="ar"] #subheadline {
    font-family: 'Al-Jazeera', sans-serif;
  }
  
  /* SLIDER & NUMBER INPUT */
  .slider-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0;
  }
  #length-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--gold2);
    border-radius: 3px;
    outline: none;
    transition: 0.3s;
  }
  #length-slider:hover {
    background: var(--gold1);
  }
  #length-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--brown);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0px 0px 4px var(--brown);
  }
  #length-input {
    width: 60px;
    text-align: center;
    font-size: 16px;
    background: var(--gold1);
    color: var(--brown);
    border: 2px solid var(--brown);
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    -moz-appearance: textfield;
  }
  #length-input::-webkit-inner-spin-button,
  #length-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
  }
  
  /* PASSWORD DISPLAY BOX - auto-expanding vertically */
  #password-box {
    width: 100%;
    min-height: 100px;
    background: var(--dark-gray);
    color: var(--off-white);
    border: 2px solid var(--black);
    padding: 10px;
    font-size: 20px;
    font-family: 'Roboto Mono', monospace;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    user-select: all;
    overflow: visible;
  }
  
  /* Highlight numbers in password */
  #password-display .number {
    color: var(--gold1);
    font-weight: bold;
  }
  
  /* BUTTON CONTAINER - aligns with password box edges */
  .button-container {
    display: flex;
    width: 100%;
    gap: 15px;
    margin-top: 15px;
  }
  .cyber-button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    border: 2px solid var(--brown);
    cursor: pointer;
    background: linear-gradient(92.83deg, var(--gold1) 0%, var(--gold2) 100%);
    color: var(--brown);
    box-shadow: 2px 2px 5px #000;
    transition: 0.2s ease-in-out;
    font-family: 'Orbitron', sans-serif;
  }
  .cyber-button:hover {
    background: var(--gold2);
  }
  .cyber-button:active {
    background: var(--brown);
    color: var(--off-white);
  }
  @media (max-width: 600px) {
    .button-container {
      flex-direction: column;
    }
  }
  
  /* CRACKING TIME DISPLAY */
  .crack-time-section {
    margin-top: 20px;
    width: 100%;
  }
  
  .crack-time-section h3 {
    color: var(--gold1);
    font-size: 18px;
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
  }
  
  #crack-time-box {
    background: var(--dark-gray);
    border: 2px solid var(--brown);
    border-radius: 8px;
    padding: 15px;
    font-family: 'Roboto Mono', monospace;
  }
  
  .crack-time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: var(--off-white);
  }
  
  #crack-time-display {
    color: var(--gold2);
    font-weight: bold;
  }
  
  /* CUSTOM FOOTER - Matching header dimensions and style */
  .custom-footer {
    background: var(--dark-gray);
    border-radius: 10px;
    border: 1px solid var(--off-white);
    width: 90%;
    max-width: 1200px;
    height: 75px;
    margin: 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
  }
  
  .footer-text {
    font-size: 14px;
    color: var(--off-white);
    font-family: 'Orbitron', sans-serif;
  }
  
  /* Adjust main content area to prevent extra scrolling */
  main {
    flex: 1;
    min-height: calc(100vh - 150px); /* 75px header + 75px footer = 150px total */
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  /* FONT RULES for non-Arabic vs Arabic */
  html:not([lang="ar"]) .strait-regular {
    font-family: "Strait", sans-serif;
  }
  html[lang="ar"] .strait-regular {
    font-family: "Al-Jazeera", sans-serif;
  }
  
  /* Additional CSS for mobile responsiveness of the language button */
  @media (max-width: 600px) {
    header {
      padding: 5px 10px;
      height: 75px;
    }
  
    .dropdown-container {
      margin-left: 0;
      flex-shrink: 1;
      overflow: visible;
    }
  
    .dropdown-btn {
      padding: 4px 8px;
      font-size: 14px;
      max-width: 100%;
    }
    
    #headline {
      font-size: 20.6667px; /* 2/3 of 40px */
    }
    #subheadline {
      font-size: 18px; /* of 30px */
    }
    
    /* Adjust dropdown menu position if needed */
    .dropdown-menu {
      right: 10px;
      left: auto;
    }
  }
  