:root {
  --bg-color: #ffffff;
  --text-primary: #0f0f0f;
  --text-secondary: #6e6e73;
  --border-color: #e5e5e7;
  --input-bg: #f5f5f7;
  --accent-color: #000000;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.06);
  --radius-lg: 24px;
  --radius-md: 12px;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.top-bar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text-primary);
}

.top-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.icon-btn:hover {
  background: var(--input-bg);
  color: var(--text-primary);
}

/* Main Layout */
.app-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.content-area {
  flex: 1;
  padding: 40px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Empty State / Initial View */
.hero-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Canvas / Result Area */
.canvas {
  width: 100%;
  margin-bottom: 40px;
  animation: fadeIn 0.4s ease-out;
}

.visual-block {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.visual-block h3 {
  margin-top: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.diagram-placeholder {
  width: 100%;
  height: 300px;
  background: var(--input-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.diagram-node {
  background: white;
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  position: absolute;
}

/* Input Section */
.input-container {
  padding: 24px;
  background: linear-gradient(to top, white 80%, rgba(255,255,255,0));
  position: sticky;
  bottom: 0;
  width: 100%;
}

.prompt-box {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 24px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.prompt-box:focus-within {
  border-color: #ccc;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
}

.prompt-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  color: var(--text-primary);
}

.prompt-input::placeholder {
  color: var(--text-secondary);
}

.btn-generate {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-left: 12px;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-generate:hover {
  opacity: 0.9;
}

.helper-text {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 16px;
}

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

/* Placeholders */
.placeholder-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Layout Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.list-item:last-child {
  border-bottom: none;
}
