*,
*::before,
*::after {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

:root {
  --bg-dark: #09090b;
  --bg-card: #141417;
  --bg-sidebar: #0f0f12;
  --accent: #a78bfa;
  --accent-soft: rgba(167, 139, 250, 0.1);
  --text-main: #fafafa;
  --text-muted: #a1a1aa;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.03);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --sidebar-width: 260px;
}

* {
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.5;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

button {
  cursor: pointer;
  background: transparent;
  border: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

button:hover {
  opacity: 0.8;
}

.layout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  z-index: 100;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.sidebar-top h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.sidebar-middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-middle button, .sidebar-bottom button {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  width: 100%;
}

.sidebar-middle button:hover, .sidebar-bottom button:hover {
  background: var(--glass);
  color: var(--accent);
}

.sidebar-middle button.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Main Content Area */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background-image: 
    radial-gradient(circle at 50% 0%, var(--accent-soft) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, var(--accent-soft) 0%, transparent 30%);
}

.header {
  height: 64px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.header button {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.header button:hover {
  color: var(--text-main);
  background: var(--glass);
}

/* Chat Interface */
.chat-interface {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  gap: 2rem;
}

.interface-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.greeting h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.greeting p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.interface-bottom {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease;
}

.interface-bottom:focus-within {
  border-color: var(--accent);
}

textarea#chat {
  background: transparent;
  border: none;
  color: var(--text-main);
  resize: none;
  width: 100%;
  min-height: 120px;
  font-size: 1.125rem;
  padding: 0.5rem 0;
}

textarea#chat:focus {
  outline: none;
}

.action-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.menu-btns {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.option-wrapper {
  position: relative;
}

.option-wrapper > button {
  background: var(--glass);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.875rem;
  border: 1px solid var(--border);
}

.option-wrapper > .options-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  width: 280px;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.option-wrapper > .options-dropdown.show {
  display: block;
}

.option-item {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease;
}

.option-item:hover {
  background: var(--glass);
}

.option-item p:first-child {
  font-weight: 600;
  font-size: 0.875rem;
}

.option-item p:last-child {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.send-btn {
  background: var(--accent);
  color: #000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.send-btn:hover {
  transform: scale(1.05);
  background: var(--text-main);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .overlay.active {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
  }
}

.overlay {
  display: none;
}

.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
}
