/* Monaco Editor Page Styles */
.monaco-editor-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Editor Header */
.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 50px;
  background: #2d2d30;
  border-bottom: 1px solid #3e3e42;
}

.editor-tabs {
  display: flex;
  gap: 2px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: #cccccc;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px 4px 0 0;
}

.tab-btn:hover {
  background: #3e3e42;
  color: #ffffff;
}

.tab-btn.active {
  background: #1e1e1e;
  color: #ffffff;
  border-bottom: 2px solid #007acc;
}

.tab-btn i {
  font-size: 14px;
}

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

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #0e639c;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.action-btn:hover {
  background: #1177bb;
  transform: translateY(-1px);
}

.action-btn.save-btn {
  background: #007acc;
}

.action-btn.preview-btn {
  background: #1E7D7D;
}

.action-btn.publish-btn {
  background: #2A8B8B;
}

/* Editor Container */
.editor-container {
  flex: 1;
  display: flex;
  position: relative;
}

.editor-panel {
  display: none;
  flex: 1;
  flex-direction: column;
  background: #1e1e1e;
}

.editor-panel.active {
  display: flex;
}

.editor-panel.preview-panel {
  background: #ffffff;
}

.editor-header-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #2d2d30;
  border-bottom: 1px solid #3e3e42;
  height: 35px;
}

.editor-header-panel .file-name {
  font-size: 13px;
  color: #cccccc;
  font-weight: 500;
}

.editor-controls {
  display: flex;
  gap: 5px;
}

.control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: #cccccc;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: #3e3e42;
  color: #ffffff;
}

/* Monaco Editor */
.monaco-editor {
  flex: 1;
  min-height: 0;
}

/* Preview Panel */
.preview-container {
  flex: 1;
  position: relative;
  background: #ffffff;
}

#preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* Status Bar */
.editor-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 16px;
  height: 22px;
  background: #007acc;
  color: #ffffff;
  font-size: 12px;
}

.status-left,
.status-right {
  display: flex;
  gap: 16px;
}

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

.modal-content {
  background: #2d2d30;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

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

.close-btn {
  background: none;
  border: none;
  color: #cccccc;
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: #3e3e42;
  color: #ffffff;
}

.modal-body {
  padding: 24px;
}

.welcome-features {
  margin-bottom: 24px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: #3e3e42;
  border-radius: 6px;
}

.feature-item i {
  font-size: 24px;
  color: #1E7D7D;
  margin-top: 4px;
}

.feature-item h4 {
  margin: 0 0 8px 0;
  color: #ffffff;
  font-size: 16px;
}

.feature-item p {
  margin: 0;
  color: #cccccc;
  font-size: 14px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #1E7D7D;
  color: white;
}

.btn-primary:hover {
  background: #2A8B8B;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #3e3e42;
  color: #cccccc;
}

.btn-secondary:hover {
  background: #4e4e52;
  color: #ffffff;
}

/* Icons */
.icon-html::before { content: "🌐"; }
.icon-css::before { content: "🎨"; }
.icon-js::before { content: "⚡"; }
.icon-preview::before { content: "👁️"; }
.icon-save::before { content: "💾"; }
.icon-publish::before { content: "🚀"; }
.icon-format::before { content: "🔧"; }
.icon-fold::before { content: "📁"; }
.icon-refresh::before { content: "🔄"; }
.icon-external::before { content: "🔗"; }
.icon-code::before { content: "💻"; }
.icon-mobile::before { content: "📱"; }

/* Responsive Design */
@media (max-width: 768px) {
  .editor-header {
    padding: 0 10px;
    flex-direction: column;
    height: auto;
    gap: 10px;
  }
  
  .editor-tabs {
    width: 100%;
    justify-content: center;
  }
  
  .editor-actions {
    width: 100%;
    justify-content: center;
  }
  
  .tab-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .action-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .modal-header,
  .modal-body {
    padding: 16px;
  }
  
  .feature-item {
    flex-direction: column;
    text-align: center;
  }
  
  .modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .editor-tabs {
    flex-wrap: wrap;
  }
  
  .editor-actions {
    flex-wrap: wrap;
  }
  
  .tab-btn,
  .action-btn {
    flex: 1;
    min-width: 80px;
  }
}

/* Loading Animation */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #cccccc;
}

.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid #3e3e42;
  border-top: 2px solid #007acc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Auto-save indicator */
.auto-saving {
  color: #ffa500;
}

.auto-saved {
  color: #00ff00;
}

.auto-error {
  color: #ff4444;
}


