/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #111;
  color: #0f0;
  transition: all 0.3s ease;
}

header {
  padding: 20px;
  text-align: center;
}

h1 {
  font-size: 2rem;
  font-weight: 500;
  text-shadow: 0 0 10px #0f0;
}

main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
}

.editor-container,
.visualizer-container {
  background-color: #222;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.editor-header,
.visualizer-header {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: #333;
}

.spacer {
  flex-grow: 1;
}

#editor {
  width: 100%;
  height: 300px;
  padding: 10px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  background-color: #111;
  color: #0f0;
  border: none;
  resize: none;
}

#visualizer {
  width: 100%;
  height: 300px;
}

.export-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #333;
}

button, select {
  padding: 5px 10px;
  background-color: transparent;
  color: #111;
  border: none;
  border-radius: 3px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover, select:hover {
  background-color: #111;
}

.icon-button {
  background: none;
  color: #0f0;
  font-size: 24px;
  margin-left: 10px;
}

input[type="range"] {
  margin: 0 10px;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #333;
}

#importFile {
  display: none;
}

#time {
  margin-right: 5px;
}

.ai-loading {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

.ai-loading::after {
  content: "🤖";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

#aiGenerate {
  padding: 5px 10px;
  font-size: 18px;
  margin-left: 5px;
  transition: transform 0.2s;
}

#aiGenerate:hover {
  transform: scale(1.1);
}

#aiGenerate:active {
  transform: scale(0.95);
}

/* Notification styles */
.notification {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(120%);
  transition: transform 0.3s ease-out;
  z-index: 1000;
  max-width: 300px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.notification.show {
  transform: translateX(0);
}

.notification-icon {
  font-size: 24px;
  animation: bounce 1s infinite;
}

.notification-content {
  flex-grow: 1;
}

.notification-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.notification-action {
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.notification-action:hover {
  background: white;
  color: black;
}

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

.notification.follow {
  border-left: 4px solid #00ff00;
}

.notification.like {
  border-left: 4px solid #ff0000;
}

/* Tutorial Styles */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1000;
  pointer-events: none;
}

.tutorial-overlay::before {
  content: '';
  position: absolute;
  top: var(--highlight-top);
  left: var(--highlight-left);
  width: var(--highlight-width);
  height: var(--highlight-height);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.tutorial-tooltip {
  position: fixed;
  background: #333;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 15px;
  max-width: min(300px, calc(100vw - 40px));
  z-index: 1001;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tutorial-tooltip h3 {
  margin: 0 0 10px 0;
  color: #fff;
  font-size: 1.2em;
}

.tutorial-tooltip p {
  margin: 0 0 15px 0;
  color: #ccc;
  font-size: 0.9em;
  line-height: 1.4;
}

.tutorial-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tutorial-controls button {
  padding: 5px 15px;
  border: 1px solid #555;
  border-radius: 4px;
  background: #444;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tutorial-controls button:hover {
  background: #555;
}

.tutorial-button {
  padding: 5px 10px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tutorial-button:hover {
  background: rgba(255, 255, 255, 0.1);
}