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

body {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  background: #0d1117;
  color: #c9d1d9;
  min-height: 100vh;
}

#app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.view {
  width: 100%;
  max-width: 500px;
}

.view.hidden {
  display: none;
}

#loading-view .card {
  min-width: 200px;
}

.loading-text {
  text-align: center;
  color: #8b949e;
  padding: 24px;
}

.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 32px;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #58a6ff;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #8b949e;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #c9d1d9;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

input::placeholder {
  color: #484f58;
}

.btn-primary {
  width: 100%;
  padding: 14px 24px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  background: #238636;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
}

.btn-primary:hover {
  background: #2ea043;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  padding: 10px 20px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  background: transparent;
  color: #58a6ff;
  border: 1px solid #30363d;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-top: 16px;
}

.btn-secondary:hover {
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.1);
}

.btn-secondary.hidden {
  display: none;
}

.folder-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.folder-actions .btn-secondary {
  flex: 1;
  margin-top: 0;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
}

.modal h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #c9d1d9;
}

.modal-text {
  font-size: 14px;
  color: #8b949e;
  margin-bottom: 16px;
}

.session-info {
  background: #0d1117;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #3fb950;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.modal-actions button {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

.modal-actions .btn-create {
  background: #238636;
  color: #fff;
  border: none;
}

.modal-actions .btn-create:hover {
  background: #2ea043;
}

.modal-actions .btn-cancel {
  background: transparent;
  color: #8b949e;
  border: 1px solid #30363d;
}

.modal-actions .btn-cancel:hover {
  border-color: #8b949e;
  color: #c9d1d9;
}

.error {
  color: #f85149;
  font-size: 13px;
  margin-top: 12px;
  min-height: 20px;
}

.path-display {
  font-size: 13px;
  color: #8b949e;
  background: #0d1117;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  word-break: break-all;
}

#folder-list {
  max-height: 300px;
  overflow-y: auto;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.folder-item:hover {
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.05);
}

.folder-item svg {
  width: 20px;
  height: 20px;
  color: #58a6ff;
  flex-shrink: 0;
}

.folder-item span {
  font-size: 14px;
  color: #c9d1d9;
}

.empty-message {
  text-align: center;
  color: #8b949e;
  padding: 24px;
  font-size: 13px;
}

.section-header {
  margin: 16px 0 8px 0;
}

.section-header h3 {
  font-size: 12px;
  font-weight: 600;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-item {
  border-color: #3fb950;
  background: rgba(63, 185, 80, 0.05);
}

.session-item:hover {
  border-color: #3fb950;
  background: rgba(63, 185, 80, 0.1);
}

.session-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #3fb950;
  background: rgba(63, 185, 80, 0.15);
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

#terminal-view {
  max-width: none;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0d1117;
  padding: 0;
  margin: 0;
}

#terminal-container {
  width: 100%;
  height: 100%;
  padding: 0;
}

#terminal-container .xterm {
  height: 100%;
  padding: 8px;
}

#terminal-container .xterm-viewport {
  overflow-y: auto;
}

#terminal-container .xterm {
  height: 100%;
}

#terminal-container .xterm-viewport {
  overflow-y: auto;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0d1117;
}

::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #484f58;
}