/* Основные стили и переменные */
:root {
  --primary: #1c3c50;
  --primary-dark: #142d3d;
  --dark: #0f212e;
  --accent: #de6065;
  --light: #fbffe6;
  --secondary: #6db29c;
  --gradient: linear-gradient(135deg, #1c3c50 0%, #142d3d 50%, #0f212e 100%);
}

* {
  box-sizing: border-box;

}

svg {
  height: 40px;
  width: 40px;
  padding: 6px;
  border-radius: 8px;
}

input#file-upload-button {
  background: var(--secondary);
  color: var(--dark);
  padding: 10px;
  border: none;
  border-radius: 60px;
  font-size: 1rem;
  margin: 1rem;
}



body {
  background: var(--dark);
  color: var(--light);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  margin: 0px;
  user-select: none;
  /* Стандартное */
  -webkit-user-select: none;
  /* Safari */
  -ms-user-select: none;
  /* IE/Edge */
}

body::-webkit-scrollbar {
  display: none;
  /* Chrome, Edge, Safari */
}

a {
  color: var(--secondary);
  text-decoration: none;
}

button {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

button.svg {
  background: var(--secondary);
  padding: 0px;
  border: none;
  border-radius: 8px;
  height: 38px;
  width: 38px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(109, 178, 156, 0.4);
}

input#imageInput.mb-2,
input#decodeInput.mb-2 {
  width: auto;
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

/* Шапка */
header {
  background: var(--primary);
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
}

header h1 {
  color: var(--light);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Навигация */
nav {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: all 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--secondary);
}

nav a:hover::after {
  width: 100%;
}

/* Основное содержимое */
main {
  padding: 3rem 2rem;
  flex: 1;
  animation: fadeIn 0.6s ease-out;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  color: var(--secondary);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

h3 {
  color: var(--light);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.5rem;
  max-width: 70ch;
}

/* Карточки */
.card {
  background: rgba(28, 60, 80, 0.5);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(109, 178, 156, 0.2);
}

/* Списки */
ul {
  list-style: none;
}

ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
}

ul li::before {
  content: '•';
  color: var(--secondary);
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -3px;
}

/* Формы */
.input-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--secondary);
}

textarea {
  max-width: 1800px;
  min-width: 1800px;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--secondary);
  border-radius: 8px;
  background: rgba(15, 33, 46, 0.7);
  color: var(--light);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin: 1rem 0;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(222, 96, 101, 0.3);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--secondary);
  color: var(--dark);
}

.btn-primary:hover {
  background: #5d9e8a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(109, 178, 156, 0.4);
}

.btn-secondary {
  background: var(--accent);
  color: var(--light);
}

.btn-secondary:hover {
  background: #d04a50;
  transform: translateY(-2px);
}

/* Подвал */
footer {
  background: var(--primary);
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  margin-top: auto;
}

/* Сообщения */
.alert {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  z-index: 100;
  animation: fadeIn 0.5s ease-out;
}

.alert-success {
  background: var(--secondary);
  color: var(--dark);
}

/* Утилиты */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.p-2 {
  padding: 1rem;
}

.rounded-lg {
  border-radius: 12px;
}

/* Адаптивность */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .card {
    padding: 1.5rem;
  }
}

/* Специфичные стили для demo.html */
#message {
  position: fixed;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

#message.show {
  opacity: 1;
  visibility: visible;
}

/* Удалите старые анимации для #message если они есть */

#extractedText,
#decodedOutput {
  background: rgba(15, 33, 46, 0.7);
  border: 1px solid var(--secondary);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Courier New', monospace;
}

.buttons {
  display: flex;
  margin: 1rem;
}

/* Стили для кнопок в demo.html */
#embedBtn {
  background: var(--secondary);
  color: var(--dark);
  padding: 10px;
  border: none;
  border-radius: 60px;
  font-size: 1rem;
  margin-right: 1rem;
}

#extractBtn {
  background: var(--accent);
  color: var(--light);
  padding: 10px;
  border: none;
  border-radius: 60px;
  font-size: 1rem;
  margin: 1rem;
}

#encodeBtn {
  background: var(--secondary);
  color: var(--dark);
  padding: 10px;
  border: none;
  border-radius: 60px;
  font-size: 1rem;
  margin: 1rem;
}

#decodeBtn {
  background: var(--accent);
  color: var(--light);
  padding: 10px;
  border: none;
  border-radius: 60px;
  font-size: 1rem;
  margin: 1rem;
}