/* Modern Clean Design */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Modern Color Palette */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #64748b;
  --accent: #10b981;
  --accent-hover: #059669;

  /* Backgrounds */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;

  /* Text */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  /* Borders */
  --border-color: #e2e8f0;
  --border-radius: 12px;
  --border-radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-main);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Modern Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Headings */
h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

/* Modern Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: var(--accent);
  color: white;
}

.btn-success:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-warning {
  background: var(--secondary);
  color: white;
}

.btn-warning:hover {
  background: #475569;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Inputs */
input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: inherit;
  transition: all 0.2s ease;
  background: white;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Lists */
ul {
  list-style: none;
}

/* Links */
a {
  color: var(--primary);
  transition: color 0.2s ease;
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

/* Download Page */
.download-container {
  max-width: 600px;
  margin: 100px auto;
  padding: 3rem;
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 1px solid var(--border-color);
}

.download-container h1 {
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.preview-img {
  max-width: 300px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  margin: 1.5rem auto;
  border: 1px solid var(--border-color);
}

.btn-download {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-size: 1.125rem;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-top: 1.5rem;
}

.btn-download:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.info {
  color: var(--text-secondary);
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

/* Chat Styles */
.chat-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.chat-box {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.chat-header {
  background: var(--primary);
  padding: 1.5rem;
  text-align: center;
  color: white;
}

.chat-header h1 {
  color: white;
  margin: 0;
  font-size: 1.875rem;
}

#tchat {
  list-style: none;
  padding: 1.5rem;
  margin: 0;
  min-height: 400px;
  max-height: 500px;
  overflow-y: auto;
  background: var(--bg-main);
}

#tchat li {
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  border-radius: var(--border-radius);
  background: white;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

#tchat li:hover {
  box-shadow: var(--shadow-md);
}

#tchat li strong {
  color: var(--primary);
  font-weight: 600;
}

#form {
  background: white;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  border-top: 1px solid var(--border-color);
}

#input {
  flex-grow: 1;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

#input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

#form button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

/* Fade in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.4s ease-out;
}