* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #2476e0;
    --secondary-color: #007ccf;
    --text-color: #333;
    --light-bg: #E6F2FF;
    --white: #ffffff;
    --black: #000000;
    --gray: #f5f5f5;
    --dark-gray: #777;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo img {
    width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

#menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

#menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 5px;
    transition: all 0.3s linear;
}

ul {
    list-style-type: circle;
}

nav ul {
    display: flex;
    list-style-type: none;
}

nav li a {
    color: var(--white);
    background-color: #177cff;
    font-weight: bold;
    margin: 0 0.5rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    transition: all 0.3s ease-in-out;
}

nav li a:hover {
    color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

/* #tool-interactive {
} */

/* Sidebar (hidden by default) */
.sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  height: 100%;
  background-color: var(--primary-color);
  transition: all 0.3s ease-in-out;
  z-index: 1000;
  padding: 2rem;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
  right: 0; /* Slide in */
}

.sidebar ul {
  display: flex;
  flex-direction: column;
  margin-top: 3rem;
}

.sidebar li {
  margin: 1rem 0;
}

/* Sidebar toggle (hamburger button) */
.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--primary-color);
  display: none; /* hidden on desktop */
}

/* Close button inside sidebar */
.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: white;
  position: absolute;
  top: 15px;
  right: 15px;
}

/* Responsive behavior */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: block; /* Show hamburger on mobile */
  }

  .sidebar nav {
    right: 0; /* Sidebar is visible on mobile */
  }

  .sidebar nav ul {
    display: flex; /* Sidebar menu stays visible */
  }
}

#dark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  display: none;
  transition: opacity 0.3s ease-in-out;
  z-index: 900; /* must be below sidebar (z-index: 1000) */
}


/* Hero Section */
#hero {
    background-image: url("/Media Folder/BG-Img.png");
    background-size: cover;
    background-position: center;
    min-height: 80vh;
    width: 100%;
    display: flex;
}

li {
    list-style-position: inside;
}

/* BMI Hero Section */
#bmi-hero {
    background-image: url("/Media Folder/BMI-black-box.jpg");
    background-size: cover;
    background-position: center;
    min-height: 80vh;
    width: 100%;
    display: flex;
}

/* Word Counter Hero Section */
#word-count-hero {
    background-image: url("/Media Folder/Word-count-black-box.jpg");
    background-size: cover;
    background-position: center;
    min-height: 80vh;
    width: 100%;
    display: flex;
}

/* Length-Con Hero Section */
#length-con-hero {
    background-image: url("/Media Folder/Len-Con-black-box.jpg");
    background-size: cover;
    background-position: center;
    min-height: 80vh;
    width: 100%;
    display: flex;
}

/* Mass-Con Hero Section */
#mass-con-hero {
    background-image: url("/Media Folder/Mass-Con-black-box.jpg");
    background-size: cover;
    background-position: center;
    min-height: 80vh;
    width: 100%;
    display: flex;
}

/* Temp-Con Hero Section */
#temp-con-hero {
    background-image: url("/Media Folder/Temp-Con-black-box.jpg");
    background-size: cover;
    background-position: center;
    min-height: 80vh;
    width: 100%;
    display: flex;
}

/* ToDo list Hero Section */
#todo-hero {
    background-image: url("/Media Folder/ToDo-black-box.jpg");
    background-size: cover;
    background-position: center;
    min-height: 80vh;
    width: 100%;
    display: flex;
}

/* ToDo list Hero Section */
#todo-hero section {
    backdrop-filter: blur(5px);
}


.black-box {
    background-color: rgb(52 140 255 / 28%);
    color: var(--white);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.black-box p {
    margin-bottom: 35px;
}

.black-box section h1 {
    padding: 0;
}

.black-box section {
    padding: 2rem;
    max-width: 850px;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    text-align: center;
}

.bmi-black-box section {
    padding: 2rem;
    max-width: 850px;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    text-align: center;
}

/* Tools Section */
#tools-div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

#tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.see-more-tools {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 1rem;
}

.see-more-tools button {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-weight: bold;
}

.see-more-tools button:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.tool {
    display: flex;
    flex-direction: column;
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 15px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 7px 10px rgba(99, 99, 99, 0.3);
    height: 100%;
    min-width: 250px;
}

.tool:hover {
    box-shadow: 0 10px 15px rgba(34, 203, 255, 0.4);
    transform: translateY(-7px);
}

.tool-image-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
    background-color: rgba(204, 204, 204, 0.25);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    overflow: hidden;
}

