/* Sandbox page styles */

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

body {
  font-family: 'Inter', sans-serif;
  background: #1e1e1e;
  color: #e0e0e0;
  line-height: 1.6;
}

.container-sandbox {
  display: grid;
  grid-template-columns: 250px 1fr 300px;
  height: 100vh;
  gap: 1px;
  background: #121212;
  position: relative;
}

/* Mobile menu toggle buttons */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 10px;
  z-index: 100;
  background: #2d2d2d;
  border: 1px solid #3e3e42;
  color: #e0e0e0;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.mobile-toggle.left {
  left: 10px;
}

.mobile-toggle.right {
  right: 10px;
}

/* Left Sidebar - Challenge */
.sidebar-left {
  background: #252526;
  border-right: 1px solid #3e3e42;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.challenge-header {
  margin-bottom: 20px;
}

.challenge-header h2 {
  font-size: 14px;
  color: #4ec9b0;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 600;
}

.challenge-title {
  font-size: 16px;
  font-weight: 700;
  color: #e0e0e0;
  margin-bottom: 12px;
}

.challenge-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}

.badge {
  background: #3c3c3c;
  padding: 4px 8px;
  border-radius: 3px;
  color: #858585;
}

.badge.difficulty-1 { background: #4ec9b0; color: #000; }
.badge.difficulty-2 { background: #ce9178; color: #000; }

.challenge-description {
  font-size: 13px;
  color: #a0a0a0;
  margin-bottom: 16px;
  line-height: 1.5;
}

.section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #858585;
  margin-top: 16px;
  margin-bottom: 8px;
}

.criteria-list {
  font-size: 12px;
  color: #a0a0a0;
  list-style: none;
}

.criteria-list li {
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
}

.criteria-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4ec9b0;
}

.btn-hint {
  background: #0e639c;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-top: auto;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-hint:hover {
  background: #1177bb;
}

/* Challenge List Styles */
#challenge-list {
  display: none;
  margin-bottom: 20px;
  max-height: 40vh;
  overflow-y: auto;
}

.challenges-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.challenge-category {
  margin-bottom: 12px;
}

.challenge-category h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #858585;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.category-challenges {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.challenge-item {
  background: transparent;
  border: 1px solid #3e3e42;
  color: #a0a0a0;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.challenge-item:hover {
  background: #2d2d2d;
  border-color: #4ec9b0;
  color: #e0e0e0;
}

.challenge-item.current {
  background: rgba(78, 201, 176, 0.1);
  border-color: #4ec9b0;
  color: #4ec9b0;
}

.challenge-item.completed {
  opacity: 0.7;
}

.challenge-item .difficulty {
  font-size: 8px;
  color: #858585;
}

