/* Reset mặc định */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #0d0d0d;
  color: #fff;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

  /* Thanh menu trượt */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 240px;
  height: 100%;
  background: #111;
  transition: 0.4s;
  padding: 20px;
  z-index: 999;
  box-shadow: 2px 0 10px rgba(0,0,0,0.5);
}

.sidebar.active {
  left: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
  position: relative;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.sidebar h3 {
  color: #00aaff;
  font-size: 1.2rem;
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  margin: 15px 0;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ccc;
  text-decoration: none;
  font-size: 16px;
  transition: 0.3s;
  padding: 8px 12px;
  border-radius: 6px;
}

.sidebar ul li a:hover {
  color: #00aaff;
  background: rgba(0, 170, 255, 0.1);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  z-index: 1001;
}

.close-btn:hover {
  background: rgba(255,255,255,0.1);
}

.menu-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  background: #333;
  border: none;
  color: white;
  padding: 10px 15px;
  font-size: 22px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 998; /* Thấp hơn sidebar */
  transition: background 0.3s, transform 0.1s;
}

.menu-btn:hover {
  background: #444;
}

.menu-btn:active {
  transform: scale(0.95);
}

/* Ẩn menu button khi sidebar mở */
.sidebar.active ~ .menu-btn {
  display: none;
}

/* Đảm bảo nội dung chính không bị che khi menu mở */
.main-content {
  transition: margin-left 0.4s;
}

.sidebar.active ~ .main-content {
  margin-left: 240px;
}

