﻿/* ========== DESIGN SYSTEM ========== */
:root {
  /* Blues & Sachlich */
  --primary: #3b82f6;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --accent: #1d4ed8;
  
  /* Neutrals */
  --bg: #f9fafb;
  --bg-dark: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

/* ========== BASE STYLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ========== HEADER ========== */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideInDown var(--transition-slow);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.logo {
  height: 36px;
  width: auto;
  animation: fadeIn var(--transition-slow);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
}

.menu-toggle span {
  width: 24px;
  height: 2.5px;
  background: white;
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* ========== CONTAINER LAYOUT ========== */
.container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
}

main {
  flex: 1;
  padding: 2rem;
  animation: fadeIn var(--transition-slow);
}

/* ========== SIDEBAR ========== */
.sidebar {
  width: 250px;
  background: white;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1rem 0;
  animation: slideInLeft var(--transition-slow);
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav li {
  margin: 0;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.sidebar nav a:hover {
  background: var(--bg-dark);
  color: var(--primary);
  border-left-color: var(--primary);
}

.sidebar nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.sidebar nav svg {
  width: 20px;
  height: 20px;
}

.sidebar nav span {
  font-size: 0.95rem;
}

/* ========== TYPOGRAPHY ========== */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
  animation: slideInDown var(--transition-slow);
}

h1 span {
  color: var(--primary);
}

h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1rem 0 0.5rem;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ========== SECTIONS ========== */
.section {
  margin: 2rem 0;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  animation: fadeIn var(--transition-slow);
}

.section-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.section-box p {
  margin-bottom: 0.8rem;
}

.section-box p:last-child {
  margin-bottom: 0;
}

.fade-in {
  animation: fadeIn var(--transition-slow);
}

/* ========== BUTTONS ========== */
button, .btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

button:hover, .btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

button:active, .btn-primary:active {
  transform: translateY(0);
}

button:disabled {
  background: var(--text-light);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ========== GRID LAYOUTS ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  animation: slideInUp var(--transition);
}

.card a {
  display: block;
  padding: 2rem;
  color: inherit;
  text-decoration: none;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.card h3 {
  color: var(--primary);
  margin: 1rem 0 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ========== STEPS ========== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.step {
  text-align: center;
  animation: fadeIn var(--transition-slow);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: bounce 2s ease-in-out infinite;
}

.step h4 {
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.9rem;
}

.steps-detailed {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.step-card {
  background: white;
  border: 2px solid var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 8px;
  transition: all var(--transition);
  animation: slideInUp var(--transition);
}

.step-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.step-header .step-num {
  flex-shrink: 0;
}

.step-header h3 {
  margin: 0;
  color: var(--text-primary);
}

/* ========== INPUTS & FORMS ========== */
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition);
  margin-bottom: 1rem;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.contact-form {
  background: var(--bg-dark);
  padding: 2rem;
  border-radius: 12px;
  max-width: 600px;
}

/* ========== DOWNLOAD LIST ========== */
.download-list {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.download-item {
  background: white;
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition);
}

.download-item:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
}

.download-item button {
  flex-shrink: 0;
  margin-left: 1rem;
}

/* ========== CHAT INTERFACE ========== */
.chat-container {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 500px;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.chat-message {
  display: flex;
  gap: 0.5rem;
  animation: slideInUp var(--transition);
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-bubble {
  background: var(--bg-dark);
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 0.95rem;
}

.chat-message.user .chat-bubble {
  background: var(--primary);
  color: white;
}

.chat-message.ai .chat-bubble {
  background: var(--primary-light);
  color: var(--text-primary);
  border: 1px solid var(--primary);
}

.chat-typing {
  display: flex;
  gap: 4px;
  align-items: center;
}

.chat-typing span {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: typing 0.6s infinite;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: white;
  border-top: 1px solid var(--border);
}

.chat-input-area textarea {
  flex: 1;
  resize: none;
  height: 50px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
}

.chat-input-area textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chat-send-btn {
  width: 50px;
  height: 50px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  margin: 0;
}

/* ========== UPLOAD AREA ========== */
.upload-area {
  border: 2px dashed var(--primary);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--primary-light);
  animation: fadeIn var(--transition-slow);
}

.upload-area:hover {
  background: white;
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.upload-area p {
  margin: 0;
  color: var(--text-secondary);
}

#fileInput {
  display: none;
}

/* ========== FOOTER ========== */
footer {
  display: flex;
  gap: 2rem;
  justify-content: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  background: var(--bg);
  animation: slideInUp var(--transition-slow);
}

footer a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
  font-size: 0.9rem;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: none;
    animation: none;
  }

  .sidebar.active {
    display: block;
    animation: slideInDown var(--transition);
  }

  .menu-toggle {
    display: flex;
  }

  h1 {
    font-size: 1.8rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  main {
    padding: 1rem;
  }

  .section {
    padding: 1.5rem;
  }

  .chat-container {
    height: 400px;
  }

  .chat-bubble {
    max-width: 95%;
  }

  footer {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .section {
    padding: 1rem;
    margin: 1rem 0;
  }

  .grid {
    gap: 1rem;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step-header {
    flex-direction: column;
    text-align: center;
  }

  main {
    padding: 0.5rem;
  }

  .download-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .download-item button {
    margin-left: 0;
    margin-top: 1rem;
    width: 100%;
  }

  footer {
    flex-direction: column;
    padding: 1rem;
  }
}