.tool-image-placeholder img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.tool h3 {
    border-bottom: 2px dashed var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.Buttons {
    margin-top: auto;
}

.Buttons button {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    width: 100%;
    font-weight: bold;
}

.Buttons button:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}



/* About Us Section */
#About-Us {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image: url("/Media Folder/About-Us.png");
    background-size: cover;
    background-position: center -90px;
}

#About-Us .black-box {
    margin: 0;
    padding: 5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: rgb(0 34 78 / 39%);
}

#About-Us .black-box a {
    color: aqua;
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid aqua;
    border-radius: 30px;
    transition: all 0.3s ease;
}

#About-Us .black-box a:hover {
    background-color: aqua;
    color: var(--black);
    text-decoration: none;
}

/* Footer Styles */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-section {
    padding: 1rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: aqua;
    text-decoration: none;
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    background-color: #145fb6;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    #menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--primary-color);
        transition: all 0.3s ease-in-out;
        z-index: 1000;
        padding: 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        margin-top: 3rem;
    }
    
    nav li {
        margin: 1rem 0;
    }
    
    .black-box section {
        min-width: auto;
        margin: 1rem;
    }
    
    #tools-grid {
        grid-template-columns: 2fr;
    }

    #About-Us {
        background-position: 0 0;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }

    /* Extra responsive tweaks */
    .header-container, .footer-container {
        max-width: 100vw;
        padding: 0 0.5rem;
    }
    .tool {
        padding: 1rem;
    }
    .tool-image-placeholder img {
        max-width: 90vw;
        height: auto;
    }
    #About-Us .black-box {
        padding: 2rem 1rem;
    }
    .black-box section {
        padding: 1rem;
    }
    .logo img {
        width: 100px;
    }
    .Buttons button {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    h1, h2, h3 {
        word-break: break-word;
    }
    p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .header-container {
        padding: 0 0.5rem;
    }
    
    .logo img {
        width: 120px;
    }
    
    #hero {
        min-height: 60vh;
    }

    #About-Us {
        background-position: -90px 0;
    }
    /* More mobile tweaks */
    .tool {
        padding: 0.5rem;
    }
    .tool-image-placeholder img {
        max-width: 100vw;
        height: auto;
    }
    #About-Us .black-box {
        padding: 1rem 0.5rem;
    }
    .black-box section {
        padding: 0.5rem;
    }
    .footer-container {
        padding: 0 0.25rem;
    }
    .Buttons button {
        padding: 0.5rem 0.5rem;
        font-size: 0.9rem;
    }
    nav {
        padding: 1rem;
    }
    h1, h2, h3 {
        word-break: break-word;
    }
    p {
        font-size: 0.95rem;
    }
}

@media (max-width: 1102px) {
    #About-Us {
        background-position: center 0;
        transition: background-position 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (max-width: 915px) {
    #About-Us {
        background-position: center 0;
        transition: background-position 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (max-width: 360px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    .logo img {
        width: 100px;
    }
    
    #hero {
        min-height: 50vh;
    }

    #About-Us {
        background-position: -120px 0;
    }
    /* Further mobile tweaks */
    .tool {
        padding: 0.5rem;
    }
    .tool-image-placeholder img {
        max-width: 100vw;
        height: auto;
    }
    #About-Us .black-box {
        padding: 1rem 0.5rem;
    }
    .black-box section {
        padding: 0.5rem;
    }
    .footer-container {
        padding: 0 0.25rem;
    }
    .Buttons button {
        padding: 0.5rem 0.5rem;
        font-size: 0.9rem;
    }
    nav {
        padding: 1rem;
    }
    h1, h2, h3 {
        word-break: break-word;
    
}
    p {
        font-size: 0.9rem;
    }
}

/* Specific Styles for Word Counter Tool Page */
#text-input {
    width: 95%;
    height: 200px;
    max-height: 550px;
    padding: 1rem;
    border: 5.5px solid #b5d8f4;
    border-radius: 30px;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
    transition: all 0.3s ease-in-out;
}
#text-input:focus {
    outline: none;
    border-color: rgb(45, 213, 255);
    box-shadow: 0 0 10px rgb(45, 213, 255);
}
#word-counter-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
#tool-interactive {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 20px;
    max-width: 800px;
    height: auto;
    margin: 0 auto;
    padding: 1rem 1rem;
    background-color: #4F9CD4;
    border-radius: 30px;
    box-shadow: 0 7px 10px rgba(99, 99, 99, 0.3);
}

#tool-interactive h1 {
    font-size: 45px;
}

#tool-interactive h2 {
    font-size: 30px;
    margin-bottom: 1rem;
}

