:root {
  --primary-color: #00d4ff;
  --secondary-color: #ff6b6b;
  --text-color: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.65);
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: #0a0a0a;
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  transition: transform 0.5s ease;
  animation: kenBurns 30s ease-in-out infinite alternate;
}

#background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  z-index: -1;
}

@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.5;
  animation: float 15s infinite linear;
}

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

.loading-container {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
}

.logo {
  max-width: 200px;
  max-height: 120px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5));
  animation: pulse 2s ease-in-out infinite;
}

.logo.hidden {
  display: none;
}

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

.server-name {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
  animation: fadeInDown 1s ease-out;
}

.description {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.sub-description {
  font-size: 1rem;
  opacity: 0.7;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.player-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1.5rem 2.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out 0.7s both;
  transition: all 0.3s ease;
}

.player-card.hidden {
  display: none;
}

.welcome-text {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.player-name {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.player-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--primary-color);
  margin-bottom: 1rem;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  display: none;
}

.player-avatar.visible {
  display: inline-block;
}

.rules-container {
  max-width: 500px;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.9s both;
}

.rules-container.hidden {
  display: none;
}

.rules-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.rules-list {
  list-style: none;
  text-align: left;
}

.rules-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 1rem;
  opacity: 0.85;
}

.rules-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.loading-status {
  width: 100%;
  max-width: 600px;
  animation: fadeInUp 1s ease-out 1.1s both;
}

.status-text {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  opacity: 0.9;
  min-height: 1.5rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.progress-text {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}

.server-info {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2rem;
  font-size: 0.85rem;
  opacity: 0.7;
  animation: fadeIn 1s ease-out 1.3s both;
}

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

.info-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
}

.info-value {
  color: var(--primary-color);
  font-weight: 600;
}

.music-control {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 20;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeIn 1s ease-out 1.5s both;
}

.music-control:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.music-control.hidden {
  display: none;
}

.music-control svg {
  width: 20px;
  height: 20px;
  fill: var(--text-color);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .server-name {
    font-size: 2.2rem;
  }
  .description {
    font-size: 1rem;
  }
  .player-name {
    font-size: 1.6rem;
  }
  .server-info {
    flex-direction: column;
    gap: 0.5rem;
    bottom: 1rem;
  }
}

/* Config Page Styles */
.config-body {
  background: #121212;
  color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-y: auto;
  min-height: 100vh;
  height: auto;
}

.config-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.config-header h1 {
  font-size: 2rem;
  color: var(--primary-color);
}

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .config-grid {
    grid-template-columns: 1fr;
  }
}

.config-form {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.config-form h2 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-size: 1.3rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff;
  font-size: 0.95rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group input[type="color"] {
  height: 45px;
  padding: 0.25rem;
  cursor: pointer;
}

.form-group input[type="range"] {
  padding: 0.5rem 0;
}

.form-group small {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  opacity: 0.6;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: var(--primary-color);
  color: #000000;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: var(--secondary-color);
  color: #ffffff;
}

.btn-danger:hover {
  background: #ff5252;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.preview-panel {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.preview-frame {
  width: 100%;
  height: 500px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.preview-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.json-output {
  margin-top: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.json-output h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.json-output pre {
  font-family: 'Consolas', monospace;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 200px;
  overflow-y: auto;
  opacity: 0.9;
}

.rules-editor {
  margin-top: 1rem;
}

.rule-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.rule-item input {
  flex: 1;
}

.rule-item button {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 107, 107, 0.2);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
}

.status-message {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.status-message.show {
  transform: translateY(0);
  opacity: 1;
}

.status-message.success {
  background: rgba(40, 167, 69, 0.9);
}

.status-message.error {
  background: rgba(220, 53, 69, 0.9);
}

.status-message.info {
  background: rgba(0, 212, 255, 0.9);
  color: #000;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.tab-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn.active {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Team Mitglieder */
.team-container {
  max-width: 700px;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 1s both;
}

.team-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  min-width: 180px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.team-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  object-fit: cover;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.team-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.2rem;
}

.team-info {
  text-align: left;
}

.team-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color);
}

.team-role {
  font-size: 0.8rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.2rem;
}

@media (max-width: 768px) {
  .team-grid {
    gap: 0.5rem;
  }
  .team-member {
    min-width: 140px;
    padding: 0.5rem;
  }
  .team-avatar {
    width: 40px;
    height: 40px;
  }
  .team-name {
    font-size: 0.85rem;
  }
  .team-role {
    font-size: 0.7rem;
  }
}

/* Team Editor in Config */
.team-member-item {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.team-member-item input {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff;
  font-size: 0.9rem;
}

.team-member-item input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.team-member-item .btn-remove-team {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 107, 107, 0.2);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .team-member-item {
    grid-template-columns: 1fr;
  }
}
