/* Custom Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-gradient: radial-gradient(circle at 50% 50%, #12131c 0%, #08090d 100%);
  --panel-bg: rgba(255, 255, 255, 0.03);
  --panel-border: rgba(255, 255, 255, 0.08);
  --accent-color: #6366f1;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --success-color: #10b981;
  --glow-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 2rem 1rem;
}

/* Background elements */
.ambient-glow-1 {
  position: absolute;
  top: 10%;
  left: 15%;
  width: 400px;
  height: 400px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

.ambient-glow-2 {
  position: absolute;
  bottom: 10%;
  right: 15%;
  width: 400px;
  height: 400px;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 800px;
  z-index: 1;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.greeting-container {
  height: 35vh;
  min-height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  perspective: 1000px;
}

.animated-greeting {
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 1;
  transform: scale(1) translateZ(0);
  filter: drop-shadow(0 0 50px rgba(99, 102, 241, 0.2));
  text-transform: uppercase;
}

.animated-greeting.fade-out {
  opacity: 0;
  transform: scale(0.7) rotateX(30deg) translateY(-30px);
}

.animated-greeting.fade-in {
  opacity: 0;
  transform: scale(1.3) rotateX(-30deg) translateY(30px);
}

h1 {
  font-size: 2.75rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
}

/* Main Panel */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input, textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: var(--glow-shadow);
  background: rgba(0, 0, 0, 0.4);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Button */
button {
  width: 100%;
  padding: 1rem;
  background: var(--accent-gradient);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

button:active {
  transform: translateY(0);
}

/* Message Feed */
.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.feed-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.25rem;
  animation: fadeIn 0.5s ease forwards;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.message-card:hover {
  transform: scale(1.01);
  border-color: rgba(99, 102, 241, 0.3);
}

.message-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.message-author {
  font-weight: 600;
  color: var(--text-primary);
}

.message-time {
  color: var(--text-secondary);
}

.message-content {
  color: var(--text-secondary);
  line-height: 1.5;
  word-wrap: break-word;
}

/* Status Notifications */
.status {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
  animation: slideDown 0.3s ease;
}

.status.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.status.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Setup Config Banner */
.setup-banner {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #fde68a;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.setup-banner code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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