/* Hero Section */
.hero-section {
  padding: 120px 20px 80px;
  background: radial-gradient(circle at top, #111, #000);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #00aaff, #00ffcc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight {
  color: #00aaff;
}

.hero-description {
  font-size: 1.2rem;
  color: #ccc;
  margin-bottom: 40px;
  line-height: 1.6;
}

.cta-group {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, #00aaff, #0099e6);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 170, 255, 0.3);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #00aaff;
  border: 2px solid #00aaff;
}

.btn-outline:hover {
  background: #00aaff;
  color: white;
  transform: translateY(-2px);
}

.btn-large {
  padding: 15px 30px;
  font-size: 1.1rem;
}

/* Visit Counter */
.visit-counter {
  margin: 30px 0;
}

.counter-box {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.counter-box i {
  color: #00aaff;
  width: 24px;
  height: 24px;
}

.counter-label {
  display: block;
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 5px;
}

.counter-number {
  font-size: 2rem;
  font-weight: 700;
  color: #00ffcc;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 400px;
}

.floating-cards {
  position: relative;
  height: 100%;
}

.card {
  position: absolute;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.chat-card {
  top: 20%;
  left: 10%;
  animation: float 3s ease-in-out infinite;
}

.image-card {
  top: 50%;
  right: 10%;
  animation: float 3s ease-in-out infinite 1s;
}

.api-card {
  bottom: 20%;
  left: 30%;
  animation: float 3s ease-in-out infinite 2s;
}

.card i {
  width: 32px;
  height: 32px;
  color: #00aaff;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Stats Section */
.stats-section {
  padding: 80px 20px;
  background: rgba(255,255,255,0.02);
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  padding: 30px 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-item i {
  width: 40px;
  height: 40px;
  color: #00aaff;
  margin-bottom: 15px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #00ffcc;
  margin-bottom: 10px;
}

.stat-label {
  color: #ccc;
  font-size: 0.9rem;
}

/* Sections Common */
.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 20px;
  color: #fff;
}

.section-subtitle {
  font-size: 1.1rem;
  text-align: center;
  color: #ccc;
  margin-bottom: 60px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Features Section */
.features-section {
  padding: 100px 20px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.feature-card {
  background: rgba(255,255,255,0.05);
  padding: 40px 30px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(0, 170, 255, 0.3);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #00aaff, #00ffcc);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
}

.feature-icon i {
  width: 32px;
  height: 32px;
  color: white;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #fff;
}

.feature-card p {
  color: #ccc;
  margin-bottom: 20px;
  line-height: 1.6;
}

.feature-list {
  list-style: none;
  text-align: left;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #ccc;
}

.feature-list i {
  width: 16px;
  height: 16px;
  color: #00ffcc;
}

/* API Showcase Section */
.api-showcase-section {
  padding: 100px 20px;
  background: rgba(255,255,255,0.02);
}

.api-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 100px;
}

.api-card:last-child {
  margin-bottom: 0;
}

.api-content h2 {
  font-size: 2.2rem;
  color: #00aaff;
  margin-bottom: 15px;
}

.api-content h3 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 20px;
  font-weight: 500;
}

.api-content p {
  color: #ccc;
  line-height: 1.7;
  margin-bottom: 30px;
}

.api-features {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.api-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  padding: 10px 15px;
  border-radius: 8px;
  color: #ccc;
  font-size: 0.9rem;
}

.api-feature i {
  width: 16px;
  height: 16px;
  color: #00aaff;
}

/* API Demo */
.api-demo {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,0.1);
}

.api-demo-image {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
}

.demo-controls {
  text-align: center;
}

.prompt-example {
  background: rgba(0, 170, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #00aaff;
}

.prompt-example h4 {
  color: #00aaff;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.prompt-example p {
  color: #ccc;
  font-style: italic;
  margin: 0;
  font-size: 0.9rem;
}

/* Chat Demo */
.chat-demo {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px;
  height: 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-message {
  display: flex;
  gap: 10px;
  max-width: 80%;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bot-message {
  align-self: flex-start;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #00aaff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.message-avatar i {
  width: 16px;
  height: 16px;
  color: white;
}

.message-content {
  background: rgba(255,255,255,0.1);
  padding: 12px 16px;
  border-radius: 18px;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.4;
}

.user-message .message-content {
  background: #00aaff;
}

/* Pricing Section */
.pricing-section {
  padding: 100px 20px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.pricing-card {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 40px 30px;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-10px);
  background: rgba(255,255,255,0.08);
}

.pricing-card.popular {
  border-color: #00aaff;
  background: rgba(0, 170, 255, 0.05);
}

.popular-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #00aaff;
  color: white;
  padding: 5px 20px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pricing-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pricing-header h3 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 15px;
}

.price {
  font-size: 3rem;
  font-weight: 700;
  color: #00ffcc;
}

.price span {
  font-size: 1rem;
  color: #ccc;
  font-weight: normal;
}

.pricing-features {
  list-style: none;
  margin-bottom: 30px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: #ccc;
}

.pricing-features i {
  width: 16px;
  height: 16px;
}

.pricing-features .check {
  color: #00ffcc;
}

.pricing-features .x {
  color: #ff4444;
}

/* Use Cases Section */
.usecases-section {
  padding: 100px 20px;
  background: rgba(255,255,255,0.02);
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.usecase-card {
  background: rgba(255,255,255,0.05);
  padding: 40px 25px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  transition: all 0.3s ease;
}

.usecase-card:hover {
  transform: translateY(-5px);
}

.usecase-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.usecase-icon.marketing {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.usecase-icon.education {
  background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

.usecase-icon.support {
  background: linear-gradient(135deg, #fd79a8, #e84393);
}

.usecase-icon.creative {
  background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
}

.usecase-icon i {
  width: 24px;
  height: 24px;
  color: white;
}

.usecase-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #fff;
}

.usecase-card p {
  color: #ccc;
  margin-bottom: 20px;
  line-height: 1.6;
}

.usecase-card ul {
  list-style: none;
  text-align: left;
}

.usecase-card li {
  color: #ccc;
  margin-bottom: 8px;
  padding-left: 15px;
  position: relative;
}

.usecase-card li:before {
  content: "•";
  color: #00aaff;
  position: absolute;
  left: 0;
}

/* Technology Section */
.technology-section {
  padding: 100px 20px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.tech-item {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-5px);
}

.tech-item i {
  width: 48px;
  height: 48px;
  color: #00aaff;
  margin-bottom: 20px;
}

.tech-item h4 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #fff;
}

.tech-item p {
  color: #ccc;
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  padding: 100px 20px;
  background: linear-gradient(135deg, #00aaff, #00ffcc);
  text-align: center;
}

.cta-content h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: white;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* FAQ Section */
.faq-section {
  padding: 100px 20px;
  background: rgba(255,255,255,0.02);
}

.faq-grid {
  max-width: 800px;
  margin: 60px auto 0;
}

.faq-item {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}

.faq-question {
  padding: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: rgba(255,255,255,0.08);
}

.faq-question h4 {
  font-size: 1.1rem;
  color: #fff;
  margin: 0;
}

.faq-question i {
  width: 20px;
  height: 20px;
  color: #00aaff;
  transition: transform 0.3s ease;
}

.faq-answer {
  padding: 0 25px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-answer.active {
  padding: 0 25px 25px;
  max-height: 200px;
}

.faq-answer p {
  color: #ccc;
  line-height: 1.6;
  margin: 0;
}

/* Footer */
.footer {
  background: #111;
  padding: 60px 20px 30px;
  border-top: 1px solid #222;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.footer-logo h3 {
  color: #00aaff;
  font-size: 1.5rem;
}

.footer-section p {
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #ccc;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: #00aaff;
  color: white;
  transform: translateY(-2px);
}

.footer-section h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 12px;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #00aaff;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.contact-info i {
  width: 16px;
  height: 16px;
  color: #00aaff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid #333;
  color: #888;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #888;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #00aaff;
}

/* Hiệu ứng reveal */
.reveal, .reveal-left, .reveal-right {
  opacity: 0;
  transform: translateY(50px);
  transition: 0.8s ease;
}

.reveal-left {
  transform: translateX(-100px);
}

.reveal-right {
  transform: translateX(100px);
}

.reveal.active, .reveal-left.active, .reveal-right.active {
  opacity: 1;
  transform: translate(0);
}

/* Hiệu ứng mờ dần khi chuyển trang */
body.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.fade-in {
  opacity: 1;
  transition: opacity 0.6s ease;
}

/* Bộ đếm lượt truy cập */
.roll {
  animation: rollDown 2s ease-in-out forwards;
}

@keyframes rollDown {
  0% { transform: rotateX(90deg); opacity: 0; }
  50% { transform: rotateX(0deg); opacity: 1; }
  100% { transform: rotateX(0); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .features-grid,
  .pricing-grid,
  .usecases-grid,
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .api-card {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .features-grid,
  .pricing-grid,
  .usecases-grid,
  .tech-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }
  
  .cta-group {
    flex-direction: column;
    gap: 15px;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .api-features {
    flex-direction: column;
    gap: 10px;
  }
}

/* Social Feed Styles */
body {
    background: #0d0d0d;
    color: #fff;
    font-family: "Poppins", sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 20px 50px;
    min-height: 100vh;
}

.container h1 {
    text-align: center;
    font-size: 2.5rem;
    color: #00aaff;
    margin-bottom: 40px;
    font-weight: 700;
}

/* Post Card */
.post-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.post-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 170, 255, 0.3);
    transform: translateY(-2px);
}

.post-card h2 {
    color: #00aaff;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Post Form */
#post-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    color: #fff;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

#post-form textarea:focus {
    outline: none;
    border-color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
}

#post-form textarea::placeholder {
    color: #888;
}

/* Upload Options */
.upload-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px 0;
}

.option-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(0, 170, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.option-btn:hover {
    background: rgba(0, 170, 255, 0.3);
    border-color: #00aaff;
    transform: scale(1.05);
}

.option-btn i {
    width: 24px;
    height: 24px;
    color: #00aaff;
}

/* File Preview */
#file-preview {
    margin: 20px 0;
    min-height: 60px;
}

#preview-content {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.preview-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.preview-item:hover {
    transform: scale(1.02);
}

.preview-item img,
.preview-item video {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.remove-preview:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #00aaff, #0099e6);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 170, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Feed Posts */
.feed-post {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feed-post:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 170, 255, 0.2);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00aaff;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.post-time {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}

.post-options {
    position: relative;
}

.options-toggle {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.options-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.options-menu {
    position: absolute;
    right: 0;
    top: 35px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 120px;
    z-index: 100;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    display: none;
}

.options-menu.active {
    display: block;
}

.option-item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #ccc;
    padding: 10px 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.option-item:hover {
    background: rgba(0, 170, 255, 0.1);
    color: #00aaff;
}

.option-item.delete {
    color: #ef4444;
}

.option-item.delete:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Post Content */
.post-content {
    margin: 20px 0;
    line-height: 1.6;
    color: #e0e0e0;
}

.post-content a {
    color: #00aaff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-media {
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
}

.post-media img,
.post-media video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: contain;
}

.file-attachment {
    margin: 15px 0;
}

.file-attachment a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 170, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    color: #00aaff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.file-attachment a:hover {
    background: rgba(0, 170, 255, 0.2);
    transform: translateY(-1px);
}

/* Post Actions */
.post-actions {
    display: flex;
    gap: 25px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.action-btn.liked {
    color: #ef4444;
}

.action-btn i {
    width: 18px;
    height: 18px;
}

/* Comments */
.comments-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.comment-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.comment-author {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.comment-time {
    font-size: 0.75rem;
    color: #888;
}

.comment-text {
    color: #ccc;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: #00aaff;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #888;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-button:hover {
    color: #fff;
}

/* Comment Modal */
#comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.comment-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
}

#comment-text {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#comment-text:focus {
    outline: none;
    border-color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
}

#comment-text::placeholder {
    color: #888;
}

/* Edit Modal */
#edit-post-content {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    color: #fff;
    font-size: 1rem;
    resize: vertical;
    min-height: 150px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-family: inherit;
}

#edit-post-content:focus {
    outline: none;
    border-color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
}

/* Loader */
.loader {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #00aaff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Prompt */
#login-prompt {
    text-align: center;
    padding: 40px;
}

#login-prompt h2 {
    color: #00aaff;
    margin-bottom: 15px;
}

#login-prompt p {
    color: #ccc;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 80px 15px 30px;
    }
    
    .container h1 {
        font-size: 2rem;
    }
    
    .post-card {
        padding: 20px;
    }
    
    .post-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .post-options {
        align-self: flex-end;
    }
    
    .post-actions {
        gap: 15px;
    }
    
    .action-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .comment-input-area {
        flex-direction: column;
        gap: 10px;
    }
    
    #comment-text {
        width: 100%;
    }
    
    #submit-comment-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container h1 {
        font-size: 1.8rem;
    }
    
    .post-card {
        padding: 15px;
    }
    
    .author-info {
        gap: 8px;
    }
    
    .author-avatar {
        width: 35px;
        height: 35px;
    }
    
    .post-media img,
    .post-media video {
        max-height: 250px;
    }
    
    .preview-item img,
    .preview-item video {
        max-width: 150px;
        max-height: 120px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0099e6;
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Link Detection Highlight */
.detected-link {
    color: #00aaff !important;
    text-decoration: underline;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state i {
    width: 64px;
    height: 64px;
    color: #00aaff;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}


/* API Keys Management Styles */
.main {
    min-height: 100vh;
    background: #0d0d0d;
    padding: 100px 20px 50px;
    transition: margin-left 0.4s;
}

.sidebar.active ~ .main {
    margin-left: 240px;
}

.api-keys-container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.api-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.api-header h1 {
    font-size: 2.5rem;
    color: #00aaff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.api-header h1 i {
    width: 40px;
    height: 40px;
}

.api-header p {
    font-size: 1.2rem;
    color: #ccc;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Login Prompt */
.login-prompt {
    text-align: center;
    padding: 60px 40px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

.login-content {
    max-width: 400px;
    margin: 0 auto;
}

.login-icon {
    width: 80px;
    height: 80px;
    color: #00aaff;
    margin-bottom: 25px;
}

.login-content h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 15px;
}

.login-content p {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* API Content */
.api-content {
    animation: fadeIn 0.6s ease;
}

.api-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
}

#createKeyBtn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
}

/* Keys Section */
.keys-section {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid rgba(255,255,255,0.1);
}

.keys-section h3 {
    font-size: 1.5rem;
    color: #00aaff;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.keys-section h3 i {
    width: 24px;
    height: 24px;
}

/* Key List */
.key-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.key-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.key-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(0, 170, 255, 0.3);
    transform: translateY(-2px);
}

.key-info {
    flex: 1;
}

.key-name {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 8px;
}

.key-token {
    font-family: 'Courier New', monospace;
    color: #00ffcc;
    background: rgba(0, 255, 204, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    word-break: break-all;
    font-size: 0.9rem;
}

.key-created {
    font-size: 0.85rem;
    color: #888;
}

.key-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-copy, .btn-delete {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    transform: translateY(-1px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state i {
    width: 80px;
    height: 80px;
    color: #00aaff;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}

/* API Info */
.api-info {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.api-info h4 {
    font-size: 1.3rem;
    color: #00aaff;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.api-info h4 i {
    width: 20px;
    height: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(0, 170, 255, 0.2);
}

.info-item i {
    width: 24px;
    height: 24px;
    color: #00aaff;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-item strong {
    color: #fff;
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

.info-item p {
    color: #ccc;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: #00aaff;
    margin-bottom: 25px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content h2 i {
    width: 24px;
    height: 24px;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #888;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.1);
}

.form-group input::placeholder {
    color: #888;
}

.form-group small {
    display: block;
    color: #888;
    margin-top: 5px;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* reCAPTCHA Container */
.g-recaptcha {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

.g-recaptcha > div > div {
    margin: 0 auto;
}

/* Confirm Button */
.btn-confirm {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 20px;
}

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background: #10b981;
    color: white;
    text-align: center;
    border-radius: 10px;
    padding: 16px;
    position: fixed;
    z-index: 1001;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#toast.show {
    visibility: visible;
    animation: fadeInToast 0.5s, fadeOutToast 0.5s 2.5s;
}

@keyframes fadeInToast {
    from {
        bottom: 0;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeOutToast {
    from {
        bottom: 30px;
        opacity: 1;
    }
    to {
        bottom: 0;
        opacity: 0;
    }
}

/* Spin Animation */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #0099e6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar.active ~ .main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .main {
        padding: 80px 15px 30px;
    }
    
    .api-header {
        padding: 30px 20px;
    }
    
    .api-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .key-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .key-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 30px 25px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 70px 10px 20px;
    }
    
    .api-header h1 {
        font-size: 1.8rem;
    }
    
    .keys-section,
    .api-info {
        padding: 20px;
    }
    
    .key-item {
        padding: 20px;
    }
    
    .key-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-copy, .btn-delete {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        padding: 25px 20px;
        margin: 15px;
    }
    
    .api-actions {
        justify-content: center;
    }
    
    #createKeyBtn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark theme adjustments for reCAPTCHA */
.g-recaptcha {
    filter: invert(0.9) hue-rotate(180deg);
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
}

/* Focus states for accessibility */
.btn:focus-visible,
.form-group input:focus-visible {
    outline: 2px solid #00aaff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .key-item {
        border: 2px solid #fff;
    }
    
    .form-group input {
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .key-item,
    .info-item,
    .btn,
    .modal-content {
        transition: none;
    }
    
    .spin {
        animation: none;
    }
    
    #toast.show {
        animation: none;
    }
}






/* Settings Page Styles */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 20px 50px;
    min-height: 100vh;
    transition: margin-left 0.4s;
}

.sidebar.active ~ .settings-container {
    margin-left: 240px;
}

.settings-container h1 {
    font-size: 2.5rem;
    color: #00aaff;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

/* Profile Card */
.profile-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 170, 255, 0.3);
    transform: translateY(-5px);
}

/* Avatar Upload Area */
.avatar-upload-area {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #00aaff;
    transition: all 0.3s ease;
}

.avatar-upload-area:hover .profile-avatar {
    border-color: #00ffcc;
    transform: scale(1.05);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00aaff, #00ffcc);
    border: 3px solid #0d0d0d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-avatar-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.4);
}

.edit-avatar-btn i {
    width: 18px;
    height: 18px;
    color: white;
}

/* Profile Info */
.profile-info {
    margin-bottom: 30px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.profile-info p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.profile-info p:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 170, 255, 0.2);
}

.profile-info strong {
    color: #00aaff;
    font-size: 1rem;
    min-width: 80px;
    text-align: left;
}

.profile-info span {
    color: #fff;
    font-size: 1rem;
    text-align: right;
    flex: 1;
    margin-left: 20px;
}

/* Settings Actions */
.settings-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.settings-actions .btn-primary,
.settings-actions .btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    min-width: 160px;
    justify-content: center;
}

.settings-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: #00aaff;
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
}

.modal-content label {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1rem;
}

.modal-content input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.modal-content input:focus {
    outline: none;
    border-color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.1);
}

.modal-content input::placeholder {
    color: #888;
}

.modal-content .btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    font-size: 1.1rem;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #888;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Loading Spinner */
.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border-left-color: #00aaff;
    animation: spin 1s ease infinite;
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Login Overlay */
#login-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-overlay-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 50px 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    width: 90%;
}

.login-overlay-content i {
    width: 80px;
    height: 80px;
    color: #00aaff;
    margin-bottom: 20px;
}

.login-overlay-content h2 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.login-overlay-content p {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.login-overlay-content .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* File Input Styling */
#avatar-input {
    display: none;
}

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background: #10b981;
    color: white;
    text-align: center;
    border-radius: 10px;
    padding: 16px;
    position: fixed;
    z-index: 1001;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#toast.show {
    visibility: visible;
    animation: fadeInToast 0.5s, fadeOutToast 0.5s 2.5s;
}

@keyframes fadeInToast {
    from {
        bottom: 0;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeOutToast {
    from {
        bottom: 30px;
        opacity: 1;
    }
    to {
        bottom: 0;
        opacity: 0;
    }
}

/* Avatar Upload States */
.avatar-upload-area.uploading .profile-avatar {
    opacity: 0.5;
    filter: blur(2px);
}

.avatar-upload-area.uploading .edit-avatar-btn {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar.active ~ .settings-container {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .settings-container {
        padding: 80px 15px 30px;
    }
    
    .settings-container h1 {
        font-size: 2rem;
    }
    
    .profile-card {
        padding: 30px 25px;
    }
    
    .profile-info {
        max-width: 100%;
    }
    
    .profile-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        text-align: left;
    }
    
    .profile-info span {
        margin-left: 0;
        text-align: left;
    }
    
    .settings-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .settings-actions .btn-primary,
    .settings-actions .btn-secondary {
        width: 100%;
        max-width: 250px;
    }
    
    .modal-content {
        padding: 30px 25px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .settings-container {
        padding: 70px 10px 20px;
    }
    
    .settings-container h1 {
        font-size: 1.8rem;
    }
    
    .profile-card {
        padding: 25px 20px;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .edit-avatar-btn {
        width: 35px;
        height: 35px;
        bottom: 0;
        right: 0;
    }
    
    .edit-avatar-btn i {
        width: 16px;
        height: 16px;
    }
    
    .profile-info p {
        padding: 12px 15px;
    }
    
    .modal-content {
        padding: 25px 20px;
        margin: 15px;
    }
    
    .login-overlay-content {
        padding: 40px 25px;
    }
}

/* Scrollbar Styling */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #0099e6;
}

/* Focus states for accessibility */
.btn:focus-visible,
.modal-content input:focus-visible {
    outline: 2px solid #00aaff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .profile-card {
        border: 2px solid #fff;
    }
    
    .modal-content input {
        border: 2px solid #fff;
    }
    
    .profile-info p {
        border: 1px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .profile-card,
    .edit-avatar-btn,
    .profile-info p,
    .btn,
    .modal-content {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
    }
    
    #toast.show {
        animation: none;
    }
}

/* Dark theme enhancements */
body {
    background: #0d0d0d;
    color: #fff;
}

/* Custom scrollbar for the entire page */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0099e6;
}

/* Error state for avatar */
.profile-avatar.error {
    border-color: #ef4444;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Success state for avatar */
.profile-avatar.success {
    border-color: #10b981;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
/* Thêm styles cho overlay và loading */
#login-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.8);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	color: white;
	flex-direction: column;
}

.loading-spinner {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 30px;
	height: 30px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #007bff;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	}
	
	@keyframes spin {
	0% { transform: translate(-50%, -50%) rotate(0deg); }
	100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.avatar-upload-area {
	position: relative;
	display: inline-block;
}

.edit-avatar-btn {
	position: absolute;
	bottom: 5px;
	right: 5px;
	background: #007bff;
	color: white;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}







/* Chat Bot Styles */
.chatbot-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 50px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.4s;
}

.sidebar.active ~ .chatbot-container {
    margin-left: 240px;
}

/* Chat Box */
#chat-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    margin-bottom: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    backdrop-filter: blur(10px);
}

/* Messages */
.message {
    display: flex;
    gap: 15px;
    max-width: 80%;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.bot {
    align-self: flex-start;
}

/* Avatar */
.avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #00aaff;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message.user .avatar {
    border-color: #00ffcc;
}

/* Message Content */
.message-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 18px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.user .message-content {
    background: linear-gradient(135deg, #00aaff, #0099e6);
    border: none;
}

.message-content p {
    margin: 0 0 10px 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Message Content Images */
.message-content img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    margin: 10px 0;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Links in Messages */
.message-content a {
    color: #00ffcc;
    text-decoration: none;
    border-bottom: 1px solid #00ffcc;
    transition: all 0.3s ease;
}

.message-content a:hover {
    color: #00aaff;
    border-bottom-color: #00aaff;
}

/* Code Blocks */
.message-content pre {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    overflow-x: auto;
    position: relative;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.code-header span {
    color: #00aaff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn {
    background: rgba(0, 170, 255, 0.2);
    border: 1px solid rgba(0, 170, 255, 0.3);
    color: #00aaff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-btn:hover {
    background: rgba(0, 170, 255, 0.3);
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.message-content code {
    color: #00ffcc;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* Inline code */
.message-content :not(pre) > code {
    background: rgba(0, 170, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: #00ffcc;
    font-size: 0.9em;
}

/* Chat Input */
.chatbot-input {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

#user-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

#user-input:focus {
    outline: none;
    border-color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.1);
}

#user-input::placeholder {
    color: #888;
}

#send-btn {
    background: linear-gradient(135deg, #00aaff, #0099e6);
    border: none;
    border-radius: 12px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 170, 255, 0.3);
}

#send-btn:active {
    transform: translateY(0);
}

#send-btn i {
    width: 20px;
    height: 20px;
    color: white;
}

#send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#send-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Loading Dots */
.loading {
    opacity: 0.7;
}

.loading-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00aaff;
    animation: loadingBounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Message Timestamp */
.message-timestamp {
    font-size: 0.75rem;
    color: #888;
    margin-top: 5px;
    text-align: right;
}

.message.bot .message-timestamp {
    text-align: left;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: #888;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00aaff;
    animation: typingPulse 1.4s ease-in-out infinite both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingPulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Scrollbar Styling */
#chat-box::-webkit-scrollbar {
    width: 8px;
}

#chat-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#chat-box::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 4px;
}

#chat-box::-webkit-scrollbar-thumb:hover {
    background: #0099e6;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.welcome-message i {
    width: 64px;
    height: 64px;
    color: #00aaff;
    margin-bottom: 20px;
    opacity: 0.7;
}

.welcome-message h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.welcome-message p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Error Messages */
.message.error .message-content {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Success Messages */
.message.success .message-content {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar.active ~ .chatbot-container {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .chatbot-container {
        padding: 80px 15px 30px;
    }
    
    #chat-box {
        padding: 20px;
        border-radius: 16px;
    }
    
    .message {
        max-width: 90%;
        gap: 10px;
    }
    
    .avatar {
        width: 35px;
        height: 35px;
    }
    
    .message-content {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .chatbot-input {
        padding: 15px;
        border-radius: 12px;
    }
    
    #user-input {
        padding: 12px 16px;
    }
    
    #send-btn {
        width: 45px;
        height: 45px;
    }
    
    .message-content img {
        max-height: 300px;
    }
    
    .message-content pre {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        padding: 70px 10px 20px;
    }
    
    #chat-box {
        padding: 15px;
        border-radius: 12px;
    }
    
    .message {
        max-width: 95%;
    }
    
    .avatar {
        width: 30px;
        height: 30px;
        display: none; /* Ẩn avatar trên mobile để tiết kiệm không gian */
    }
    
    .message-content {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .chatbot-input {
        padding: 12px;
    }
    
    #user-input {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    
    #send-btn {
        width: 40px;
        height: 40px;
    }
    
    #send-btn i {
        width: 18px;
        height: 18px;
    }
    
    .message-content img {
        max-height: 250px;
    }
    
    .message-content pre {
        padding: 12px;
    }
    
    .code-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .copy-btn {
        align-self: flex-end;
    }
}

