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

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: #fafafa;
  color: #2d3748;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* Auth Screen */
.auth-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 32px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-container h1 {
  text-align: center;
  margin-bottom: 32px;
  color: #8b7fc7;
}

.auth-form h2 {
  margin-bottom: 24px;
  font-size: 20px;
}

.auth-form input {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid #e8e4f0;
  border-radius: 8px;
  font-size: 14px;
}

.auth-form button {
  width: 100%;
  padding: 12px;
  background: #8b7fc7;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-form button:hover {
  background: #7a6eb6;
}

.link {
  margin-top: 16px;
  text-align: center;
  color: #8b7fc7;
  cursor: pointer;
  font-size: 13px;
}

.link:hover {
  text-decoration: underline;
}

/* Header */
header {
  background: white;
  padding: 16px 24px;
  border-bottom: 1px solid #e8e4f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 18px;
  color: #8b7fc7;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8e4f0;
  object-fit: cover;
}

.avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e8e4f0;
  object-fit: cover;
}

.btn-small {
  padding: 6px 12px;
  background: #f0f0f0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.btn-small:hover {
  background: #e0e0e0;
}

/* Tabs */
.tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid #e8e4f0;
  overflow-x: auto;
}

.tab {
  padding: 16px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab:hover {
  background: #fafafa;
}

.tab.active {
  border-bottom-color: #8b7fc7;
  color: #8b7fc7;
  font-weight: 500;
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.tab-content.active {
  display: block;
}

.tab-content h2 {
  margin-bottom: 24px;
  font-size: 20px;
}

/* Chat */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  gap: 12px;
  animation: slideIn 0.3s;
}

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

.message-content {
  flex: 1;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.message-name {
  font-weight: 500;
  color: #8b7fc7;
}

.message-time {
  font-size: 12px;
  color: #999;
}

.message-text {
  color: #2d3748;
}

.message-input {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid #e8e4f0;
}

.message-input input {
  flex: 1;
  padding: 12px;
  border: 1px solid #e8e4f0;
  border-radius: 8px;
  font-size: 14px;
}

.message-input button {
  padding: 12px 24px;
  background: #8b7fc7;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.message-input button:hover {
  background: #7a6eb6;
}

/* Members */
.members-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.member-card {
  background: white;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e8e4f0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-info {
  flex: 1;
}

.member-name {
  font-weight: 500;
  margin-bottom: 4px;
}

.member-email {
  font-size: 12px;
  color: #999;
}

.status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
}

.status.online {
  background: #48bb78;
}

/* Profile */
.profile-card {
  background: white;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
}

.profile-card h3 {
  margin: 16px 0 8px;
  font-size: 18px;
}

.profile-card p {
  color: #999;
  margin-bottom: 24px;
}

.upload-section {
  margin-top: 24px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: #8b7fc7;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.btn:hover {
  background: #7a6eb6;
}

/* Premium */
.premium-card {
  background: linear-gradient(135deg, #8b7fc7 0%, #9d8fd9 100%);
  color: white;
  padding: 32px;
  border-radius: 12px;
  max-width: 500px;
}

.premium-card h3 {
  font-size: 24px;
  margin-bottom: 24px;
}

.premium-card ul {
  list-style: none;
  margin-bottom: 24px;
}

.premium-card li {
  padding: 8px 0;
  font-size: 16px;
}

.price {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 24px;
}

.btn-premium {
  width: 100%;
  padding: 16px;
  background: white;
  color: #8b7fc7;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.btn-premium:hover {
  background: #f0f0f0;
}

#premiumStatus {
  margin-top: 16px;
  font-size: 14px;
}

/* AI */
.ai-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.ai-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-message {
  padding: 12px 16px;
  border-radius: 8px;
  max-width: 80%;
}

.ai-message.user {
  background: #8b7fc7;
  color: white;
  align-self: flex-end;
}

.ai-message.ai {
  background: #f0f0f0;
  align-self: flex-start;
}

/* Weather */
.weather-widget {
  background: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 16px;
  max-width: 500px;
}

.weather-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-temp {
  font-size: 48px;
  font-weight: bold;
  color: #8b7fc7;
}

.weather-details p {
  margin: 4px 0;
}

/* Stats */
.stats-list {
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #e8e4f0;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  color: #999;
}

.stat-value {
  font-weight: 500;
  color: #8b7fc7;
}