.challenge-item .difficulty.difficulty-1 { color: #4ec9b0; }
.challenge-item .difficulty.difficulty-2 { color: #ce9178; }
.challenge-item .difficulty.difficulty-3 { color: #f48771; }

.challenge-item .title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.challenge-item .badge {
  background: #4ec9b0;
  color: #000;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 600;
}

/* Center Panel - Editor */
.editor-panel {
  background: #1e1e1e;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #3e3e42;
  min-height: 0;
  overflow: hidden;
  height: 100%;
}

.editor-toolbar {
  background: #2d2d2d;
  border-bottom: 1px solid #3e3e42;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
  flex-grow: 0;
}

.editor-title {
  color: #cccccc;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.tab {
  background: #2d2d2d;
  border: 1px solid #3e3e42;
  border-bottom: none;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 12px;
  color: #858585;
  border-radius: 3px 3px 0 0;
}

.tab.active {
  background: #1e1e1e;
  color: #e0e0e0;
  border-color: #3e3e42 #3e3e42 #1e1e1e #3e3e42;
}

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

.btn-run {
  background: #4ec9b0;
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: background 0.2s;
}

.btn-run:hover {
  background: #5ed9c0;
}

.btn-run:disabled {
  background: #3c3c3c;
  color: #858585;
  cursor: not-allowed;
}

.btn-dashboard {
  background: #3c3c3c;
  color: #e0e0e0;
  border: 1px solid #5a5a5a;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-dashboard:hover {
  background: #4a4a4a;
  border-color: #6a6a6a;
}

.btn-submit {
  background: #0e639c;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
}

.btn-submit:hover {
  background: #1177bb;
}

.editor-container {
  flex: 1 1 0;
  min-height: 200px;
  max-height: none;
  overflow: hidden;
  position: relative;
}

#monaco-editor {
  width: 100%;
  height: 100%;
}

/* Resizable splitter */
.resizer {
  background: #3e3e42;
  cursor: row-resize;
  height: 4px;
  position: relative;
  user-select: none;
  transition: background 0.2s;
  flex-shrink: 0;
  flex-grow: 0;
}

.resizer:hover {
  background: #4ec9b0;
}

.resizer::before {
  content: '⋮';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #858585;
  font-size: 12px;
  line-height: 1;
}

.resizer:hover::before {
  color: #4ec9b0;
}

.results-panel {
  background: #2d2d2d;
  border-top: 1px solid #3e3e42;
  height: 350px;
  min-height: 200px;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: auto;
  padding: 12px 16px;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  flex-grow: 0;
}

.results-content {
  display: none;
}

.results-content.active {
  display: block;
}

.results-content.show {
  display: block;
}

.result-error {
  color: #f48771;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  table-layout: fixed;
}

.result-table thead,
.result-table tbody {
  display: table;
  width: 100%;
  min-width: 600px;
  table-layout: fixed;
}

.result-table thead {
  width: calc(100% - 0px);
}

.result-table tbody {
  width: calc(100% - 0px);
}

.result-table th {
  background: #3c3c3c;
  color: #4ec9b0;
  padding: 6px 8px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid #3e3e42;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #3e3e42;
  color: #a0a0a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-table tr:hover {
  background: #3c3c3c;
}

/* Right Sidebar - Schema */
.sidebar-right {
  background: #252526;
  border-left: 1px solid #3e3e42;
  overflow-y: auto;
  padding: 16px;
  transition: transform 0.3s ease;
}

.schema-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #4ec9b0;
  margin-bottom: 12px;
}

.table-item {
  background: #2d2d2d;
  border: 1px solid #3e3e42;
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

.table-name {
  background: #3c3c3c;
  padding: 8px;
  font-weight: 600;
  color: #ce9178;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
}

.table-name:hover {
  background: #454545;
}

.table-columns {
  display: none;
  padding: 8px;
  font-size: 11px;
}

.table-columns.open {
  display: block;
}

.column {
  padding: 4px 0;
  color: #a0a0a0;
}

.column-name {
  color: #4ec9b0;
  font-weight: 600;
}

.column-type {
  color: #858585;
  font-size: 10px;
  margin-left: 4px;
}

/* Success Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #252526;
  border: 1px solid #3e3e42;
  border-radius: 6px;
  padding: 24px;
  max-width: 400px;
  text-align: center;
}

.modal-content h3 {
  font-size: 20px;
  color: #4ec9b0;
  margin-bottom: 12px;
}

.modal-content p {
  color: #a0a0a0;
  margin-bottom: 16px;
  font-size: 14px;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-primary {
  background: #4ec9b0;
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.module-intro-persona {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  padding: 20px;
  background: #2d2d2d;
  border-radius: 8px;
  border-left: 4px solid #4ec9b0;
}

.module-intro-persona-avatar {
  font-size: 48px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3c3c3c;
  border-radius: 50%;
}

.module-intro-persona-info h4 {
  color: #4ec9b0;
  font-size: 18px;
  margin-bottom: 4px;
}

.module-intro-persona-info p {
  color: #858585;
  font-size: 14px;
  margin: 0;
}

.module-intro-description {
  color: #a0a0a0;
  line-height: 1.8;
  margin: 20px 0;
  font-size: 15px;
}

.module-intro-features {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.module-intro-features h4 {
  color: #4ec9b0;
  font-size: 16px;
  margin-bottom: 12px;
}

.module-intro-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.module-intro-features li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: #a0a0a0;
  font-size: 14px;
}

.module-intro-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #4ec9b0;
  font-weight: bold;
}

.btn-secondary {
  background: #3c3c3c;
  color: #e0e0e0;
  border: 1px solid #3e3e42;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #3c3c3c;
  border-top-color: #4ec9b0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a0a0a0;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .container-sandbox {
    grid-template-columns: 200px 1fr 250px;
  }
}

@media (max-width: 968px) {
  .container-sandbox {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .mobile-toggle {
    display: block;
  }

  .sidebar-left {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
  }

  .sidebar-left.open {
    transform: translateX(0);
  }

  .sidebar-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    z-index: 200;
    transform: translateX(100%);
    box-shadow: -2px 0 10px rgba(0,0,0,0.5);
  }

  .sidebar-right.open {
    transform: translateX(0);
  }

  .editor-panel {
    grid-column: 1;
    grid-row: 1 / -1;
  }

  .editor-toolbar {
    padding: 8px 12px;
  }

  .btn-run, .btn-submit {
    padding: 6px 12px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .container-sandbox {
    height: 100vh;
  }

  .sidebar-left {
    width: 100%;
  }

  .sidebar-right {
    width: 100%;
  }

  .editor-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .editor-actions {
    width: 100%;
    justify-content: stretch;
  }

  .btn-run, .btn-submit {
    flex: 1;
    padding: 10px;
    font-size: 12px;
  }

  .results-panel {
    height: 200px !important;
    min-height: 120px;
    max-height: 50vh !important;
    font-size: 11px;
  }

  .resizer {
    height: 6px;
  }

  .challenge-header h2 {
    font-size: 12px;
  }

  .challenge-title {
    font-size: 14px;
  }

  .challenge-description {
    font-size: 12px;
  }

  .modal-content {
    max-width: 90%;
    padding: 20px;
    margin: 20px;
  }

  .module-intro-persona {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .mobile-toggle {
    padding: 6px 10px;
    font-size: 12px;
    top: 5px;
  }

  .mobile-toggle.left {
    left: 5px;
  }

  .mobile-toggle.right {
    right: 5px;
  }

  .editor-toolbar {
    padding: 6px 8px;
  }

  .tab {
    padding: 6px 12px;
    font-size: 11px;
  }

  .results-panel {
    padding: 8px 12px;
    height: 150px !important;
    min-height: 100px;
    max-height: 40vh !important;
  }

  .resizer {
    height: 8px;
  }

  .result-table {
    font-size: 10px;
  }

  .result-table th,
  .result-table td {
    padding: 4px 6px;
  }
}

/* Overlay for mobile sidebars */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 150;
}

.sidebar-overlay.show {
  display: block;
}

@media (max-width: 968px) {
  .sidebar-overlay.show {
    display: block;
  }
}

/* Guided Tour Styles */
.tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: none;
  pointer-events: none;
}