/* Focus states for accessibility */
#user-input:focus-visible,
#send-btn:focus-visible,
.copy-btn:focus-visible {
    outline: 2px solid #00aaff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #chat-box {
        border: 2px solid #fff;
    }
    
    .message-content {
        border: 1px solid #fff;
    }
    
    .chatbot-input {
        border: 2px solid #fff;
    }
    
    #user-input {
        border: 1px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .message,
    #send-btn,
    .copy-btn {
        animation: none;
        transition: none;
    }
    
    .loading-dot,
    .typing-dot {
        animation: none;
    }
}

/* Print styles */
@media print {
    .chatbot-input,
    .sidebar,
    .menu-btn {
        display: none;
    }
    
    .chatbot-container {
        padding: 20px;
        margin: 0;
    }
    
    #chat-box {
        background: white;
        color: black;
        border: 1px solid #000;
    }
    
    .message-content {
        background: #f5f5f5;
        color: #000;
        border: 1px solid #ddd;
    }
}

/* Dark theme enhancements */
body {
    background: #0d0d0d;
    color: #fff;
}

/* Custom selection color */
::selection {
    background: rgba(0, 170, 255, 0.3);
    color: white;
}

/* Message bubble arrows (optional) */
.message.bot .message-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 15px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid rgba(255, 255, 255, 0.1);
}

