/* Modern CSS Reset and Base Styles */
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: #1a202c;
  line-height: 1.6;
}

/* Glass morphism container */
.container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 3rem 2.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: relative;
  overflow: hidden;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 300% 100%;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Typography */
h1 {
  font-size: 2.75rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

label {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #2d3748;
  font-size: 1.1rem;
  display: block;
}

/* Modern input styling */
textarea {
  width: 100%;
  min-height: 160px;
  padding: 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  resize: vertical;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.95rem;
  background: #fafafa;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

textarea:focus {
  border-color: #667eea;
  background: #ffffff;
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(102, 126, 234, 0.1),
    0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Modern button styling */
button, a.button {
  align-self: flex-start;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 6px -1px rgba(102, 126, 234, 0.3),
    0 2px 4px -1px rgba(102, 126, 234, 0.06);
  margin-top: 0.5rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

button:hover, a.button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 10px 25px -5px rgba(102, 126, 234, 0.4),
    0 4px 6px -2px rgba(102, 126, 234, 0.1);
}

button:active, a.button:active {
  transform: translateY(0);
}

/* Button group styling */
.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.download-btn {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  box-shadow: 
    0 4px 6px -1px rgba(72, 187, 120, 0.3),
    0 2px 4px -1px rgba(72, 187, 120, 0.06);
}

.download-btn:hover {
  box-shadow: 
    0 10px 25px -5px rgba(72, 187, 120, 0.4),
    0 4px 6px -2px rgba(72, 187, 120, 0.1);
}

/* Tab container and ERD styling */
.tab-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.erd-box {
  overflow-x: auto;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  margin-bottom: 1rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

pre.mermaid {
  margin: 0;
  font-size: 1rem;
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Enhanced responsive design */
@media (max-width: 768px) {
  .container {
    margin: 1rem;
    padding: 2rem 1.5rem;
    gap: 2rem;
    border-radius: 20px;
  }
  
  h1 {
    font-size: 2.25rem;
  }
  
  textarea {
    font-size: 0.9rem;
    padding: 1rem;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  button, a.button {
    align-self: stretch;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    margin: 0.5rem;
    padding: 1.5rem 1rem;
  }
  
  h1 {
    font-size: 1.9rem;
  }
  
  textarea {
    min-height: 120px;
  }
}

/* Smooth animations for better UX */
* {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
button:focus-visible, a.button:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

textarea:focus-visible {
  outline: none;
}

/* Loading animation (can be used for future features) */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}