/* === Базовые стили для страницы === */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter Variable', sans-serif;
  background: #fff0f2 url('/images/fon.jpg') center center / cover no-repeat;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Шапка и подвал === */
header, footer {
  padding: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #ddd;
}

header h1 {
  margin: 0;
  font-size: 2.2em;
  color: #d40000;
}

/* === Навигация === */
nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 10px;
  flex-wrap: wrap;
}

nav a {
  color: #555;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: #d40000;
}

/* === Основной блок === */
main {
  flex: 1;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.intro {
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 30px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  font-weight: 550;
}

.content-box {
  margin-top: 10px;
  border: 1px solid #ddd;
  padding: 5px 20px 0px 20px;
  border-radius: 10px;
  min-height: 100px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  font-weight: 550;
}

/* === Кнопки и действия === */
.extra-buttons-wrapper {
  max-width: 1000px;
  width: 100%;
  margin: 30px auto 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.extra-buttons {
  display: flex;
  gap: 0;
  width: 100%;
}

.extra-buttons button {
  background-color: #d40000;
  color: #fff;
  font-size: 16px;
  padding: 14px 0;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  flex: 1 1 33.3333%;
  text-align: center;
  border-right: 1px solid #fff;
  border-radius: 0; /* сброс */
}


/* Левая кнопка — скругление слева */
.extra-buttons button:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

/* Правая кнопка — скругление справа */
.extra-buttons button:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-right: none; /* убрать правую границу */
}

.extra-buttons button:hover {
  background-color: #a00000;
}


.copy-status {
  display: block;
  text-align: center;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.5s;
  color: #4caf50;
  font-weight: bold;
}

/* === Счётчик === */
.counter {
  text-align: center;
  color: #888;
  font-size: 0.9em;
  margin-top: 10px;
}

/* === Прогресс загрузки === */
#progress-container {
  width: 100%;
  background: #eee;
  height: 8px;
  margin-top: 10px;
  border-radius: 5px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: #d40000;
  transition: width 0.1s linear;
}

/* === Загружаемые послания === */
.message h2 {
  margin-top: 0;
  font-size: 2em;
  color: #d40000;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

.message p {
  font-size: 1.1em;
  line-height: 1.5;
  margin: 10px 0;
}

/* Эмодзи и стили доп. текста */
.message .emoji {
  font-size: 3em;
  margin-top: 30px;
  animation: bounce 1.5s infinite;
  text-align: center;
}

.message .exit {
  margin-top: 20px;
  font-size: 1em;
  color: #777;
  text-align: center;
  font-style: italic;
}

/* Подпрыгивание эмодзи */
@keyframes bounce {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* Первый заголовок */
.first-title {
  margin-top: 10px;
}

.first-title h2 {
  margin-bottom: 10px;
  padding-top: 15px;
}

#content-html {
  padding-bottom: 20px;
}



/* === Блок отправки друга === */
#share-box ul {
  max-height: 300px;
  overflow-y: auto;
  padding: 0;
  list-style: none;
  margin: 10px 0;
}

#share-box ul li {
  margin: 5px 0;
  padding: 10px 15px;
  background-color: #f5f5f5;
  border-radius: 6px;
  transition: background-color 0.2s;
  cursor: pointer;
  font-weight: 500;
  color: #333;
}

#share-box ul li:hover {
  background-color: #e0e0e0;
}

#copy-result {
  transition: opacity 0.3s;
  opacity: 0;
  font-weight: bold;
  color: green;
}

h3[onclick] {
  cursor: pointer;
  user-select: none;
}

/* === Адаптивность === */
@media (max-width: 600px) {
  .extra-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .extra-buttons button {
    width: 100%;
    flex: none;
    border-radius: 12px !important;
    border: none;
  }
}


nav a.active {
  color: #d40000;
}
