/* Reset mặc định */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hamburger {
  display: none;
}

:root {
    /* Các biến màu cho chế độ sáng */
    --bg-color: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --text-color: #333;
    --header-bg: #2c3e50;
    --header-text: #ecf0f1;
    --card-bg: #fff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --dropdown-bg: #34495e;
    --dropdown-hover: #3e5c76;
    --highlight-color: #f1c40f;
    --secondary-text: #7f8c8d;
    --border-color: #dfe6e9;
    --heart-color: #e74c3c;
}

/* Chế độ tối */
body.dark-mode {
    --bg-color: linear-gradient(135deg, #2c3e50 0%, #1a202c 100%);
    --text-color: #ecf0f1;
    --header-bg: #1a1a2e;
    --header-text: #f5f5f5;
    --card-bg: #2d3748;
    --card-shadow: rgba(0, 0, 0, 0.25);
    --accent-color: #4299e1;
    --accent-hover: #3182ce;
    --dropdown-bg: #2d3748;
    --dropdown-hover: #4a5568;
    --highlight-color: #f1c40f;
    --secondary-text: #a0aec0;
    --border-color: #4a5568;
    --heart-color: #e53e3e;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--header-bg);
    color: var(--header-text);
    box-shadow: 0 2px 10px var(--card-shadow);
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--header-text);
}

.header h1 i {
    font-size: 28px;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    color: var(--header-text);
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--highlight-color);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--dropdown-bg);
    min-width: 200px;
    box-shadow: 0 4px 8px var(--card-shadow);
    z-index: 1;
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--header-text);
    padding: 10px 20px;
    display: block;
    font-weight: 400;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: var(--dropdown-hover);
    color: var(--highlight-color);
}

.user-account {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-account .user-icon {
    font-size: 24px;
    color: var(--header-text);
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.user-account .user-icon:hover {
    transform: scale(1.2);
    color: var(--highlight-color);
}

.user-account .user-name {
    color: var(--header-text);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.user-account .user-name:hover {
    color: var(--highlight-color);
}

.user-account .user-links {
    display: flex;
    gap: 15px;
}

.user-account .user-links a {
    color: var(--header-text);
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.user-account .user-links a:hover {
    color: var(--highlight-color);
}

/* Auth Container */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 60px;
}

.auth-container h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
}

.form-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--card-shadow);
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.form-box label {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    display: block;
    margin: 10px 0 5px;
    text-align: left;
}

.form-box input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.2);
}

.form-box button {
    background: var(--accent-color);
    color: white;
    padding: 12px;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.form-box button:hover {
    background: var(--accent-hover);
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--highlight-color);
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #f39c12;
    text-decoration: underline;
}

/* Footer */
.footer {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 30px 0;
  margin-top: 40px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-info {
  flex: 1;
  min-width: 300px;
}

.footer-info p {
  margin: 8px 0;
  line-height: 1.6;
}

.footer a {
  color: var(--highlight-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #f39c12;
}

.social-links {
  text-align: center;
  min-width: 200px;
}

.social-links h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--header-text);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  font-size: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.social-icon:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.social-icon.zalo {
  background: linear-gradient(135deg, #0068ff, #0099ff);
}

.social-icon.facebook {
  background: linear-gradient(135deg, #1877f2, #42a5f5);
}

.social-icon.instagram {
  background: linear-gradient(135deg, #e4405f, #fd1d1d, #fcb045);
}

/* Zalo icon custom (since Font Awesome doesn't have Zalo) */
.fa-zalo::before {
  content: "Z";
  font-family: 'Poppins', sans-serif;
  font-weight: bold;
  font-size: 18px;
}
/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: var(--header-text);
    margin-right: 15px;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Avatar Upload */
.avatar-upload {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 10px auto;
    border: 3px solid var(--accent-color);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.avatar-preview:hover {
    transform: scale(1.05);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--accent-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.camera-icon:hover {
    background: var(--accent-hover);
}

input[type="file"] {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .form-box {
        width: 95%;
    }

    .auth-container h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 20px;
    }

    nav a {
        font-size: 14px;
    }

    .user-account .user-links a {
        font-size: 12px;
    }

    .form-box {
        padding: 20px;
    }

    .form-box button {
        font-size: 14px;
        padding: 10px;
    }
  }
    /* Responsive adjustments */
@media (max-width: 768px) {
  /* Hamburger menu */
  .hamburger {
    display: block;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--header-text);
    cursor: pointer;
    padding: 10px;
  }

nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  width: 100%;
  flex-direction: column;
  background: var(--dropdown-bg);
  position: absolute;
  top: 100%;
  left: 0;
  padding: 0;
}

nav.active {
  max-height: 500px; /* đủ để chứa các link */
  padding: 10px 0;
}

  nav.active {
    display: flex;
  }

  nav a {
    padding: 10px 20px;
    width: 100%;
    text-align: center;
  }

  /* Dropdown adjustments */
  .dropdown {
    width: 100%;
  }

  .dropdown-content {
    position: static;
    transform: none;
    background: var(--dropdown-hover);
    box-shadow: none;
    border-radius: 0;
  }

  .dropdown-content a {
    padding: 8px 30px;
  }

  /* User account */
  .user-account {
    justify-content: center;
    width: 100%;
    padding: 10px 0;
  }

  .user-account .user-links {
    gap: 10px;
  }

  /* Auth container */
  .auth-container {
    padding-top: 120px;
    padding-bottom: 40px;
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Form box */
  .form-box {
    padding: 20px;
  }

  /* Avatar upload */
  .avatar-preview {
    width: 80px;
    height: 80px;
  }

  .camera-icon {
    width: 25px;
    height: 25px;
    font-size: 14px;
  }

  /* Back link */
  .back-link {
    font-size: 14px;
    margin-top: 15px;
    display: block;
    text-align: center;
  }

  /* Footer */
  .footer {
    padding: 15px 10px;
    font-size: 14px;
  }

  .footer p {
    margin: 5px 0;
  }
}

@media (max-width: 480px) {
  /* Header */
  .header h1 i {
    font-size: 24px;
  }

  /* Auth container */
  .auth-container h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  /* Form box */
  .form-box {
    padding: 15px;
  }

  .form-box label {
    font-size: 13px;
  }

  .form-box input {
    padding: 10px;
    font-size: 13px;
  }

  .form-box button {
    padding: 10px;
    font-size: 14px;
  }

  /* Avatar upload */
  .avatar-preview {
    width: 70px;
    height: 70px;
  }

  .camera-icon {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  /* Back link */
  .back-link {
    font-size: 13px;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none;
  }

  nav {
    display: flex !important;
    position: static;
    background: none;
    flex-direction: row;
  }
}

@media (max-width: 768px) {
  .dropdown {
    width: 100%;
    text-align: center;
  }

  .dropdown > a {
    display: block;
    padding: 10px 20px;
    width: 100%;
  }

  .dropdown-content {
    background: var(--dropdown-hover);
  }

  .dropdown-content a {
    padding: 8px 30px;
    text-align: left;
  }
}

html { scroll-behavior: smooth; }
