:root {
  --gold: #caa15a;
  --dark: #241407;
  --wine: #5e130d;
  --paper: #ead4aa;
  --paper-soft: rgba(234, 211, 166, 0.86);
  --shadow: rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #120b05;
  font-family: Georgia, "Times New Roman", serif;
  color: #2b1608;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

.phone-page {
  width: min(100vw, 520px);
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  background-image: url("pozadie.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.75);
}

.phone-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.16));
  pointer-events: none;
}

.login-card {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 82%;
  max-width: 400px;
  padding: 24px 20px 22px;
  border: 2px solid rgba(89, 48, 18, 0.58);
  border-radius: 18px;
  background: var(--paper-soft);
  box-shadow: 0 10px 25px var(--shadow), inset 0 0 22px rgba(94, 49, 16, 0.18);
  z-index: 2;
  text-align: center;
  backdrop-filter: blur(1px);
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: clamp(25px, 6vw, 34px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #3b200d;
  text-shadow: 0 1px 0 rgba(255, 239, 190, 0.4);
}

.intro {
  margin: 0 0 18px;
  font-size: clamp(15px, 3.8vw, 18px);
  line-height: 1.35;
  color: #2b1608;
}

.box {
  width: 100%;
}

input {
  width: 100%;
  padding: 14px 15px;
  font-size: 17px;
  text-align: center;
  border: 2px solid #8b5a24;
  border-radius: 14px;
  background: rgba(255, 242, 202, 0.95);
  color: #341b09;
  outline: none;
  box-shadow: inset 0 0 10px rgba(94, 49, 16, 0.12);
  font-family: Georgia, "Times New Roman", serif;
}

input:focus {
  border-color: #d6b06b;
  box-shadow: 0 0 0 3px rgba(202, 161, 90, 0.28), inset 0 0 10px rgba(94, 49, 16, 0.12);
}

button {
  width: 100%;
  margin-top: 14px;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.08em;
  border: 2px solid #8b5a24;
  border-radius: 14px;
  background: linear-gradient(#4b2b13, #2b1709);
  color: #f3dfb1;
  cursor: pointer;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.45), 0 5px 14px rgba(0, 0, 0, 0.35);
  font-family: Georgia, "Times New Roman", serif;
}

button:hover,
button:focus {
  color: #fff4d5;
  border-color: #d6b06b;
  background: linear-gradient(#5b3216, #341b09);
}

#error {
  min-height: 22px;
  margin: 10px 0 0;
  color: #6e170d;
  font-size: 14px;
  font-weight: bold;
}

.links {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.links a {
  display: inline-block;
  padding-bottom: 2px;
  color: #5c1b12;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 1px solid rgba(92, 27, 18, 0.45);
}

.links a:hover,
.links a:focus {
  color: #7c2419;
}

@media (min-width: 700px) {
  body {
    padding: 24px 0;
  }

  .phone-page {
    min-height: min(100vh, 920px);
    aspect-ratio: 2 / 3;
    border-radius: 8px;
  }
}