.message.user .message-content::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 15px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #00aaff;
}

/* Mobile message bubble arrows adjustment */
@media (max-width: 480px) {
    .message.bot .message-content::before,
    .message.user .message-content::before {
        display: none;
    }
}
/* Additional styles for the AI girlfriend experience */
    .message.bot .message-content {
      background-color: #ffe6f2;
      color: #333;
      border-radius: 18px 18px 18px 0;
      padding: 12px 16px;
      max-width: 80%;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .message.user .message-content {
      background-color: #4a90e2;
      color: white;
      border-radius: 18px 18px 0 18px;
      padding: 12px 16px;
      max-width: 80%;
      margin-left: auto;
    }
    
    .typing-indicator {
      display: flex;
      align-items: center;
      margin-bottom: 10px;
    }
    
    .typing-dot {
      height: 8px;
      width: 8px;
      border-radius: 50%;
      background-color: #999;
      margin: 0 2px;
      animation: typing 1.4s infinite ease-in-out;
    }
    
    .typing-dot:nth-child(1) { animation-delay: -0.32s; }
    .typing-dot:nth-child(2) { animation-delay: -0.16s; }
    
    @keyframes typing {
      0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
      40% { transform: scale(1); opacity: 1; }
    }
    
    .mood-indicator {
      font-size: 1.2rem;
      margin-left: 5px;
      vertical-align: middle;
    }
    
    .quick-replies {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }
    
    .quick-reply {
      background-color: #f0f0f0;
      border: 1px solid #ddd;
      border-radius: 15px;
      padding: 6px 12px;
      font-size: 0.85rem;
      cursor: pointer;
      transition: all 0.2s;
    }
    
    .quick-reply:hover {
      background-color: #e0e0e0;
    } 
    /* Thêm CSS cho các nút mới */
    .chatbot-input {
      position: relative;
      display: flex;
      gap: 8px;
    }
    
    .action-buttons {
      display: flex;
      gap: 8px;
    }
    
    .stop-btn, .continue-btn {
      background: #ff4757;
      color: white;
      border: none;
      border-radius: 8px;
      padding: 8px 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      transition: all 0.3s ease;
    }
    
    .continue-btn {
      background: #2ed573;
    }
    
    .stop-btn:hover {
      background: #ff3742;
    }
    
    .continue-btn:hover {
      background: #25c75d;
    }
    
    .message-controls {
      display: flex;
      gap: 8px;
      margin-top: 8px;
      justify-content: flex-start;
      padding-left: 50px;
    }
    
    .bot-message-container {
      display: flex;
      flex-direction: column;
      width: 100%;
    }

    /* Highlight syntax cho code */
    pre {
      background: #1e1e1e;
      color: #d4d4d4;
      padding: 16px;
      border-radius: 8px;
      overflow-x: auto;
      margin: 8px 0;
      position: relative;
    }

    .code-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 1px solid #444;
    }

    .code-header span {
      color: #569cd6;
      font-weight: bold;
      font-size: 14px;
    }

    .copy-btn {
      background: #007acc;
      color: white;
      border: none;
      padding: 4px 8px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 12px;
    }

    .copy-btn:hover {
      background: #005a9e;
    }

    /* Python syntax highlighting */
    .python-code .keyword { color: #569cd6; }
    .python-code .string { color: #ce9178; }
    .python-code .function { color: #dcdcaa; }
    .python-code .class { color: #4ec9b0; }
    .python-code .comment { color: #6a9955; }
    .python-code .number { color: #b5cea8; }
    .python-code .operator { color: #d4d4d4; }

    /* HTML syntax highlighting */
    .html-code .tag { color: #569cd6; }
    .html-code .attribute { color: #9cdcfe; }
    .html-code .value { color: #ce9178; }
    .html-code .comment { color: #6a9955; }
    .html-code .doctype { color: #808080; }

    /* Nút lịch sử chat */
    .history-btn {
      background: #3742fa;
      color: white;
      border: none;
      border-radius: 8px;
      padding: 8px 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      transition: all 0.3s ease;
      margin-left: auto;
    }

    .history-btn:hover {
      background: #2f35e0;
    }

    /* Modal lịch sử */
    .history-modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.5);
      z-index: 1000;
      justify-content: center;
      align-items: center;
    }

    .history-content {
      background: white;
      padding: 20px;
      border-radius: 12px;
      width: 90%;
      max-width: 600px;
      max-height: 80vh;
      overflow-y: auto;
    }

    .history-header {
      display: flex;
      justify-content: between;
      align-items: center;
      margin-bottom: 16px;
      border-bottom: 1px solid #eee;
      padding-bottom: 12px;
    }

    .history-header h3 {
      margin: 0;
      color: #333;
    }

    .close-history {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: #666;
    }

    .history-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .history-item {
      padding: 12px;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .history-item:hover {
      background: #f8f9fa;
      border-color: #007acc;
    }

    .history-item-title {
      font-weight: bold;
      color: #333;
      margin-bottom: 4px;
    }

    .history-item-preview {
      color: #666;
      font-size: 12px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .history-actions {
      display: flex;
      gap: 8px;
      margin-top: 16px;
      justify-content: flex-end;
    }

    .clear-history-btn {
      background: #ff4757;
      color: white;
      border: none;
      padding: 8px 16px;
      border-radius: 6px;
      cursor: pointer;
    }

    .clear-history-btn:hover {
      background: #ff3742;
    }