
body {
    font-family: sans-serif;
    background-color: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #222222);
    font-size: 16px;
    margin: 0;
    padding: 0;
    color-scheme: var(--tg-color-scheme);
}

a {
    color: var(--tg-theme-link-color, #2678b6);
}

button, .button {
    display: block;
    width: 100%;
    font-size: 14px;
    margin: 15px 0;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    background-color: var(--tg-theme-button-color, #50a8eb);
    color: var(--tg-theme-button-text-color, #ffffff);
    cursor: pointer;
    text-decoration: none; /* Убирает подчеркивание текста */
    transition: transform 0.3s ease, background-color 0.3s ease; /* Более плавный переход для увеличения и цвета */
}

button:hover, .button:hover {
    transform: scale(1.03); /* Уменьшено увеличение до 3% при наведении */
    background-color: var(--tg-theme-button-hover-color, #4a98db); /* Цвет при наведении */
}

button:active, .button:active {
    transform: scale(0.98); /* Легкое уменьшение при нажатии для эффекта "нажатия" */
    background-color: var(--tg-theme-button-active-color, #428bc1); /* Цвет при нажатии */
}

button[disabled], .button[disabled] {
    opacity: 0.6;
    cursor: auto;
    pointer-events: none;
}

.header-image {
    width: 100%;
    height: auto;
    max-width: 1280px;
    max-height: 720px;
}


section {
    padding: 15px 15px 65px;
    text-align: center;
}

p {
    margin: 40px 0 15px;
}

ul {
    text-align: left;
}

li {
    color: var(--tg-theme-hint-color, #a8a8a8);
}

textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 7px;
}

pre {
    background: rgba(0, 0, 0, .07);
    border-radius: 4px;
    padding: 4px;
    margin: 7px 0;
    word-break: break-word;
    white-space: pre-wrap;
    text-align: left;
}

.dark pre {
    background: rgba(255, 255, 255, .15);
}

.ok {
    color: green;
}

.err {
    color: red;
}

* { box-sizing:border-box; }

.container 		{
  margin:30px auto 0;
  display:block;
  padding:10px 50px 50px;
  max-width: 600px;
}
h2 		 {
  text-align:center;
  margin-bottom:50px;
}
h2 small {
  font-weight:normal;
  color:#888;
  display:block;
}
.footer 	{ text-align:center; }
.footer a  { color:#53B2C8; }

/* form starting stylings ------------------------------- */
.group 			  {
  position:relative;
}
input {
  font-size: 18px;
  padding: 10px 10px 10px 5px;
  display: block;
  width: 100%;
  border: none;
  border-bottom: 1px solid #757575;
  margin-bottom: 40px;
}

input:focus {
  outline: none;
}

/* LABEL ======================================= */
label {
  color: #999;
  font-size: 18px;
  font-weight: normal;
  pointer-events: none;
  left: 5px;
  top: 10px;
  transition: 0.2s ease all;
  -moz-transition: 0.2s ease all;
  -webkit-transition: 0.2s ease all;
}

/* active state */
input:focus ~ label,
input:not(:placeholder-shown) ~ label,  /* Добавляем это правило */
input:valid ~ label {
  top: -20px;
  font-size: 14px;
  color: var(--tg-theme-button-color, #50a8eb);
}

/* BOTTOM BARS ================================= */
.bar 	{ position:relative; display:block; width:100%; }
.bar:before, .bar:after 	{
  content:'';
  height:2px;
  width:0;
  bottom:1px;
  position:absolute;
  background:var(--tg-theme-button-color, #50a8eb);
  transition:0.2s ease all;
  -moz-transition:0.2s ease all;
  -webkit-transition:0.2s ease all;
}
.bar:before {
  left:50%;
}
.bar:after {
  right:50%;
}

/* active state */
input:focus ~ .bar:before, input:focus ~ .bar:after {
  width:50%;
}

/* HIGHLIGHTER ================================== */
.highlight {
  position:absolute;
  height:60%;
  width:100px;
  top:25%;
  left:0;
  pointer-events:none;
  opacity:0.5;
}

/* active state */
input:focus ~ .highlight {
  -webkit-animation:inputHighlighter 0.3s ease;
  -moz-animation:inputHighlighter 0.3s ease;
  animation:inputHighlighter 0.3s ease;
}

/* ANIMATIONS ================ */
@-webkit-keyframes inputHighlighter {
	from { background:var(--tg-theme-button-color, #50a8eb); }
  to 	{ width:0; background:transparent; }
}
@-moz-keyframes inputHighlighter {
	from { background:var(--tg-theme-button-color, #50a8eb); }
  to 	{ width:0; background:transparent; }
}
@keyframes inputHighlighter {
	from { background:var(--tg-theme-button-color, #50a8eb); }
  to 	{ width:0; background:transparent; }
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    text-decoration: none;
    color: gray;
    font-size: 12px;
}

.back-button::before {
    content: '←';
    margin-right: 8px;
}

