:root {
  --bg-color: #FFFDED;
  --header-bg: #082D0F;
  --primary: #082D0F;
  --secondary: #73877B;
  --text-main: #082D0F;
  --text-light: #FFFDED;
  --glass-bg: rgba(115, 135, 123, 0.1);
  --glass-border: rgba(8, 45, 15, 0.1);
  --msg-mine: #082D0F;
  --msg-other: #73877B;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 1.2rem;
  --shadow: 0 10px 30px -5px rgba(8, 45, 15, 0.2);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#app {
  width: 100%;
  max-width: 500px;
  height: 85vh;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.view {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* Glass Card */
.glass-card {
  background: white;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}

h1 { font-size: 2rem; font-weight: 700; color: var(--primary); }
p { color: var(--secondary); }

/* Form Elements */
.input-group { text-align: left; }
.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  background: #fff;
  border: 2px solid var(--glass-border);
  border-radius: 0.8rem;
  padding: 0.8rem 1rem;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--secondary);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-light);
  border: none;
  border-radius: 0.8rem;
  padding: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}

.btn-primary:hover { opacity: 0.9; }

/* Chat Screen */
#chat-screen {
  background: white;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-header {
  padding: 1rem 1.5rem;
  background: var(--header-bg);
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info { display: flex; align-items: center; gap: 0.8rem; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 0.8rem;
}

.header-actions { display: flex; gap: 0.5rem; }

.btn-text {
  background: none;
  border: none;
  color: var(--text-light);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8rem;
  opacity: 0.8;
}
.btn-text:hover { opacity: 1; }
.btn-danger { color: #ff6b6b; }

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-color);
}

.message {
  max-width: 80%;
  padding: 0.8rem 1rem;
  border-radius: 1.2rem;
  font-size: 0.95rem;
  animation: fadeIn 0.2s ease-out;
}

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

.message.mine {
  align-self: flex-end;
  background: var(--msg-mine);
  color: var(--text-light);
  border-bottom-right-radius: 0.2rem;
}

.message.other {
  align-self: flex-start;
  background: var(--msg-other);
  color: var(--text-light);
  border-bottom-left-radius: 0.2rem;
}

.message-info {
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
  display: block;
  opacity: 0.7;
}

.chat-footer {
  padding: 1rem 1.5rem;
  background: white;
  border-top: 1px solid var(--glass-border);
}

#chat-form { display: flex; gap: 0.8rem; }
#message-input {
  flex: 1;
  border: 2px solid var(--glass-border);
  border-radius: 1rem;
  padding: 0.8rem 1rem;
}

.btn-icon {
  background: var(--primary);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
