/* === TaNeu Theme Grundfarben === */
:root {
  --primary-color: #66ccff;
  --secondary-color: #2a5298;
  --bg-dark: #1e3c72;
  --text-light: #a3b6c7;
  --shadow-color: rgba(102,204,255,0.4);
  --shadow-strong: rgba(102,204,255,0.8);
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Roboto", "Open Sans", Arial, sans-serif;
  background: url('https://static.taneu.de/images/bg/taneu_bg_01.webp') repeat;
  color: var(--text-light);
  overflow-x: hidden;
}

header {
  background: url('https://static.taneu.de/images/bg/taneu_bg_02.webp') repeat;
  border-bottom: 2px solid var(--shadow-color);
  box-shadow: 0 0 15px var(--shadow-color);
  text-align: center;
  padding: 10px;
}

.site-logo {
  width: 120px;
  border-radius: 12px;
  box-shadow: 0 0 10px var(--shadow-color);
}

.site-title {
  font-size: 2rem;
  color: var(--primary-color);
  text-shadow: 0 0 8px var(--shadow-color);
  margin: 10px 0;
}

.page-container {
  max-width: 1000px;
  margin: 40px auto;
  background: rgba(30, 60, 114, 0.95);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 0 25px var(--shadow-color);
}

h2 {
  text-align: center;
  color: var(--primary-color);
  text-shadow: 0 0 8px var(--shadow-color);
}

.description {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 25px;
}

/* === Tabs === */
.tab-buttons {
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--shadow-color);
}

.tab {
  background: transparent;
  border: 1px solid var(--primary-color);
  border-radius: 10px;
  color: var(--primary-color);
  font-weight: bold;
  padding: 8px 16px;
  margin: 0 5px;
  cursor: pointer;
  transition: all 0.3s;
}

.tab.active,
.tab:hover {
  background: var(--primary-color);
  color: #0b0b0b;
  box-shadow: 0 0 10px var(--shadow-color);
}

/* === Action Buttons === */
.action-buttons {
  text-align: center;
  margin: 15px 0 25px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--shadow-color);
}

.action-buttons button {
  background: var(--primary-color);
  border: none;
  border-radius: 10px;
  color: #0b0b0b;
  font-weight: bold;
  margin: 5px;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px var(--shadow-color);
}

.action-buttons button:hover {
  background: var(--secondary-color);
  color: #fff;
  box-shadow: 0 0 15px var(--shadow-strong);
}

/* === Editor Layout === */
.editor-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.editor-box {
  width: 90%;
  max-width: 900px;
  height: 300px;
  display: none;
}

.editor-box.active {
  display: block;
}

.CodeMirror {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  box-shadow: 0 0 15px var(--shadow-color);
  font-size: 15px;
}

iframe#preview {
  width: 90%;
  max-width: 900px;
  height: 400px;
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  margin-top: 25px;
  box-shadow: 0 0 15px var(--shadow-color);
  background: #fff;
}

/* === Toast System === */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  background: rgba(30, 60, 114, 0.95);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  padding: 12px 18px;
  margin-top: 10px;
  box-shadow: 0 0 10px var(--shadow-color);
  font-weight: 500;
  font-family: "Inter", sans-serif;
  animation: slideIn 0.4s ease-out;
}

.toast a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.toast a:hover {
  text-decoration: underline;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* === AutoSave Icon === */
.autosave-icon {
  position: fixed;
  bottom: 20px;
  right: 25px;
  background: rgba(30, 60, 114, 0.95);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 10px var(--shadow-color);
  opacity: 0.8;
  transition: all 0.3s ease;
  z-index: 9998;
  animation: autosavePulse 3s infinite ease-in-out;
}

@keyframes autosavePulse {
  0% { box-shadow: 0 0 8px rgba(102,204,255,0.3); transform: scale(1.0); }
  50% { box-shadow: 0 0 20px rgba(102,204,255,0.6); transform: scale(1.05); }
  100% { box-shadow: 0 0 8px rgba(102,204,255,0.3); transform: scale(1.0); }
}

.autosave-icon.active {
  background: var(--primary-color);
  color: #0b0b0b;
  opacity: 1;
  animation: none;
  transform: scale(1.15);
  box-shadow: 0 0 20px var(--shadow-strong);
}

/* === Footer === */
footer {
  background: var(--bg-dark);
  color: #fff;
  text-align: center;
  padding: 15px;
  border-top: 2px solid var(--shadow-color);
  box-shadow: 0 -2px 12px var(--shadow-color);
  font-size: 0.95rem;
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* === Responsive Design === */
@media (max-width: 700px) {
  .editor-box, iframe#preview {
    width: 100%;
    height: 300px;
  }
  .action-buttons button {
    width: 100%;
    margin: 5px 0;
  }
}
