:root {
  --bg-primary: #f5f5f5;
  --bg-secondary: #e0e0e0;
  --bg-tertiary: #2d2d2d;
  --text-primary: #333;
  --text-secondary: #feeeee;
  --border-color: #ccc
}

.dark-mode {
  --bg-primary: #1e1e1e;
  --bg-secondary: #333;
  --bg-tertiary: #121212;
  --text-primary: #f0f0f0;
  --text-secondary: white;
  --border-color: #444
}

body {
  font-family: 'Fira Code', monospace;
  margin: 0;
  padding: 0;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: background 0.3s ease
}

.app-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh
}

.toolbar {
  display: flex;
  align-items: center;
  padding: 10px;
  background: var(--bg-tertiary);
  color: var(--text-secondary)
}

.logo {
  margin-right: 15px;
  border: 2px solid #0088ff;
  border-radius: 8px
}

.run {
  margin-left: auto;
  margin-right: 20px;
  padding: 5px 15px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer
}

a {
  position: absolute;
  top: 24px;
  left: 400px;
  -webkit-text-decoration: none;
  -moz-text-decoration: none;
  text-decoration: none;
  color: #ffffff;
  font-size: 16px;
  z-index: 10;
}

.theme-toggle {
  margin: 0 15px 0 50px;
  padding: 5px 10px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--text-secondary);
  border-radius: 4px;
  cursor: pointer
}

.headsHolder {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0
}

.heads {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color)
}

.heads h2 {
  margin: 0 20px 0 50px;
  font-size: 16px
}

.heads button {
  margin-left: 10px;
  padding: 3px 8px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  border-radius: 3px;
  cursor: pointer
}

.file-upload {
  position: relative;
  margin-left: 10px
}

.file-upload input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  left: 0;
  top: 0
}

.file-upload-btn {
  padding: 3px 8px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px
}

.container {
  display: flex;
  flex: 1;
  position: relative
}

.code-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden
}

.textarea {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% - 20px);
  height: 100%;
  padding: 10px;
  margin: 14px 0 0 14px;
  border: none;
  resize: none;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  letter-spacing: 2.5px;
  line-height: 1.715;
  background: transparent;
  color: transparent;
  caret-color: var(--text-primary);
  z-index: 2;
  tab-size: 2;
  -moz-tab-size: 2;
  white-space: wrap;
  overflow: scroll
}

pre {
  margin: 0;
  padding: 10px;
  height: 100%;
  background: var(--text-secondary);
  overflow: scroll;
  position: relative;
  word-wrap: wrap;
  z-index: 1
}

code {
  display: block;
  padding: 0 10px 0 10px;
  background: var(--text-secondary);
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  letter-spacing: .5px;
  line-height: 1.5;
  word-wrap: wrap;
  overflow: scroll
}

.html-code {
  border-right: 1px solid var(--border-color)
}

.css-code {
  border-right: 1px solid var(--border-color)
}

.iframe-container {
  flex: 1;
  display: none;
  background: white;
  position: absolute;
  top: 60px;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10
}

.frame {
  width: 100%;
  height: calc(100vh - 60px);
  border: none;
  overflow: auto
}

footer {
  padding: 10px;
  text-align: center;
  background: var(--bg-tertiary);
  color: var(--text-secondary)
}