.tour-overlay.active {
  display: block;
}

.tour-highlight {
  position: absolute;
  border: 3px solid #4ec9b0;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 20px rgba(78, 201, 176, 0.5);
  pointer-events: none;
  z-index: 1001;
  transition: all 0.3s ease;
}

.tour-popup {
  position: fixed;
  background: #252526;
  border: 2px solid #4ec9b0;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  z-index: 1002;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: tourPopupSlide 0.3s ease-out;
  pointer-events: all;
}

@keyframes tourPopupSlide {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tour-popup h3 {
  color: #4ec9b0;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-popup p {
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.tour-popup .tour-step-indicator {
  color: #858585;
  font-size: 12px;
  margin-bottom: 16px;
  text-align: center;
}

.tour-popup .tour-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.tour-popup button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tour-popup .btn-skip {
  background: #3c3c3c;
  color: #858585;
}

.tour-popup .btn-skip:hover {
  background: #4c4c4c;
  color: #e0e0e0;
}

.tour-popup .btn-prev {
  background: #3c3c3c;
  color: #e0e0e0;
}

.tour-popup .btn-prev:hover {
  background: #4c4c4c;
}

.tour-popup .btn-next {
  background: #4ec9b0;
  color: #1e1e1e;
}

.tour-popup .btn-next:hover {
  background: #5dd9c0;
}

.tour-popup .btn-finish {
  background: #4ec9b0;
  color: #1e1e1e;
}

.tour-popup .btn-finish:hover {
  background: #5dd9c0;
}

/* Arrow pointer for tour popup */
.tour-popup::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 10px solid transparent;
}

.tour-popup.arrow-top::before {
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: #4ec9b0;
}

.tour-popup.arrow-bottom::before {
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: #4ec9b0;
}

.tour-popup.arrow-left::before {
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: #4ec9b0;
}

.tour-popup.arrow-right::before {
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: #4ec9b0;
}

/* Responsive tour popup */
@media (max-width: 768px) {
  .tour-popup {
    max-width: 90%;
    padding: 20px;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  .tour-popup::before {
    display: none; /* Hide arrows on mobile */
  }

  .tour-popup h3 {
    font-size: 16px;
  }

  .tour-popup p {
    font-size: 13px;
  }

  .tour-popup button {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Discussion Button */
.btn-discussion {
  background: #0e639c;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 12px;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-discussion:hover {
  background: #1177bb;
}

/* Discussion Modal */
.discussion-modal-content {
  max-width: 600px;
  width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.discussion-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #3e3e42;
}

.discussion-modal-header h3 {
  margin: 0;
  color: #4ec9b0;
  font-size: 20px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #858585;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.modal-close-btn:hover {
  background: #3c3c3c;
  color: #e0e0e0;
}

.discussion-box {
  background: #2d2d2d;
  border: 1px solid #3e3e42;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 16px;
  max-height: 300px;
  overflow-y: auto;
  min-height: 100px;
  flex: 1;
}

.discussion-list {
  font-size: 12px;
  color: #a0a0a0;
  line-height: 1.5;
}

.discussion-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(62, 62, 66, 0.5);
}

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

.discussion-author {
  color: #4ec9b0;
  font-weight: 600;
  font-size: 11px;
  margin-bottom: 4px;
}

.discussion-text {
  color: #e0e0e0;
  font-size: 12px;
  word-wrap: break-word;
}

.discussion-time {
  color: #858585;
  font-size: 10px;
  margin-top: 4px;
}

.discussion-input-section {
  margin-bottom: 16px;
}

.discussion-input {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid #3e3e42;
  border-radius: 4px;
  padding: 8px;
  color: #e0e0e0;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  resize: vertical;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.discussion-input:focus {
  outline: none;
  border-color: #4ec9b0;
}

.discussion-input::placeholder {
  color: #858585;
}

.discussion-button {
  width: 100%;
  background: #4ec9b0;
  color: #000;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s;
}

.discussion-button:hover {
  background: #5ed9c0;
}

.discussion-button:disabled {
  background: #3c3c3c;
  color: #858585;
  cursor: not-allowed;
}

/* PRO Upgrade Box */
.pro-upgrade-box {
  background: linear-gradient(135deg, rgba(78, 201, 176, 0.1) 0%, rgba(78, 201, 176, 0.05) 100%);
  border: 2px solid rgba(78, 201, 176, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.pro-upgrade-title {
  color: #4ec9b0;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pro-upgrade-subtitle {
  color: #e0e0e0;
  font-size: 13px;
  margin-bottom: 12px;
}

.pro-upgrade-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pro-upgrade-list li {
  color: #a0a0a0;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 10px;
  padding-left: 0;
}

.pro-upgrade-list li strong {
  color: #4ec9b0;
}

.pro-upgrade-detail {
  display: block;
  color: #858585;
  font-size: 11px;
  margin-top: 2px;
  font-style: italic;
}

/* ================================
   DISCUSSION SYSTEM
   ================================ */

/* Discussion Button */
.btn-discussion {
  background: #0e639c;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 12px;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-discussion:hover {
  background: #1177bb;
}

/* Discussion Modal */
.discussion-modal-content {
  max-width: 600px;
  width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.discussion-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #3e3e42;
}

.discussion-modal-header h3 {
  margin: 0;
  color: #4ec9b0;
  font-size: 20px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #858585;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.modal-close-btn:hover {
  background: #3c3c3c;
  color: #e0e0e0;
}

.discussion-box {
  background: #1e1e1e;
  border: 1px solid #3e3e42;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 16px;
  max-height: 400px;
  overflow-y: auto;
  min-height: 100px;
  flex: 1;
}

/* Scrollbar matching sandbox style */
.discussion-box::-webkit-scrollbar {
  width: 6px;
}

.discussion-box::-webkit-scrollbar-thumb {
  background: #3e3e42;
  border-radius: 3px;
}

.discussion-list {
  font-size: 12px;
  color: #a0a0a0;
  line-height: 1.5;
}

/* Reddit-style post */
.discussion-post {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(62, 62, 66, 0.3);
}

.discussion-post:last-child {
  border-bottom: none;
}

/* Vote section (left side) */
.discussion-vote-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 30px;
  padding-top: 4px;
}

.vote-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  color: #858585;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vote-btn:hover {
  color: #4ec9b0;
}

.vote-arrow {
  font-size: 14px;
  line-height: 1;
}

.vote-count {
  font-size: 12px;
  font-weight: 600;
  color: #858585;
  min-width: 20px;
  text-align: center;
}

/* Content section (right side) */
.discussion-content {
  flex: 1;
  min-width: 0;
}

.discussion-text {
  color: #e0e0e0;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
  margin-bottom: 6px;
}

.discussion-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.reply-btn {
  background: transparent;
  border: none;
  color: #858585;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.2s;
}

.reply-btn:hover {
  color: #4ec9b0;
}

/* Reply form */
.reply-form {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(62, 62, 66, 0.3);
}

.reply-input {
  width: 100%;
  background: #252526;
  border: 1px solid #3e3e42;
  border-radius: 4px;
  padding: 6px 8px;
  color: #e0e0e0;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  resize: vertical;
  margin-bottom: 6px;
  box-sizing: border-box;
}

.reply-input:focus {
  outline: none;
  border-color: #4ec9b0;
}

.reply-input::placeholder {
  color: #858585;
}

.reply-buttons {
  display: flex;
  gap: 8px;
}

.reply-submit-btn {
  background: #4ec9b0;
  color: #000;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: background 0.2s;
}

.reply-submit-btn:hover {
  background: #5ed9c0;
}

.reply-cancel-btn {
  background: transparent;
  color: #858585;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: color 0.2s;
}

.reply-cancel-btn:hover {
  color: #e0e0e0;
}

/* Replies container (nested) */
.replies-container {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid rgba(78, 201, 176, 0.2);
}

.discussion-reply {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  margin-bottom: 8px;
}

.discussion-reply:last-child {
  margin-bottom: 0;
}

.discussion-reply .discussion-vote-section {
  min-width: 24px;
}

.discussion-reply .discussion-text {
  font-size: 12px;
  color: #a0a0a0;
}

.discussion-input-section {
  margin-bottom: 16px;
}

.discussion-input {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid #3e3e42;
  border-radius: 4px;
  padding: 8px;
  color: #e0e0e0;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  resize: vertical;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.discussion-input:focus {
  outline: none;
  border-color: #4ec9b0;
}

.discussion-input::placeholder {
  color: #858585;
}

.discussion-button {
  width: 100%;
  background: #4ec9b0;
  color: #000;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s;
}

.discussion-button:hover {
  background: #5ed9c0;
}

.discussion-button:disabled {
  background: #3c3c3c;
  color: #858585;
  cursor: not-allowed;
}

/* PRO Upgrade Box */
.pro-upgrade-box {
  background: linear-gradient(135deg, rgba(78, 201, 176, 0.1) 0%, rgba(78, 201, 176, 0.05) 100%);
  border: 2px solid rgba(78, 201, 176, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.pro-upgrade-title {
  color: #4ec9b0;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pro-upgrade-subtitle {
  color: #e0e0e0;
  font-size: 13px;
  margin-bottom: 12px;
}

.pro-upgrade-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pro-upgrade-list li {
  color: #a0a0a0;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 10px;
  padding-left: 0;
}

.pro-upgrade-list li strong {
  color: #4ec9b0;
}

.pro-upgrade-detail {
  display: block;
  color: #858585;
  font-size: 11px;
  margin-top: 2px;
  font-style: italic;
}

/* MOBILE */
@media (max-width: 968px) {
  .discussion-modal-content {
    width: 95vw;
    max-height: 90vh;
  }

  .discussion-box {
    max-height: 240px;
  }
}
