/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: 'Roboto', sans-serif;
  color: #e0e0e0;
  min-height: 100vh;
  overflow-x: hidden;
  background: url('/assets/images/bg.png') no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

/* Hiệu ứng nền động (mờ nhẹ khi cuộn) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  z-index: -1;
  transition: backdrop-filter 0.5s ease;
}

/* Header Styles */
header {
  position: fixed;
  width: 100%;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 30, 30, 0.9);
  padding: 15px 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

/* Hiệu ứng header ẩn khi cuộn xuống */
body.scrolled header {
  transform: translateY(-100%);
}

/* Logo animation */
.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 60px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: rotate(360deg);
}

.logo-text {
  margin-left: 15px;
  font-size: 1.8em;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
  animation: glow 2s infinite alternate;
}

/* Hiệu ứng glow cho logo-text */
@keyframes glow {
  0% { text-shadow: 0 0 5px rgba(255, 255, 255, 0.5); }
  100% { text-shadow: 0 0 15px rgba(76, 175, 80, 0.8), 0 0 25px rgba(76, 175, 80, 0.5); }
}

.menu-toggle {
  display: none;
  font-size: 2em;
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.menu-toggle:hover {
  transform: scale(1.1) rotate(90deg);
}

/* Container */
.container {
  display: flex;
  padding-top: 100px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar Styles */
.sidebar {
  width: 260px;
  background: rgba(25, 25, 25, 0.95);
  padding: 20px;
  position: fixed;
  top: 100px;
  left: 20px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-height: 80vh;
  overflow-y: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  margin-bottom: 12px;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideIn 0.5s ease forwards;
  animation-delay: calc(0.1s * var(--i)); /* Tạo hiệu ứng lần lượt */
}

.sidebar ul li:nth-child(1) { --i: 1; }
.sidebar ul li:nth-child(2) { --i: 2; }
.sidebar ul li:nth-child(3) { --i: 3; }
/* Tiếp tục cho các li khác nếu cần */

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sidebar ul li a {
  color: #d0d0d0;
  text-decoration: none;
  font-size: 1.1em;
  padding: 12px 20px;
  display: block;
  background: rgba(76, 175, 80, 0.15);
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Hiệu ứng hover cho sidebar link */
.sidebar ul li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.4), transparent);
  transition: left 0.5s ease;
}

.sidebar ul li a:hover::before {
  left: 100%;
}

.sidebar ul li a:hover {
  background: #4CAF50;
  color: #fff;
  transform: translateX(8px);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar, .content::-webkit-scrollbar {
  width: 2px;
}

.sidebar::-webkit-scrollbar-thumb, .content::-webkit-scrollbar-thumb {
  background: #4CAF50;
  border-radius: 10px;
  transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover, .content::-webkit-scrollbar-thumb:hover {
  background: #66bb6a;
}

/* Content Styles */
.content {
  margin-left: 300px;
  padding: 40px;
  background: rgba(20, 20, 20, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  width: calc(100% - 340px);
  min-height: calc(100vh - 140px);
  overflow-y: auto;
  position: relative;
}

.content section {
  margin-bottom: 50px;
  padding: 20px;
  background: rgba(30, 30, 30, 0.8);
  border-radius: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content section:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.content h2 {
  font-size: 2.2em;
  font-weight: 700;
  color: #4CAF50;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
  animation: bounceIn 1s ease;
}

.content h2::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background: #4CAF50;
  bottom: 0;
  left: 0;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: underline 0.5s ease forwards 0.5s;
}


.content h3 {
  font-size: 2.2em;
  font-weight: 700;
  color: #ff0000;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
  animation: bounceIn 1s ease;
}

@keyframes underline {
  to { transform: scaleX(1); }
}

@keyframes bounceIn {
  0% { transform: translateY(-50px); opacity: 0; }
  60% { transform: translateY(10px); opacity: 1; }
  100% { transform: translateY(0); }
}

.content ul {
  list-style: none;
}

.content li {
  font-size: 1.2em;
  line-height: 1.7;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
  animation-delay: calc(0.1s * var(--i));
}

.content li:nth-child(1) { --i: 1; }
.content li:nth-child(2) { --i: 2; }
.content li:nth-child(3) { --i: 3; }
/* Tiếp tục nếu cần */

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.content li::before {
  content: '•';
  color: #4CAF50;
  font-size: 1.5em;
  position: absolute;
  left: 0;
  top: -2px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive - Mobile Optimization */
@media (max-width: 767px) {
  .menu-toggle {
    display: block;
  }

  .sidebar {
    display: none;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    top: 0;
    left: -300px;
    z-index: 999;
    border-radius: 0;
    padding-top: 80px;
  }

  .sidebar.active {
    display: block;
    transform: translateX(300px);
  }

  .content {
    margin-left: 0;
    width: 100%;
    padding: 20px;
    border-radius: 15px;
    font-size: 1em;
  }

  .content h2 {
    font-size: 1.8em;
  }

  .content li {
    font-size: 1em;
    line-height: 1.6;
  }

  .container {
    padding-top: 80px;
  }

  .logo {
    height: 40px;
  }

  .logo-text {
    font-size: 1.4em;
  }
}




/* Thêm vào file style.css */

/* Style cho icon sách */
/* Trong style.css */

/* Style cho section-icon */
.section-icon {
  width: 80px; /* Tăng chiều rộng để chứa cả 2 icon */
  height: 40px;
  margin-left: 10px;
  vertical-align: middle;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Khi section active thì hiện icon */
.content section.active h2 .section-icon {
  opacity: 1;
}

/* Style cho icon people reading */
.section-icon .people-reading path,
.section-icon .people-reading rect {
  fill: #ffffff; /* Màu của người đọc sách */
}

/* Style và animation cho icon loading */
.section-icon .loading-icon circle {
  stroke: #ffffff; /* Màu của vòng tròn loading */
  transform-origin: center;
  animation: spin 1s linear infinite; /* Hiệu ứng xoay */
}

/* Keyframes cho hiệu ứng xoay */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}