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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  height: 100vh;
  overflow: hidden;
  background-color: #f0f2f5;
}

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

body::-webkit-scrollbar-thumb {
  background-color: rgba(93, 180, 212, 0.4);
  border-radius: 4px;
}

body::-webkit-scrollbar-button {
  display: none;
}

.container {
  display: flex;
  height: 100vh;
  width: 100vw;
  gap: 2px;
  background-color: #5db4d4;
}

.left-panel {
  width: 50%;
  height: 100%;
  background-color: #ffffff;
  overflow: hidden;
  position: relative;
}

.left-panel::-webkit-scrollbar {
  width: 8px;
}

.left-panel::-webkit-scrollbar-thumb {
  background-color: rgba(93, 180, 212, 0.4);
  border-radius: 4px;
}

.left-panel::-webkit-scrollbar-button {
  display: none;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: #ffffff;
}

.right-panel {
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.code-section {
  height: 50%;
  padding: 20px;
  background-color: #ffffff;
  position: relative;
}

#code-editor {
  width: 100%;
  height: 100%;
  border: 1px solid #bee5eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#code-editor .cm-editor {
  height: 100%;
}

#code-editor .cm-scroller {
  font-family: "Fira Code", "Consolas", "Monaco", "Courier New", monospace;
}

#code-editor .cm-scroller::-webkit-scrollbar {
  width: 8px;
}

#code-editor .cm-scroller::-webkit-scrollbar-thumb {
  background-color: rgba(93, 180, 212, 0.4);
  border-radius: 4px;
}

#code-editor .cm-scroller::-webkit-scrollbar-button {
  display: none;
}

#code-editor .cm-focused {
  outline: none;
}

#code-editor:focus-within {
  border-color: #5db4d4;
  box-shadow: 0 0 0 3px rgba(93, 180, 212, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.helper-section {
  height: 50%;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
}

.helper-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: linear-gradient(to bottom, #d1ecf1, #bee5eb);
  border-bottom: 1px solid #a8d8ea;
}

.inspector-btn {
  padding: 10px 14px;
  background-color: #5db4d4;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(93, 180, 212, 0.3);
}

.inspector-btn:hover {
  background-color: #4aa3c2;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(93, 180, 212, 0.4);
}

.inspector-btn:active {
  transform: translateY(0);
}

.inspector-btn.active {
  background-color: #0c5460;
  box-shadow: 0 0 0 3px rgba(12, 84, 96, 0.2), 0 2px 6px rgba(12, 84, 96, 0.3);
}

.element-path {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 12px;
  min-height: 26.4px;
  color: #0c5460;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  border-radius: 8px;
}

.helper-content {
  flex: 1;
  overflow: auto;
  padding: 20px;
  background-color: #f8f9fa;
}

.helper-content::-webkit-scrollbar {
  width: 8px;
}

.helper-content::-webkit-scrollbar-thumb {
  background-color: rgba(93, 180, 212, 0.4);
  border-radius: 4px;
}

.helper-content::-webkit-scrollbar-button {
  display: none;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #0c5460;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #5db4d4;
  letter-spacing: 0.3px;
}

.computed-styles-section {
  margin-bottom: 20px;
}

.styles-list {
  background-color: #ffffff;
  border: 1px solid #d1ecf1;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.style-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 12px;
  transition: background-color 0.2s ease;
}

.style-item:hover {
  background-color: #f8f9fa;
  border-radius: 6px;
}

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

.style-property {
  font-weight: 600;
  color: #0c5460;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
}

.style-value {
  color: #495057;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  background-color: #f0f2f5;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  word-break: break-word;
}

.empty-state {
  color: #6c757d;
  font-size: 13px;
  font-style: italic;
  text-align: center;
  padding: 30px 20px;
  grid-column: 1 / -1;
}

.add-style-btn {
  grid-column: 1 / -1;
  padding: 12px;
  background-color: #5db4d4;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(93, 180, 212, 0.3);
  margin-top: 8px;
}

.add-style-btn:hover {
  background-color: #4aa3c2;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(93, 180, 212, 0.4);
}

.add-style-btn:active {
  transform: translateY(0);
}

.new-style-item {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  padding: 10px;
  background-color: #e7f6f9;
  border: 2px dashed #5db4d4;
}

.style-property-input,
.style-value-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #bee5eb;
  border-radius: 6px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 12px;
  background-color: white;
  transition: border-color 0.2s ease;
}

.style-property-input:focus,
.style-value-input:focus {
  outline: none;
  border-color: #5db4d4;
  box-shadow: 0 0 0 2px rgba(93, 180, 212, 0.15);
}

.style-property-input::placeholder,
.style-value-input::placeholder {
  color: #adb5bd;
  font-style: italic;
}

/* Split.js 스타일 조정 */
.gutter {
  transition: background-color 0.2s ease;
}

.gutter:hover {
  background-color: #4aa3c2 !important;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
  .container {
    flex-direction: column;
  }

  .left-panel,
  .right-panel {
    width: 100%;
    height: 50%;
  }

  .code-section,
  .helper-section {
    height: 50%;
  }
}

@media (max-width: 768px) {
  .preview-container {
    padding: 15px;
  }

  .code-section {
    padding: 12px;
  }

  .helper-toolbar {
    padding: 12px 15px;
  }

  .helper-content {
    padding: 15px;
  }

  #code-editor {
    font-size: 13px;
    padding: 12px 15px;
  }
}
