* {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color:#212121;
  color: black;
}

.headerBar {
  background-color: #424242;
  color: bisque;
  text-align: center;
  padding: 10px;
}

.title {
  margin-bottom: 20px;
  color:#48c030;
  font-size: 32px;
}

.topbar {
  margin-bottom: 15px;
  font-size: 24px;
}

.content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.secondTitle {
  background-color: #424242;
  color: white;
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  font-size: 28px;
  width: 100%;
  box-sizing: border-box;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.form {
  padding: 25px;
  margin: 0 auto;
  background-color: #f5f5f5;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.formLine {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  width: 100%;
}

input,
select {
  width: 100%;
  margin: 8px 0;
  padding: 10px;
  box-sizing: border-box;
}

/* table style */
table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

thead {
  background-color: #424242;
  color: white;
  line-height: 40px;
}

tbody {
  background-color: #f5f5f5;
  line-height: 35px;
  text-align: center;
}

th, td {
  padding: 10px;
}

/* Button */
button {
  width: 250px;
  color: #fff;
  padding: 12px;
  text-align: center;
  font-size: 1.2em;
  line-height: 24px;
  background-color: #ffab00;
  border-radius: 10px;
  margin: 20px auto;
  cursor: pointer;
  display: block;
}

button:hover {
  box-shadow: 0 0 0 5px grey;
  transition: 0.5s;
}
a {
  text-decoration: underline;
  cursor: pointer;
}

/* Download Button */
.download-btn {
    background-color: #ffab00;
    margin-top: 20px;
    width: 200px;
}

.download-btn:hover {
    background-color:#424242; 
}

/* Voice Recorder */
.voice-container {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 400px;
  text-align: center;
}

.record-btn {
  background:#ffab00;
  color: rgb(107, 248, 20);
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.record-btn:hover {
  background: #424242;
}

.record-icon {
  margin-right: 8px;
  font-size: 18px;
}

.recording-status {
  color: #666;
  margin: 10px 0;
  font-style: italic;
}

.voice-hint {
  font-size: 0.9em;
  color: #1a1919;
  margin-top: 5px;
}

.record-btn.recording {
  background: #f44336;
}

/* For tablets (600px and up) */
@media only screen and (max-width: 768px) {
    .content {
        width: 90%;
        padding: 15px;
    }

    .formLine.left,
    .formLine.right {
        width: 100%;
        float: none;
        margin: 10px 0;
        display: flex;
        flex-direction: column;
    }

    .formLine.right {
        margin-right: 0;  /* Remove the right margin */
    }

    input,
    select {
        width: 100%;
        margin: 5px 0;
        padding: 8px;
        box-sizing: border-box;
    }

    .form {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .secondTitle {
        margin-top: 30px;  /* Reduce top margin on mobile */
        width: 100%;
        box-sizing: border-box;
    }

    /* Table responsiveness */
    .table {
        width: 100%;
        margin: 0;
    }

    tbody tr {
        padding: 8px 0;
    }
}

/* For mobile phones (600px and down) */
@media only screen and (max-width: 600px) {
    .headerBar {
        padding: 15px 10px;
    }

    .title {
        font-size: 24px;
    }

    .topbar {
        font-size: 18px;
    }

    .secondTitle {
        font-size: 16px;
    }

    .form {
        margin: 0;
        padding: 15px;
    }
    
    button {
        width: 100%;
        margin: 10px auto;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 8px;
    }

    input[type="text"],
    select {
        width: 100%;
        margin: 5px 0 10px 0;
        padding: 8px;
    }

    /* Adjust spacing for form elements */
    label, 
    span {
        margin-bottom: 5px;
        display: block;
    }
}

/* For very small devices */
@media only screen and (max-width: 320px) {
    .title {
        font-size: 20px;
    }

    .table {
        font-size: 12px;
    }
}

.footer {
    text-align: center;
    padding: 5px 0;
    background-color:#424242;
    position: fixed;
    bottom: 0;
    width: 100%;
    color: #48c030;
    font-size: 14px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.footer p {
    margin: 0;
}