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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(to bottom right, #111827, #000000, #111827);
  color: #ffffff;
  overflow-x: hidden;
}

/* Header Styles */
.header {
  border-bottom: 1px solid #1f2937;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-x: auto;
  overflow-y: hidden;
}

.header::-webkit-scrollbar {
  height: 6px;
}

.header::-webkit-scrollbar-track {
  background: rgba(17, 24, 39, 0.3);
}

.header::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 3px;
}

.header::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

.header-content {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: max-content;
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: #06b6d4;
}

.app-title {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(to right, #06b6d4, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.get-mrav-button {
  padding: 0.5rem 1rem;
  background: linear-gradient(to right, #06b6d4, #3b82f6);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.get-mrav-button:hover {
  background: linear-gradient(to right, #0891b2, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  font-size: 0.875rem;
  color: #9ca3af;
  padding: 0.375rem 0.75rem;
  background: rgba(31, 41, 55, 0.3);
  border-radius: 0.5rem;
  border: 1px solid #1f2937;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.status-pending {
  background: #eab308;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-dot.status-ready {
  background: #10b981;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-text {
  font-weight: 500;
  white-space: nowrap;
}

.status-icon {
  width: 16px;
  height: 16px;
  color: #10b981;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-button {
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.2s;
}

.icon-button:hover {
  background: #1f2937;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

/* Control Bar */
.control-bar {
  border-bottom: 1px solid #1f2937;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.control-bar-content {
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  transform: scale(1);
  color: white;
  font-size: 0.875rem;
}

.btn:hover {
  transform: scale(1.05);
}

.btn:active {
  transform: scale(0.95);
}

.btn-run {
  background: linear-gradient(to right, #10b981, #059669);
}

.btn-run:hover {
  background: linear-gradient(to right, #059669, #047857);
}

.btn-pause {
  background: linear-gradient(to right, #eab308, #ea580c);
}

.btn-pause:hover {
  background: linear-gradient(to right, #ca8a04, #dc2626);
}

.btn-reset {
  background: #4b5563;
}

.btn-reset:hover {
  background: #6b7280;
}

.cpu-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-label {
  color: #9ca3af;
}

.stat-value {
  font-family: 'Courier New', monospace;
  color: #06b6d4;
}

/* Banner Close Button */
.banner-close-button {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.banner-close-button:hover {
  background-color: #3a3a3a;
  color: #d4d4d4;
}

/* Main Content */
.main-content {
  display: flex;
  height: calc(100vh - 170px); /* Adjust height to accommodate header, banner, and control bar */
}

/* Editor Section */
.editor-panel {
  width: 60%;
  border-right: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
}

.panel-header {
  padding: 0.5rem 1rem;
  background: rgba(17, 24, 39, 0.5);
  border-bottom: 1px solid #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.panel-title svg {
  width: 16px;
  height: 16px;
  color: #9ca3af;
}

.file-name {
  font-size: 0.75rem;
  color: #6b7280;
}

.editor-container {
  flex: 1;
  background: rgba(3, 7, 18, 0.5);
  position: relative;
  overflow: hidden;
}

/* Right Panel */
.right-panel {
  width: 40%;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: transparent;
}

/* Registers Display (moved inside tabs.css, but keeping general styles here if needed) */
.registers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.register-item {
  background: rgba(31, 41, 55, 0.5);
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  transition: all 0.3s;
}

.register-item.active {
  border-color: rgba(6, 182, 212, 0.3);
}

.register-name {
  font-size: 0.75rem;
  font-family: 'Courier New', monospace;
  color: #9ca3af;
}

.register-value {
  font-size: 0.75rem;
  font-family: 'Courier New', monospace;
  color: #6b7280;
}

.register-value.active {
  color: #06b6d4;
}

/* Logs Section (moved inside tabs.css, but keeping general styles here if needed) */
.logs-header {
  padding: 0.5rem 1rem;
  background: rgba(17, 24, 39, 0.5);
  border-bottom: 1px solid #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clear-button {
  font-size: 0.75rem;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.clear-button:hover {
  color: #d1d5db;
}

.logs-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
}

.log-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: background 0.2s;
  animation: fadeIn 0.3s ease-out;
}

.log-entry:hover {
  background: rgba(31, 41, 55, 0.3);
}

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

.log-time {
  color: #6b7280;
  font-size: 0.75rem;
  white-space: nowrap;
}

.log-icon {
  flex-shrink: 0;
}

.log-message {
  flex: 1;
}

.log-info { color: #3b82f6; }
.log-success { color: #10b981; }
.log-warning { color: #eab308; }
.log-error { color: #ef4444; }

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(17, 24, 39, 0.5);
}

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

::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Monaco Editor Theme Override */
.monaco-editor {
  background: transparent !important;
}

.monaco-editor .margin {
  background: transparent !important;
}

.monaco-editor .monaco-editor-background {
  background: transparent !important;
}

/* Homepage Styles */
.home-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.home-content {
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.home-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.home-logo {
  width: 80px;
  height: 80px;
  color: #06b6d4;
  filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.home-title {
  font-size: 3rem;
  font-weight: bold;
  background: linear-gradient(to right, #06b6d4, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.home-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

.home-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.home-button.primary {
  background: linear-gradient(to right, #06b6d4, #3b82f6);
  color: white;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.home-button.primary:hover {
  background: linear-gradient(to right, #0891b2, #2563eb);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.5);
}

.home-button.secondary {
  background: rgba(31, 41, 55, 0.6);
  color: white;
  border-color: #06b6d4;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.2);
}

.home-button.secondary:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
}

.home-message {
  font-size: 1rem;
  color: #9ca3af;
  font-style: italic;
  margin: 0;
}

@media (max-width: 768px) {
  .home-title {
    font-size: 2rem;
  }

  .home-logo {
    width: 60px;
    height: 60px;
  }

  .home-button {
    font-size: 1rem;
    padding: 1rem 1.5rem;
  }
}
