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

:root {
  --text: #1a1a1a;
  --overlay: rgba(255, 255, 255, 0.85);
  --panel-bg: rgba(255, 255, 255, 0.95);
  --panel-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --template-bg: #f3f3f3;
  --back-link: #2196f3;
  --back-link-hover: #1976d2;
  --primary: #5865f2;
  --primary-hover: #4752c4;
  --primary-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f0f0f0;
    --overlay: rgba(0, 0, 0, 0.75);
    --panel-bg: rgba(30, 30, 30, 0.95);
    --panel-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --card-bg: rgba(40, 40, 40, 0.9);
    --card-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    --template-bg: #111;
    --back-link: #42a5f5;
    --back-link-hover: #64b5f6;
    --primary-shadow: 0 4px 12px rgba(88, 101, 242, 0.6);
  }
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  position: relative;
}

.shared-background-frame {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: -2;
  pointer-events: none;
}

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

.page-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.panel {
  width: 100%;
  max-width: 900px;
  padding: 3rem;
  border-radius: 16px;
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(10px);
}

.panel-centered {
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

h2 {
  font-size: 1.4rem;
  margin: 1rem 0;
}

p {
  line-height: 1.8;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--back-link);
}

.back-link:hover {
  color: var(--back-link-hover);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.info-card {
  padding: 1.8rem;
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover {
  transform: translateY(-5px);
}

.info-card h2 {
  margin: 0 0 0.7rem;
}

.info-card p {
  margin-bottom: 0.4rem;
}

.server-ip {
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0.4rem 0;
  color: #1976d2;
}

@media (prefers-color-scheme: dark) {
  .server-ip {
    color: #64b5f6;
  }
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: var(--primary);
  transition: all 0.25s ease;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--primary-shadow);
}

.btn-green {
  background: #43a047;
}

.btn-green:hover {
  background: #388e3c;
}

.btn-gray {
  background: #777;
}

.btn-gray:hover {
  background: #555;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  width: 90%;
  max-width: 500px;
  padding: 2rem;
  border-radius: 14px;
  background: var(--panel-bg);
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.template-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--template-bg);
  font-family: monospace;
  white-space: pre-line;
}

@media (max-width: 768px) {
  .panel {
    padding: 2rem;
  }

  h1 {
    font-size: 2rem;
  }
}