#tool-interactive p {
    font-size: 20px;
    margin-bottom: 0;
}

#count-display {
    width: 100%;
    text-align: center;
    margin-bottom: 0;
}

#word-letter-counter-btns {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
    align-items: center;
    justify-content: center;
}

#countBtn {
    background-color: var(--secondary-color);
    color: var(--white);
    width: 50%;
    font-size: 30px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-weight: bold;
}

#countBtn:hover {
    background-color: #0160dd;
    transform: scale(1.05);
}

#clearBtn {
    background-color: #FF3131;
    color: var(--white);
    width: 50%;
    font-size: 30px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-weight: bold;
}

#clearBtn:hover {
    background-color: #df0000;
    transform: scale(1.05);
}

/* Responsive tweaks for Word Counter Tool Page */
@media (max-width: 760px) {
    #text-input {
        width: 100%;
    }

    #tool-interactive {
        padding: 1rem;
    }

    #tool-interactive h1 {
        font-size: 2rem;
    }

    #tool-interactive h2 {
        font-size: 1.5rem;
    }

    #tool-interactive p {
        font-size: 1rem;
    }

    #count-display {
        font-size: 18px;
    }

    #word-letter-counter-btns {
        flex-direction: column;
        gap: 0.5rem;
    }

    #countBtn, #clearBtn {
        width: 100%;
        font-size: 1.25rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    #text-input {
        width: 100%;
        height: 120px;
        font-size: 0.9rem;
    }

    #tool-interactive {
        padding: 0.75rem;
        border-radius: 20px;
    }

    #tool-interactive h1 {
        font-size: 1.75rem;
    }

    #tool-interactive h2 {
        font-size: 1.25rem;
    }

    #countBtn, #clearBtn {
        font-size: 1.1rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 375px) {
    #word-count-hero .black-box {
        padding: 0;
    }

    #text-input {
        width: 100%;
        height: 100px;
        font-size: 0.85rem;
    }

    #tool-interactive {
        padding: 0.5rem;
        border-radius: 15px;
    }

    #tool-interactive h1 {
        font-size: 1.5rem;
    }

    #tool-interactive h2 {
        font-size: 1.1rem;
    }

    #countBtn, #clearBtn {
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
    }
    
}

#more-info {
    margin-top: 1rem;
    font-size: 18px;
    color: black;
    max-width: 1150px;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#more-info ul {
    list-style: disc;
    padding: 0;
}

/* Specific Styles for BMI Calculator Tool Page */

#bmi-calculator {
    display: flex;
    /* height: 500px; */
    gap: 0.5rem;
}

#bmi-calculator #tool-interactive {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 65%;
    border-radius: 30px;
}

#bmi-calculator #tool-interactive div {
    width: 100%;
    text-align: center;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#bmi-calculator #bmi-inputs input {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    width: 90%;
    border: 5.5px solid #b5d8f4;
    border-radius: 30px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease-in-out;
}

#bmi-calculator #bmi-inputs input:focus {
    outline: none;
    border-color: rgb(45, 213, 255);
    box-shadow: 0 0 10px rgb(45, 213, 255);
}

#bmi-calculator #bmi-inputs label {
    font-size: 20px;
    font-weight: bolder;
    margin-bottom: 0.5rem;
}

#bmi-calculator #calculateBtn {
    background-color: var(--secondary-color);
    color: var(--white);
    width: 80%;
    font-size: 30px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-weight: bold;
}

#bmi-calculator #calculateBtn:hover {
    background-color: #0160dd;
    transform: scale(1.05);
}

#bmi-calculator #img-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #F0FBFF;
    color: #4F9CD4;
    font-weight: bolder;
    font-size: 25px;
    width: 35%;
    gap: 1rem;
    padding: 15px;
    border-radius: 30px;
}

#bmi-calculator #img-section img {
    width: auto;
    height: 360px;
    border-radius: 15px;
    filter: drop-shadow(5px 14px 6px rgba(0, 0, 0, 0.3));
}

/* Responsive tweaks for BMI Calculator Tool Page */
@media (max-width: 480px) {
    #bmi-hero .black-box {
        padding: 0;
    }

    #bmi-calculator {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    #bmi-calculator #tool-interactive {
        width: 70%;
        padding: 1rem;
        border-radius: 20px;
    }

    #bmi-calculator #bmi-inputs input {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    #bmi-calculator #calculateBtn {
        width: 100%;
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }

    #bmi-calculator #img-section {
        width: 30%;
        font-size: 1.5rem;
        padding: 10px;
        border-radius: 20px;
    }

    #bmi-calculator #img-section img {
        height: auto;
        max-width: 100%;
    }
}

