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

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

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

@keyframes pulseShifted {
  0%, 100% { transform: scale(1) translateX(-150px); }
  50% { transform: scale(1.05) translateX(-150px); }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes messageSlide {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #413548;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  overflow: hidden;
  transition: background-image 0.5s ease-in-out;
}

h1 {
  position: fixed;
  top: 2rem;
  left: 0;
  right: 0;
  margin: 0 auto;
  text-shadow: 0 0 20px rgba(255,255,255,0.8), 0 0 40px rgba(103,174,112,0.6);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-family: serif;
  color: #fff;
  letter-spacing: 0.8rem;
  animation: fadeIn 1s ease-out, pulse 3s ease-in-out infinite;
  text-align: center;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
  width: 100%;
}

/* Left Sidebar */
#left-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(135deg, rgba(103,174,112,0.8), rgba(103,174,112,0.75));
  backdrop-filter: blur(10px);
  box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 2rem 0;
}

#left-sidebar.open {
  transform: translateX(0);
}

#menu-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(103,174,112,0.9), rgba(103,174,112,1));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  z-index: 1001;
}

#menu-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(103,174,112,0.5);
  background: linear-gradient(135deg, rgba(103,174,112,1), rgba(120,190,130,1));
}

#menu-btn img {
  display: block;
  filter: brightness(0) invert(1);
}

.sidebar-header {
  padding: 0 2rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sidebar-header h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.nav-item {
  padding: 1rem 2rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  border-right: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-item:hover {
  background: rgba(255,255,255,0.1);
  border-right-color: #fff;
  padding-right: 2.5rem;
}

.nav-item.settings {
  background: rgba(255,255,255,0.05);
}

/* Settings Overlay */
#settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeInOverlay 0.3s ease;
}

#settings-overlay.open {
  display: flex;
}

.settings-panel {
  background: linear-gradient(135deg, rgba(140, 127, 147, 0.95), rgba(140, 127, 147, 0.85));
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2.5rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: fadeIn 0.4s ease;
  border: 1px solid rgba(255,255,255,0.1);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.settings-header h2 {
  color: #fff;
  font-size: 1.8rem;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.close-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: rotate(90deg);
}

.setting-item {
  margin-bottom: 1.5rem;
}

.setting-item label {
  display: block;
  color: #fff;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.setting-item input[type="text"],
.setting-item select {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.9);
  font-size: 1rem;
}

.setting-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Right Chat Sidebar */
#chat-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(140, 127, 147, 0.9), rgba(140, 127, 147, 1));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  z-index: 999;
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
}

#chat-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(140, 127, 147, 0.5);
  background: linear-gradient(135deg, rgba(140, 127, 147, 1), rgba(150, 137, 157, 1));
}

#right-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: 40%;
  min-width: 450px;
  height: 100vh;
  background: linear-gradient(135deg, #24132e, #31203a);
  backdrop-filter: blur(10px);
  box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 998;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.1);
}

#right-sidebar.open {
  transform: translateX(0);
}

.chat-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  background: rgba(103,174,112,0.95);
}

.chat-header h2 {
  color: #fff;
  font-size: 1.8rem;
  text-align: center;
}

#chat {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

#chat::-webkit-scrollbar {
  width: 8px;
}

#chat::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
}

#chat::-webkit-scrollbar-thumb {
  background: rgba(103,174,112,0.6);
  border-radius: 10px;
}

#chat::-webkit-scrollbar-thumb:hover {
  background: rgba(103,174,112,0.8);
}

.message {
  margin: 0.8rem 0;
  padding: 12px 16px;
  border-radius: 15px;
  max-width: 85%;
  word-wrap: break-word;
  animation: messageSlide 0.4s ease-out;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.message:hover {
  transform: translateY(-2px);
}

.user {
  text-align: right;
  color: #fff;
  background: linear-gradient(135deg, rgba(103, 174, 112, 0.7), rgba(103, 174, 112, 0.5));
  margin-right: auto;
  border-bottom-right-radius: 5px;
}

.assistant {
  text-align: right;
  color: #fff;
  background: linear-gradient(135deg, rgba(80, 70, 87, 0.7), rgba(80, 70, 87, 0.5));
  margin-left: auto;
  border-bottom-left-radius: 5px;
}

.loading::after {
  content: '...';
  animation: dots 1.5s infinite;
}

#input-area {
  display: flex;
  gap: 0.8rem;
  padding: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  background: rgba(103,174,112,0.1);
}

#input-area input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 15px;
  border: none;
  background: rgba(255,255,255,0.9);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#input-area input:focus {
  outline: none;
  box-shadow: 0 4px 20px rgba(103,174,112,0.4);
  transform: translateY(-2px);
}

::placeholder {
  text-align: right;
  color: #888;
}

#input-area button {
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(103, 174, 112, 0.9), rgba(103, 174, 112, 1));
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
}

#input-area button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(103,174,112,0.4);
  background: linear-gradient(135deg, rgba(103, 174, 112, 1), rgba(120, 190, 130, 1));
}

#input-area button:active {
  transform: translateY(-1px);
}

/* Dialect Counters */
#dialect-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(140, 127, 147, 0.95), rgba(140, 127, 147, 0.85));
  backdrop-filter: blur(15px);
  border-radius: 15px 15px 0 0;
  padding: 0.8rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);
  border-bottom: none;
  z-index: 500;
  animation: fadeIn 1s ease-out;
  max-width: 90%;
  width: fit-content;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#dialect-panel.shift-left {
  margin-right: calc(40.75%);
  margin-left: auto;
}

