:root {
  --bg-color: #000000;
  --text-color: #f5f5f7;
  --accent-color: #0a84ff;
  --gray-dark: #1c1c1e;
  --gray-light: #2c2c2e;
  --keyboard-bg: #1c1c1e; /* iOS Dark Keyboard */
  --key-bg: #47474a;
  --key-text: #ffffff;
  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Monaco", "Courier New", monospace;
  --phone-bezel: #1f1f1f;
  --phone-frame: #2d2d2d;
}

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

body {
  font-family: var(--font-main);
  background-color: #0d1117; /* Keep site background distinct from phone */
  color: #c9d1d9;
  line-height: 1.6;
}

/* --- Layout --- */

header {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

header h1 {
  font-size: 2.5rem;
  color: #fff;
}

.subtitle {
  color: #8b949e;
  margin-bottom: 2rem;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* --- Phone Mockup --- */

.phone-container {
  width: 375px;
  height: 812px; /* iPhone X/11/12/13 Pro dimensions roughly */
  background-color: #000;
  border-radius: 40px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5), 0 0 0 12px var(--phone-frame);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 2rem auto;
  font-family: var(--font-main);
  border: 4px solid #000; /* Inner black bezel */
}

/* Status Bar */
.status-bar {
  height: 44px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  z-index: 10;
}

.notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 32px;
  background-color: #000;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  z-index: 20;
}

/* App Header */
.app-header {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background-color: #1c1c1e;
  color: #0a84ff;
  font-weight: 500;
  border-bottom: 1px solid #2c2c2e;
}

.app-title {
  color: white;
  font-weight: 600;
}

/* Editor Area */
.editor {
  flex: 1;
  background-color: #000;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: #fff;
  overflow-y: auto;
  white-space: pre;
}

.line-num {
  color: #555;
  margin-right: 12px;
  display: inline-block;
  width: 20px;
  text-align: right;
  user-select: none;
}

.keyword { color: #ff2d55; } /* Pink/Red */
.func { color: #0a84ff; } /* Blue */
.string { color: #30d158; } /* Green */
.num { color: #bf5af2; } /* Purple */
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: #0a84ff;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

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

/* Context Control Bar */
.control-bar {
  height: 48px;
  background-color: #1c1c1e; /* Slightly lighter than black */
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow-x: auto;
  border-top: 1px solid #2c2c2e;
  /* Hide scrollbar */
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.control-bar::-webkit-scrollbar { display: none; }

.suggestion {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 6px 14px;
  border-radius: 8px;
  margin-right: 8px;
  font-size: 15px;
  white-space: nowrap;
  font-weight: 400;
}
.suggestion.primary {
  background-color: rgba(10, 132, 255, 0.2);
  color: #0a84ff;
}

/* iOS Keyboard Mockup */
.keyboard {
  height: 290px;
  background-color: var(--keyboard-bg);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-bottom: 30px; /* Home indicator space */
}

.kb-row {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  width: 100%;
}

.key {
  background-color: var(--key-bg);
  color: var(--key-text);
  border-radius: 5px;
  height: 42px;
  margin: 0 3px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  flex-grow: 1;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}

.key.wide { flex-grow: 1.5; background-color: #5d5d60; }
.key.space { flex-grow: 5; }
.key.action { background-color: #0a84ff; color: white; }

/* Home Indicator */
.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background-color: white;
  border-radius: 10px;
}

/* --- Doc Sections below phone --- */
.doc-content {
  max-width: 800px;
  padding: 4rem 1rem;
  width: 100%;
}

.doc-content h2 {
  font-size: 2rem;
  color: #fff;
  border-bottom: 1px solid #30363d;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
}

.doc-content p { margin-bottom: 1rem; }
.doc-content pre {
  background-color: #161b22;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  border: 1px solid #30363d;
  color: #e6edf3;
}
.doc-content a { color: #58a6ff; text-decoration: none; }
.doc-content a:hover { text-decoration: underline; }

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.feature-card {
  background-color: #161b22;
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid #30363d;
}
.feature-card h3 { color: #58a6ff; margin-bottom: 0.5rem; }

/* Responsive */
@media (max-width: 600px) {
  .phone-container {
    width: 100%;
    height: 700px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    margin: 0;
  }
}

footer {
  text-align: center;
  padding: 3rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  color: #c9d1d9; /* Lighter color for better visibility */
  font-size: 1rem; /* Slightly larger font size */
}