@media (max-width: 375px) {
    #bmi-calculator #calculateBtn {
        font-size: 1.25rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 375px) {
    #bmi-calculator #calculateBtn {
        font-size: 1.1rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Todo tool page styles */

#todo-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 20px;
    max-width: 800px;
    height: auto;
    margin: 0 auto;
    padding: 1rem 1rem;
    background-color: #4F9CD4;
    border-radius: 30px;
}

#todo-form {
    background-color: #E8F8FF;
    width: 100%;
    padding: 5px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#todo-form input {
    width: 90%;
    padding: 10px;
    border: 2px solid #A2A2A2;
    border-radius: 15px;
    font-size: 16px;
    transition: all 0.3s ease-in-out;
}

#add-todo-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    font-size: 20px;
    padding: 10px;
    width: 9%;
    height: 40px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-weight: bold;
}

#add-todo-btn:hover {
    background-color: #0160dd;
}

#tasks {
    width: 100%;
    background-color: #168fd4;
    border-radius: 15px;
    margin-top: 5px;
}

#tasks-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-bottom: 2px solid #A2A2A2;
    margin-bottom: 10px;
}

#tasks-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 50%;
}

#tasks-title h2 {
    margin: 0;
}

#task-actions {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

#clear-completed-btn, #clear-all-btn {
    background-color: #FF3131;
    color: var(--white);
    font-size: 16px;
    padding: 8px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-weight: bold;
}

#clear-completed-btn:hover, #clear-all-btn:hover {
    background-color: #df0000;
}

.task-item {
    background-color: #E8F8FF;
    padding: 5px;
    margin: 3.5px;
    border-radius: 15px;
    font-size: 18px;
    text-align: start;
    color: #464646;
    border-bottom: 1px solid #A2A2A2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-text {
    width: 90%;
}

.task-checkbox {
    -webkit-appearance: none; /* Safari/Chrome */
    -moz-appearance: none;    /* Firefox */
    appearance: none; 
    background-color: #ffffff;
    box-shadow: 3px 5px 5px rgba(0,0,0,0.1);
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.task-checkbox:checked {
    background-color: #4CAF50;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'><path fill='white' d='M530.8 134.1C545.1 144.5 548.3 164.5 537.9 178.8L281.9 530.8C276.4 538.4 267.9 543.1 258.5 543.9C249.1 544.7 240 541.2 233.4 534.6L105.4 406.6C92.9 394.1 92.9 373.8 105.4 361.3C117.9 348.8 138.2 348.8 150.7 361.3L252.2 462.8L486.2 141.1C496.6 126.8 516.6 123.6 530.9 134z'/></svg>");
    background-size: 60% 60%;
    background-repeat: no-repeat;
    background-position: center;
}

.delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 32px;
    height: 32px;
    border: none;
    color: var(--white);
    padding: 2%;
    background-color: #FF3131;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.delete-btn:hover {
    background-color: #df0000;
}

/* Responsive tweaks for Todo Tool Page */
@media (max-width: 480px) {
    #todo-hero .black-box {
        padding: 0;
    }

    #todo-list-container {
        padding: 1rem 0.5rem;
        border-radius: 20px;
    }

    #todo-form input {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    #add-todo-btn {
        font-size: 1.5rem;
        padding: 0;
        height: 35px;
        width: 35px;
        border-radius: 50%;
        margin-left: 2px;
    }

    #tasks-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    #tasks-title {
        width: 100%;
        justify-content: center;
    }

    #task-actions {
        width: 100%;
        justify-content: center;
        gap: 5px;
    }

    .task-item {
        font-size: 16px;
    }

    .task-checkbox {
        width: 28px;
        height: 28px;
    }

    .delete-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    #add-todo-btn {
        font-size: 1.25rem;
        padding: 0;
        height: 30px;
        width: 30px;
        border-radius: 50%;
        margin-left: 2px;
    }

    .task-item {
        font-size: 14px;
    }

    .task-checkbox {
        width: 24px;
        height: 24px;
    }

    .delete-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

@media (max-width: 320px) {
    #add-todo-btn {
        font-size: 1.1rem;
        padding: 0;
        height: 28px;
        width: 28px;
        border-radius: 50%;
    }

    .task-item {
        font-size: 13px;
    }

    .task-checkbox {
        width: 20px;
        height: 20px;
    }

    .delete-btn {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    #clear-all-btn, #clear-completed-btn {
        font-size: 14px;
        padding: 6px;
    }
}

