:root {
    --primary-color: #10a37f;
    --secondary-color: #f0f0f0;
    --text-color: #333333;
    --background-color: #ffffff;
    --chat-bg: #f7f7f8;
    --user-message-bg: #dcf8c6;
    --ai-message-bg: #ffffff;
    --button-hover: #0d8a6f;
    --footer-bg: #f0f0f0;
    --footer-active: #10a37f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: "Roboto", sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.5;
font-size: 1.2rem; /* Increased base font size */
    display: flex;
    flex-direction: column;
    max-height: 90vh;
      	padding-bottom: 200px;  
     overflow-y: auto; /*  Prevents body from scrolling */
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
   height: calc(100vh - 200px); /* Adjusted height to fit the footer and button */
}


.form-group {
    margin-bottom: 5px;
      font-size: 1.2rem;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 20px;
}

.timer-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#timer {
    font-size: 26px;
    font-weight: bold;
    margin-right: 10px;
    margin-bottom: 10px;
}

.timer-controls {
    display: flex;
    flex-wrap: wrap;
}

.timer-controls button {
    padding: 5px 10px;
    margin-right: 5px;
    margin-bottom: 5px;
    background-color: #006400;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 30px;
}

.essay-container {
    background-color: white;
    padding: 3px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

#essayArea {
    width: 100%;
    min-height: 1200px;
    padding: 1px;
    font-size: 25px;
    line-height: 1.5;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    overflow-y: auto;
    background-image: linear-gradient(#f0f0f0 1px, transparent 1px);
    background-size: 100% 24px;
    background-position: 0 24px;
    line-height: 30px;
    padding-top: 20px;
}

#wordCount {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 4px;
    font-size: 20px;
}

#submitEssay {
    display: block;
    width: calc(100% - 0px); /* Margem para não cobrir a borda */
    padding: 15px;
    background-color: #006400;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 28px;
    margin-top: 20px;
    position: fixed;
    bottom: 150px; /* Espaço acima do footer ajustado */
   left: 20px;
   right: 20px;
   z-index: 899;
    transition: background-color 0.3s ease;
}

#submitEssay:hover {
    background-color: var(--button-hover);
}

.feedbackContainer {
    margin-top: 5px;
    background-color: white;
    border-radius: 8px;
    padding: 100px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /*  display: none;  Escondido até ser acionado via JavaScript */
    min-height: 400px; /* Altura máxima para scroll se necessário */
    overflow-y: auto;
      font-size: 34px;
}

.instructions {
    background-color: #e7f3ff;
    border-left: 4px solid #006400;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.instructions h3 {
    margin-bottom: 10px;
    color: #006400;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 5px;
}

.footer {
  background-color: var(--footer-bg);
  padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom, 0px)) 0.5rem;
  text-align: center;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;       z-index: 999;
}

.footer-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem; /* Increased footer text size */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.3rem;
  transition: all 0.3s ease;     z-index: 999;
       margin-bottom: 1px;
}

.footer-nav a i {
  font-size: 1rem; /* Increased footer icon size */
  margin-bottom: 0.3rem;
   width: 100%;
  
}

.footer-nav a.active {
  color: var(--footer-active);
}

/* Telas muito grandes - Tablets pequenos */
@media (max-width: 1080px) {

    select,
    #essayArea,
    #submitEssay {
        font-size: 18px;
    }

    .timer-controls button {
        font-size: 25px;
    }

    #timer {
        font-size: 24px;
    }

    .footer-nav a {
        font-size: 1rem;
    }

    .footer-nav a i {
        font-size: 1rem;
    }

    #feedbackContainer {
        padding: 100px;
    }
}

/* Dispositivos intermediários - Smartphones grandes e Tablets pequenos */
@media (max-width: 960px) {


    select,
    #essayArea,
    #submitEssay {
        font-size: 16px;
    }

    .timer-controls button {
        font-size: 22px;
    }

    #timer {
        font-size: 22px;
    }

    .footer-nav a {
  font-size: 1rem; /* Increased footer icon size */
    }

    .footer-nav a i {
  font-size: 1rem; /* Increased footer icon size */
    }

    #feedbackContainer {
        padding: 75px;
    }
}

/* Smartphones grandes - Tipo Galaxy Note, iPhone Plus */
@media (max-width: 768px) {

    select,
    #essayArea,
    #submitEssay {
        font-size: 15px;
    }

    .timer-controls button {
        font-size: 20px;
    }

    #timer {
        font-size: 20px;
    }

    .footer-nav a {
        font-size: 1rem;
    }

    .footer-nav a i {
  font-size: 1rem; /* Increased footer icon size */
    }

    #feedbackContainer {
        padding: 50px;
    }
}

/* Smartphones médios - Tipo iPhone, Galaxy S */
@media (max-width: 640px) {
    .container {
        padding: 15px;
    }

  

    select,
    #essayArea,
    #submitEssay {
        font-size: 14px;
    }

    .timer-controls button {
        font-size: 18px;
    }

    #timer {
        font-size: 18px;
    }

    .footer-nav a {
        font-size: 1rem;
    }

    .footer-nav a i {
  font-size: 1rem; /* Increased footer icon size */
    }

    #feedbackContainer {
        padding: 30px;
    }
}

/* Smartphones compactos - Tipo iPhone SE, Galaxy A */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }



    select,
    #essayArea,
    #submitEssay {
        font-size: 12px;
    }

    .timer-controls button {
        font-size: 16px;
    }

    #timer {
        font-size: 16px;
    }

    .footer-nav a {
        font-size: 1rem;
    }

    .footer-nav a i {
  font-size: 1rem; /* Increased footer icon size */
    }

    #feedbackContainer {
        padding: 20px;
    }
}

/* Smartphones muito compactos - Tipo iPhone 5, Galaxy Mini */
@media (max-width: 360px) {
    .container {
        padding: 5px;
    }



    select,
    #essayArea,
    #submitEssay {
        font-size: 10px;
    }

    .timer-controls button {
        font-size: 14px;
    }

    #timer {
        font-size: 14px;
    }
    .footer-nav a {
        font-size: 1rem;
    }

    .footer-nav a i {
  font-size: 1rem; /* Increased footer icon size */
    }


    #feedbackContainer {
        padding: 10px;
    }
}
