/* ================== ROOT VARIABLES ================== */
:root {
  --primary-color: #d98cb3; /* subtle pink hue */
  --secondary-color: #ffb6c1;
  --accent-color: #ff69b4;

  --light-bg: #f9f9fb;
  --dark-bg: #1e1e2f;

  --card-bg-light: #ffffff;
  --card-bg-dark: #2a2a3d;

  --text-light: #222;
  --text-dark: #eee;
}

/* Dark Mode */
body.dark-mode {
  background: var(--dark-bg);
  color: var(--text-dark);
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--light-bg);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================== NAVBAR ================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-color);
  padding: 12px 30px;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.navbar ul li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.3s, transform 0.2s;
}

.navbar ul li a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.logo {
  height: 40px; /* small logo */
}

/* Theme Toggle */
#theme-toggle {
  border: none;
  background: white;
  color: var(--primary-color);
  font-size: 1.2rem;
  border-radius: 50%;
  padding: 6px 10px;
  cursor: pointer;
}

/* ================== HERO / HOMEPAGE ================== */
.hero {
  text-align: center;
  padding: 80px 20px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.hero p {
  font-size: 1.2rem;
  color: gray;
}

/* Homepage Cards */
.home-cards {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 50px auto;
  flex-wrap: wrap;
}

.card {
  background: var(--card-bg-light);
  padding: 25px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  flex: 1 1 200px;
  max-width: 220px;
}

body.dark-mode .card {
  background: var(--card-bg-dark);
}

.card img {
  height: 80px;
  margin-bottom: 15px;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* ================== DICTIONARY ================== */
.dictionary-section {
  padding: 60px 30px;
  text-align: center;
}

.dictionary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.dict-card {
  background: var(--card-bg-light);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}

body.dark-mode .dict-card {
  background: var(--card-bg-dark);
}

.dict-card img {
  max-width: 100%;
  border-radius: 12px;
  margin-bottom: 15px;
}

.dict-card:hover {
  transform: scale(1.05);
}

/* ================== TRANSLATE ================== */
.translate-section {
  padding: 60px 30px;
  text-align: center;
}

.translate-section h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.translate-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.translate-card {
  background: var(--card-bg-light);
  border-radius: 16px;
  padding: 25px;
  width: 320px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

body.dark-mode .translate-card {
  background: var(--card-bg-dark);
}

.translate-card textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin-bottom: 12px;
  font-size: 1rem;
}

.translate-card button {
  margin: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: var(--secondary-color);
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s, background 0.3s;
}

.translate-card button:hover {
  transform: scale(1.05);
  background: var(--accent-color);
}

/* Output Box */
#gesture-box {
  background: rgba(0,0,0,0.05);
  border-radius: 12px;
  padding: 30px;
  min-height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.dark-mode #gesture-box {
  background: rgba(255,255,255,0.05);
}

/* Gesture Animation */
.gesture-animation {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
  font-size: 2rem;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

/* ================== AI Assistant ================== */
.ai-assistant {
  margin: 60px auto;
  padding: 30px;
  max-width: 700px;
  background: var(--card-bg-light);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

body.dark-mode .ai-assistant {
  background: var(--card-bg-dark);
}

.chat-box {
  max-height: 250px;
  overflow-y: auto;
  text-align: left;
  margin-bottom: 15px;
  padding: 15px;
  background: rgba(0,0,0,0.05);
  border-radius: 12px;
}

body.dark-mode .chat-box {
  background: rgba(255,255,255,0.05);
}

.chat-input {
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
}

.chat-input button {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: var(--accent-color);
  color: white;
  font-weight: bold;
  cursor: pointer;
}

/* ================== ABOUT ================== */
.about-section {
  padding: 60px 30px;
  text-align: center;
}

.about-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.about-card {
  background: var(--card-bg-light);
  border-radius: 16px;
  padding: 20px;
  width: 280px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}

body.dark-mode .about-card {
  background: var(--card-bg-dark);
}

.about-card:hover {
  transform: translateY(-6px);
}

.contact-section {
  margin-top: 60px;
  padding: 20px;
}

/* ================== LIVE CAMERA ================== */
.camera-frame {
  border: 6px solid var(--accent-color);
  border-radius: 20px;
  overflow: hidden;
  width: 640px;
  max-width: 95%;
  margin: 20px auto;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  transition: border 0.3s;
}

body.dark-mode .camera-frame {
  border: 6px solid var(--secondary-color);
}

/* ================== WATERMARK ================== */
body::after {
  content: "";
  background: url('assets/logo.png') center/200px no-repeat;
  opacity: 0.07;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* ================== FOOTER ================== */
footer {
  margin-top: auto;
  padding: 15px;
  background: var(--primary-color);
  color: white;
  text-align: center;
  font-size: 0.9rem;
}