.panel-header {
  text-align: center;
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  font-weight: bold;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.dialect-grid {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  align-items: flex-end;
}

.dialect-counter {
  background: linear-gradient(135deg, rgba(103,174,112,0.4), rgba(103,174,112,0.35));
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.1);
  min-width: 70px;
}

.dialect-counter:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(103,174,112,0.3);
  background: linear-gradient(135deg, rgba(103,174,112,1), rgba(103,174,112,1));
}

.dialect-counter.active {
  animation: pulse 0.5s ease;
  background: linear-gradient(135deg, rgba(103,174,112,0.6), rgba(103,174,112,0.4));
  border-color: rgba(103,174,112,0.8);
}

.dialect-name {
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.dialect-count {
  color: #fff;
  font-size: 1.3rem;
  font-weight: bold;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
#attach.recording {
  background: linear-gradient(135deg, #e63946, #ff6b6b);
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.8);
}

.message-text {
  margin-bottom: 0.3rem;
}

.message-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-start;
  font-size: 0.8rem;
}

.message.assistant .message-actions {
  opacity: 0.8;
}

.copy-btn,
.tts-btn {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 8px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.1s ease;
}

.copy-btn:hover,
.tts-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}



/* 🔁 Mobile layout */
@media (max-width: 768px) {
body {
overflow: hidden;            /* no page scrolling, only chat area */
background-attachment: scroll;
}

/* You can hide the big title on mobile to give more space */
h1 {
display: none;
}

/* Chat = full-screen app */
#right-sidebar {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;                  /* full height */
width: 100%;
min-width: 0;
height: auto;               /* use top+bottom instead */
transform: translateX(0);   /* always open */
box-shadow: none;
border-left: none;
display: flex;
flex-direction: column;
z-index: 900;
}

.chat-header {
padding: 1rem;
}

.chat-header h2 {
font-size: 1.2rem;
}

/* Only this area scrolls */
#chat {
flex: 1;
padding: 0.75rem;
overflow-y: auto;
padding-bottom: 90px;      /* so last messages don’t hide under input */
}

.message {
max-width: 100%;
font-size: 0.95rem;
}

/* Input bar: fixed at bottom, never moves */
#input-area {
position: fixed;
left: 0;
right: 0;
bottom: 0;

padding: 0.6rem;
gap: 0.4rem;
border-top: 1px solid rgba(255,255,255,0.2);
background: rgba(24, 19, 30, 0.96);
z-index: 3000;             /* above everything */
}

#input-area input {
font-size: 0.9rem;
padding: 0.7rem 0.9rem;
}

#input-area button {
padding: 12px 14px;
min-width: 44px;
}

.copy-btn,
.tts-btn {
padding: 4px 8px;
}

/* Hide chat toggle – chat is always visible */
#chat-toggle {
display: none;
}

/* Hide dialect panel on mobile so it doesn't fight for the bottom area */
#dialect-panel {
display: none;
}
}


/* Extra small screens */
@media (max-width: 480px) {
h1 {
font-size: 1.5rem;
letter-spacing: 0.2rem;
}

/* If you want max simplicity on very small phones, hide the dialect panel */
#dialect-panel {
display: none;
}
}

/* Information Section */

/* Info / About section */
.info-section {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 8rem auto 4rem auto;
  padding: 0 1.5rem;
  z-index: 10;
}

.info-card {
  background: linear-gradient(
    135deg,
    rgba(140, 127, 147, 0.96),
    rgba(103, 174, 112, 0.9)
  );
  backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 2.5rem 2.5rem 2rem 2.5rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fdfdfd;
  animation: fadeIn 0.9s ease-out;
}

/* header */
.info-header {
  text-align: left;
  margin-bottom: 1.8rem;
}

.info-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.info-tagline {
  font-size: 0.98rem;
  opacity: 0.9;
}

/* body text */
.info-content p {
  line-height: 1.7;
  font-size: 0.98rem;
  margin-bottom: 0.9rem;
}

/* grid layout */
.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.8rem;
  align-items: flex-start;
}

.info-column {
  min-width: 0;
}

.info-subtitle {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  position: relative;
}

.info-subtitle::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 52px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
}

/* team list */
.info-team-list {
  list-style: none;
  margin-top: 0.8rem;
  margin-bottom: 1.2rem;
  padding: 0;
}

.info-team-list li {
  font-size: 0.98rem;
  margin-bottom: 0.3rem;
}

.info-supervisor {
  font-size: 0.92rem;
  opacity: 0.95;
}

.info-supervisor span {
  font-weight: 600;
}

/* repo block */
.info-repo-text {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.info-repo-link {
  display: inline-block;
  font-size: 0.95rem;
  color: #ffffff;
  text-decoration: none;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(24, 19, 30, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
  word-break: break-all;
}

.info-repo-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  background: rgba(24, 19, 30, 0.6);
  border-color: rgba(255, 255, 255, 0.75);
}

/* tags */
.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.info-tag {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

/* responsive */
@media (max-width: 900px) {
  .info-card {
    padding: 2rem 1.6rem 1.8rem 1.6rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .info-header {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .info-section {
    margin-top: 6rem;
    margin-bottom: 3rem;
  }

  .info-card {
    padding: 1.7rem 1.2rem 1.5rem 1.2rem;
  }

  .info-title {
    text-align: left;
  }
}
/* Start hidden */
.hidden {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(20px);
  transition: opacity 0.4s ease, max-height 0.5s ease, transform 0.4s ease;
}

/* Visible state */
.visible {
  opacity: 1;
  max-height: 2000px; /* enough for your content */
  transform: translateY(0);
}
.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}