html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
}

* {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #222;
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to right, #e0eafc, #cfdef3);
    padding: 0;
}

#homepage-favicon {
    margin-bottom: -1.5rem;
}

/* ===== LINK ===== */
a {
    text-decoration: none;
    color: #0080ff;
}

a:hover {
    background-color: lightblue;
}

/* ===== HEADER ===== */
header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

h1 {
    font-size: 2.5rem;
}

/* ===== TITLE ===== */
h2 {
    font-size: 2.2rem;
    color: #0080ff;
    padding-left: 2rem;
}

.title {
    color: black;
}

.colour_theme {
    color: #0080ff;
}

.introducer-text {
    font-size: 1.2rem;
}

#attempted-or-correct {
    font-size: 1.2rem;
}

/* ===== MAIN CONTAINER ===== */
#container-homepage {
    text-align: center;
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

/* main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    width: 100%;
} */

/* ===== FORM (CENTRED + BIGGER) ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: stretch;

    width: 100%;
}

/* ===== LABELS ===== */
label {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #333;
}

/* ===== INPUTS (BIGGER + MODERN) ===== */
input[type="number"],
#startSurahDropdown,
#endSurahDropdown {
    width: 100%;
    padding: 0.5rem;
    font-size: 1.1rem;

    border: 1px solid #ddd;
    border-radius: 8px;

    transition: 0.25s ease;
    background: white;
}

#myDropdown,
#userInput {
    padding: 0.2rem;
    font-size: 1rem;

    border: 1px solid #ddd;
    border-radius: 8px;

    transition: 0.25s ease;
    background: white;
}

input[type="number"]:focus,
#userInput:focus,
#myDropdown:focus,
#startSurahDropdown:focus,
#endSurahDropdown:focus {
    border-color: #0080ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,128,255,0.15);
}

/* ===== BUTTONS (MODERN MINIMAL) ===== */
button {
    padding: 12px 18px;
    font-size: 1.05rem;
    border: none;
    border-radius: 8px;

    cursor: pointer;
    transition: 0.3s ease;

    background-color: #0080ff;
    color: white;
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

/* ===== OUTPUT ===== */
#output {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ===== SURAH TEXT ===== */
.surah {
    font-size: 1.2rem;
    color: green;
    margin-top: -1.5rem;
}

/* ===== AUTOCOMPLETE ===== */
.autocomplete-results {
    position: absolute;

    background: white;
    border: 1px solid #ccc;

    width: 20rem;
    max-height: 200px;

    overflow-y: auto;
    display: none;

    z-index: 9999;

    border-radius: 6px;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
}

.autocomplete-wrapper {
    position: relative;
    display: inline-block; /* keeps it tight around the button */
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #e6f0ff;
}

/* ===== FLASH MESSAGE ===== */
.flash-message {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: opacity 1s ease-out;
}

footer {
    width: 100%;
    margin-top: auto;
    padding: 1rem 2rem;
    text-align: center;
}

#toggle-mode {
    width: 100%;
    padding: 0.5rem;
    font-size: 1.1rem;

    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;

    transition: 0.25s ease;
    cursor: pointer;

    appearance: none;
}

#toggle-mode:focus {
    border-color: #0080ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,128,255,0.15);
}



/* Container Styling */
#container {
    position: relative;
    text-align: center;

    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    width: 90%;
    /* max-width: 700px; */

    margin: 0 auto;

    max-height: 70vh;

    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;

    flex-shrink: 1;
}

.help-container {
    background-color: #b4d0f7;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    width: 70%;
    margin: 0 auto; /* horizontally center */
    line-height: 1.6;
    /* text-align: justify; */
}

.about-container {
    background-color: #b4d0f7;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    /* max-width: 650px; */
    width: 60%;
    margin: 0 auto; /* horizontally center */
    line-height: 1.6;
    text-align: justify;
}

.about-container p {
    margin: 0.8em 0;
    font-size: 1.1rem;
}

.about-container .title {
    font-size: 1.6em;
    font-weight: bold;
    color: #2a7ae2;
}
.about-container .subtitle {
    font-size: 1.3em;
    font-weight: bold;
    color: #1c4f91;
    margin-top: 1em;
}
.about-container .highlight {
    font-size: 1.1em;
    font-weight: bold;
    color: #2a7ae2;
}

nav {
    font-size: 1.5rem;
}



/* Basic Styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  /* background-color: #333; */
  color: white;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-menu a {
  /* color: white; */
  text-decoration: none;
}

/* Hamburger Styling */
.hamburger {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  cursor: pointer;
  background: transparent;
  border: none;
  gap: 5px;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: #0080ff;
  transition: 0.3s;
}

.hamburger.is-active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


@media (max-width: 1200px) {
    .hamburger {
        display: flex;
        margin-right: -2.5rem;
    }

    .nav-menu {
        position: fixed;
        padding: 1rem;
        left: -100%; /* Hide menu off-screen */
        top: 60px;
        flex-direction: column;
        background-color: whitesmoke;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        z-index: 999;
        /* padding: 20px 0; */
    }

    .nav-menu.active {
        left: 0; /* Slide menu in */
    }



    #homepage-favicon {
        display: none;
    }

    #container-homepage {
        width: 80%;
        padding: 1.5rem;
    }

    .help-container {
        width: 90%;
    }

    .about-container {
        width: 90%;
        text-align: center;
    }

    #toggle-mode {
        padding-bottom: 1rem;
        margin-bottom: -2rem;
    }

    #container {
        width: 80%;
    }

    #output {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        padding-left: 2rem;
        font-size: 1.8rem;
    }
}
