/* Import hai font Josefin Sans và Montserrat */
@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;600;700&family=Montserrat:wght@400;700&display=swap");

/* Biến CSS cho màu sắc và font */
:root {
  --color-primary: #42a5f5; /* Màu chủ đạo */
  --color-secondary: #f5f5f5; /* Màu nền nhạt */
  --color-accent: #ff4081; /* Màu nhấn (dùng cho nút, hover,...) */
  --color-dark: #333333;
  --color-white: #ffffff;
  --color-bg: #e3f2fd; /* Màu background tổng thể */

  --font-heading: "Josefin Sans", sans-serif;
  --font-body: "Montserrat", sans-serif;
}

/* Reset mặc định và base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Thiết lập nền và font cho body */
body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--color-dark);
  padding: 20px;
  margin: auto;
  padding-top: 60px;
  background: var(--color-bg);
  line-height: 1.5;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #2c3e50;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Căn hai bên */
  padding: 0 10px;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Menu chính */
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  padding: 0;
  justify-content: flex-start;
  gap: 2px; /* Giảm từ 5px xuống 2px, hoặc bỏ hẳn bằng cách xóa dòng này */
  margin: 0;
}

nav li {
  position: relative;
  margin-right: 8px; /* Giảm từ 16px xuống 8px, hoặc tùy ý bạn */
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: background 0.3s ease;
  padding: 8px 6px; /* Giảm từ 12px xuống 6px ở hai bên */
}
.dropdown-content a {
  display: block;
  padding: 10px;
  color: #ffffff;
}
nav a:hover {
  color: var(--color-primary);
  background-color: #34495e;
}

/* Dropdown */
.dropdown {
  position: relative;
}

/* Ẩn dropdown trên mobile mặc định */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #2c3e50;
  border-radius: 6px;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  top: 100%;
  left: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Khi dropdown được mở, hiển thị nó */
.dropdown.open .dropdown-content {
  display: block;
}

.dropdown-content a:hover {
  background-color: #34495e;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Nút home */
.home-button {
  background-color: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 18px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.home-button:hover {
  background-color: #f50057;
}

/* Hamburger Menu (Mobile) */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
}

/* Mobile Navigation */
@media screen and (max-width: 768px) {
  /* Hiển thị nút hamburger menu */
  .menu-toggle {
    display: block;
  }

  /* Ẩn menu mặc định */
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #2c3e50;
    padding: 10px 0;
    text-align: center;
  }

  /* Khi có class 'show', menu sẽ hiện */
  nav ul.show {
    display: flex;
  }

  nav li {
    width: 100%;
    padding: 10px 0;
  }

  nav a {
    display: block;
    padding: 10px;
  }
}
/* Tiêu đề chính */
h1 {
  font-family: var(--font-heading);
  text-align: center;
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--color-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Vùng hình ảnh (nếu có) */
#pics {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.content-image {
  max-width: 50%;
  height: auto;
  margin-bottom: 20px;
}

/* Form */
form {
  max-width: 320px;
  margin: 20px auto;
  text-align: center;
  background-color: var(--color-white);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

form:hover {
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.15);
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
  color: #757575;
}

/* Input ngày sinh */
input[type="date"] {
  width: 80%;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #bdbdbd;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  transition: border-color 0.2s ease;
}

input[type="date"]:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Select */
#gender,
#gioitinh {
  width: 80%;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #bdbdbd;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  background-color: #ffffff;
  transition: border-color 0.2s ease;
  color: #444444;
}

#gender:focus,
#gioitinh:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Nút submit */
button[type="submit"],
#generateButton {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  background-color: var(--color-accent);
  color: var(--color-white);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, transform 0.2s ease;
}

button[type="submit"]:hover,
#generateButton:hover {
  background-color: #f50057;
  transform: scale(1.05);
}

/* Thẻ details */
details {
  font-size: 17px;
  color: #333333;
  font-family: var(--font-heading);
  text-align: center;
  max-width: 600px;
  margin: 20px auto;
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

details summary {
  cursor: pointer;
  padding: 16px;
  background-color: #e1f5fe;
  font-weight: 600;
  transition: background 0.3s;
}

details summary:hover {
  background-color: #b3e5fc;
}

details ul {
  padding: 16px;
  list-style: none;
  text-align: left;
}

details li {
  margin-bottom: 8px;
}

/* Tiêu đề phụ */
h3 {
  font-style: italic;
  font-size: 24px;
  text-align: center;
  margin-top: 40px;
  font-family: var(--font-heading);
  color: var(--color-dark);
}

 /* Footer */
 footer {
    background-color: #222222;
    color: cyan;
    padding: 20px 0;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin: 10px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: orange;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
}

.copyright {
    background-color: #111111;
    padding: 10px 0;
    margin-top: 20px;
}

.copyright p {
    font-size: 12px;
    margin: 0;
}

/* Khu vực Revanced */
#revanced {
  background-color: var(--color-secondary);
  border: 1px solid #cccccc;
  padding: 20px;
  border-radius: 5px;
  max-width: 900px;
  margin: 0 auto;
  font-size: 20px;
  line-height: 1.5;
  font-family: var(--font-body);
}

#revanced a {
  color: var(--color-primary);
  transition: color 0.3s;
}

#revanced a:hover {
  color: var(--color-accent);
}

#revanced div:first-child {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

#revanced div:last-child {
  margin-top: 20px;
}

#revanced br {
  display: none;
}

@media only screen and (max-width: 600px) {
  #revanced {
    font-size: 16px;
  }
}

/* Chia sẻ mạng xã hội */
#sharin {
  color: #333333;
  font-family: var(--font-heading);
  text-align: center;
  margin-top: 40px;
  font-size: 20px;
}

#sharing {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 17px;
  color: #333333;
  font-family: var(--font-body);
  text-align: center;
  margin-top: 20px;
}

#sharing img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s;
}

#sharing img:hover {
  transform: rotate(10deg) scale(1.1);
}

/* Kết quả hiển thị */
#output,
#outp {
  margin-top: 40px;
  text-align: center;
}

#englishName,
#randomEnglishName {
  font-weight: bold;
  font-size: 20px;
  color: var(--color-accent);
}

/* Main page: two forms side by side on wide screens */
.col-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
  max-width: 900px;
  margin: 0 auto;
}

.col-wrap > div {
  flex: 1 1 280px;
  min-width: 0;
}

.summary-hint {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: #616161;
  margin-top: 4px;
}

details summary h4 {
  margin: 0;
}

#footr {
  text-align: center;
  padding: 24px 16px;
  color: var(--color-dark);
  font-size: 0.9rem;
}

/* Responsive chung */
@media (max-width: 768px) {
  h1 {
    font-size: 28px;
  }

  form {
    max-width: 90%;
  }
}