/* Temperature Converter Tool Page Styles */
#converter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    height: fit-content;
}

#converter-container section {
    height: auto;
}

#temp-con-header {
    display: flex;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

#temp-con-header #un {
    align-items: center;
    justify-content: center;
    width: 20%;
    display: flex;
    margin: 0;
}

#temp-con-header #in {
    align-items: center;
    justify-content: center;
    width: 80%;
    display: flex;
    margin: 0;
}

#converter-container #inputs {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1rem;
}

#converter-container .custom-dropdown {
  position: relative;
  height: auto;
  color: black;
  width: 150px;
  user-select: none;
  font-size: 18px;
  font-weight: bold;
}

.dropdown-selected {
  background: #fff;
  padding: 8px;
  font-size: 18px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: 0.3s;
}

.dropdown-selected:hover {
  border: 2px solid rgb(45, 213, 255);
  box-shadow: 0 0 10px rgb(45, 213, 255);
}

.dropdown-options {
  list-style: none;
  margin: 5px 0 0;
  padding: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: absolute;
  width: 100%;
  display: none;
  animation: optionFadeIn 0.3s ease-in-out;
  z-index: 999;
}

.dropdown-options li {
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-options li:hover {
  background: rgb(7, 169, 209);
  color: white;
  border-radius: 10px;
}

/* Animation for options */
@keyframes optionFadeIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#converter-container #result-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

#converter-container #result-options h3 {
    margin: 0;
}

input[type="number"] {
    width: 80%;
    padding: 15px;
    border: 2px solid #B5D8F4;
    border-radius: 15px;
    font-size: 16px;
    transition: all 0.3s ease-in-out;
}

input[type="number"]:focus {
    outline: none;
    border-color: rgb(45, 213, 255);
    box-shadow: 0 0 10px rgb(45, 213, 255);
}

#result-con {
    width: 100%;
    height: 50px;
}

#result-con #res {
    font-size: 20px;
    font-weight: bold;
    text-align: start;
    height: 100%;
    color: #646464;
    display: inline-block;
    padding: 10px 15px;
    width: 40%;
    min-width: 150px;
    background-color: #E8F8FF;
    border-radius: 15px;
}

#convert-btn {
    background-color: #53bdee;
    color: var(--white);
    width: 50%;
    font-size: 20px;
    padding: 8px;
    height: 100%;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-weight: bold;
}

#convert-btn:hover {
    background-color: #0160dd;
    box-shadow: 3px 5px 5px rgba(0,0,0,0.1) ;
}

/* Responsive tweaks for Temperature Converter Tool Page */
@media (max-width: 480px) {
    #temp-con-hero .black-box {
        padding: 0;
    }

    #converter-container {
        width: 100%;
        padding: 1rem 0.5rem;
    }

    #temp-con-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    #temp-con-header #un, #temp-con-header #in {
        width: 100%;
        justify-content: center;
    }

    #converter-container #inputs {
        flex-direction: column;
        gap: 0.5rem;
    }

    #converter-container .custom-dropdown {
        width: 100%;
        font-size: 16px;
    }

    input[type="number"] {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    #converter-container #result-options {
        flex-direction: column;
        gap: 0.5rem;
    }

    #result-con #res {
        font-size: 1rem;
        padding: 8px 10px;
        width: 100%;
    }

    #convert-btn {
        width: 100%;
        font-size: 1.25rem;
        padding: 0.5rem 1rem;
        height: auto;
    }
}

@media (max-width: 375px) {
    #mass-con-hero .black-box {
        padding: 0;
    }

    #length-con-hero .black-box {
        padding: 0;
    }    
    
    #temp-con-hero .black-box {
        padding: 0;
    }   
    
    #convert-btn {
        font-size: 1.1rem;
        padding: 0.4rem 0.8rem;
        height: auto;
    }
}

@media (max-width: 320px) {
    #convert-btn {
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
        height: auto;
    }
}

/* Minimal responsive tweaks for tools pages only
   - Targets: #more-info and the tools hero (#hero)
   - Small, isolated changes so nothing else is altered
*/
@media (max-width: 900px) {
    /* make the informational block fit narrower screens */
    #more-info {
        max-width: 95%;
        margin-top: 0.75rem;
        padding: 0 1rem;
        font-size: 16px;
        box-sizing: border-box;
    }
    #more-info ul {
        padding-left: 1rem;
    }

}

@media (max-width: 480px) {
    #more-info {
        font-size: 15px;
        padding: 0 0.75rem;
        max-width: 100%;
    }
    #more-info ul {
        padding-left: 1rem;
    }
}
