:root {
  --bg-top: #13332a;
  --bg-bottom: #0a1f19;
  --panel: rgba(14, 42, 34, 0.9);
  --panel-border: rgba(158, 206, 182, 0.35);
  --text: #f1f7f4;
  --muted: #c0d3ca;
  --accent: #38c172;
  --accent-strong: #2fa763;
  --accent-alt: #4cb2ff;
  --danger: #ff6b6b;
  --radius: 16px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #245544 0%, var(--bg-top) 38%, var(--bg-bottom) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1rem 3rem;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(4px);
}

body::before {
  width: 260px;
  height: 260px;
  top: -70px;
  left: -70px;
  background: radial-gradient(circle, rgba(76, 178, 255, 0.24) 0%, rgba(76, 178, 255, 0) 72%);
}

body::after {
  width: 320px;
  height: 320px;
  right: -120px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(56, 193, 114, 0.25) 0%, rgba(56, 193, 114, 0) 75%);
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: "Rockwell", "Georgia", serif;
}

h2 {
  width: min(580px, 100%);
  text-align: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(18, 51, 43, 0.66);
  color: #d8f1e5;
}

.container {
  width: min(580px, 100%);
  text-align: center;
  color: var(--muted);
}

.container a {
  color: #9ad6ff;
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
}

.container a:hover,
.container a:focus-visible {
  color: #d9f2ff;
}

.container img {
  width: 104px;
  height: auto;
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.4));
}

form {
  width: min(580px, 100%);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.form-group {
  display: grid;
  gap: 0.8rem;
}

.block {
  display: grid;
  gap: 0.35rem;
}

label {
  color: #ddf4e9;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(171, 208, 190, 0.4);
  background: rgba(250, 255, 253, 0.96);
  color: #10261f;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
}

.form-control:focus {
  outline: 2px solid rgba(76, 178, 255, 0.65);
  outline-offset: 1px;
  border-color: rgba(76, 178, 255, 0.7);
}

button {
  margin-top: 1rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.74rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #062113;
  background: linear-gradient(180deg, #7ce5a9 0%, var(--accent) 100%);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.27);
  filter: saturate(1.06);
}

button:active {
  transform: translateY(0);
}

button.green,
.green {
  background: linear-gradient(180deg, #7ce5a9 0%, var(--accent-strong) 100%);
  color: #052414;
}

button.send,
.send {
  background: linear-gradient(180deg, #96d5ff 0%, var(--accent-alt) 100%);
  color: #082032;
}

.rejoin {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.rejoin .form-group {
  gap: 0;
}

.rejoin button {
  margin-top: 0;
  width: auto;
  min-width: 132px;
}

p[style*="color:red"] {
  margin-top: 0.8rem;
  border: 1px solid rgba(255, 107, 107, 0.38);
  border-radius: 10px;
  background: rgba(101, 28, 28, 0.35);
  color: #ffdede !important;
  padding: 0.6rem 0.75rem;
}

#meet {
  width: min(1320px, 100%);
  min-height: calc(100vh - 3rem);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  background: rgba(7, 20, 16, 0.82);
}

#meet iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

body.meet-page {
  display: block;
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: #04140f;
}

body.meet-page::before,
body.meet-page::after {
  display: none;
}

body.meet-page #meet {
  width: 100vw;
  min-height: 100vh;
  height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #000;
}

.settle {
  width: min(900px, 100%);
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 1.25rem;
}

.settle iframe {
  width: min(560px, 100%);
  max-width: 100%;
  border: 0;
  border-radius: 12px;
  margin-bottom: 0.85rem;
}

.settle table {
  width: 100% !important;
  border-collapse: collapse;
  margin-top: 0.85rem;
}

.settle th,
.settle td {
  border: 1px solid rgba(160, 203, 184, 0.3);
  padding: 0.65rem;
  text-align: left;
}

.settle th {
  color: #def2e8;
  background: rgba(24, 66, 53, 0.8);
}

.payments {
  text-align: left;
  margin: 0.85rem auto;
  width: min(620px, 100%);
}

.payments ul {
  margin: 0.35rem 0 1rem;
  padding-left: 1.2rem;
}

.payments li {
  margin-bottom: 0.55rem;
}

.pay-link {
  margin-left: 0.5rem;
  display: inline-block;
  border-radius: 999px;
  border: 1px solid rgba(154, 214, 255, 0.55);
  background: rgba(45, 117, 173, 0.35);
  color: #dff3ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.18rem 0.58rem;
}

.pay-link:hover,
.pay-link:focus-visible {
  background: rgba(76, 178, 255, 0.4);
  color: #f4fbff;
}

.pay-note {
  margin-top: 0.2rem;
  color: #a8c2b5;
  font-size: 0.76rem;
}

.action-button {
  margin-top: 1rem;
  display: inline-block;
  border-radius: 12px;
  padding: 0.72rem 1.2rem;
  min-width: 160px;
  font-weight: 700;
  background: linear-gradient(180deg, #7ce5a9 0%, var(--accent-strong) 100%);
  color: #062113;
  cursor: pointer;
}

@media (max-width: 720px) {
  body {
    padding: 1rem 0.75rem 2rem;
  }

  form,
  .settle {
    padding: 1rem;
  }

  .rejoin {
    grid-template-columns: 1fr;
  }

  .rejoin button {
    width: 100%;
  }

  #meet {
    min-height: calc(100vh - 2rem);
  }

  body.meet-page #meet {
    min-height: 100vh;
    height: 100vh;
  }
}
