/* Стили для своего текста с изображением */
.custom-text-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.custom-text-with-image {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 90%;
  max-height: 80%;
}

.custom-text-with-image.image-top {
  flex-direction: column;
}

.custom-text-image {
  max-width: 300px;
  max-height: 200px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  object-fit: contain;
}

.custom-text-content {
  text-align: center;
  flex: 1;
}

.custom-text-only {
  text-align: center;
  max-width: 90%;
  max-height: 80%;
}

/* Адаптивность для своего текста */
@media (max-width: 768px) {
  .custom-text-with-image {
    flex-direction: column !important;
    gap: 1rem;
  }
  
  .custom-text-image {
    max-width: 200px;
    max-height: 150px;
  }
}

/* Остальные стили остаются без изменений */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

/* Фоновая анимация волн */
svg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Логотип */
#logo {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 101;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 6px -2px rgba(0,0,0,0.2);
  background: rgba(255, 244, 227, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 15px 20px;
}

#logo.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

#logo a {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

#logo a:hover {
  opacity: 0.9;
}

/* Базовые стили для часов и цитат */
#clock-display {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease-in-out;
  color: white;
  text-shadow: 2px 2px 20px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: auto;
  max-width: 80%;
}

/* Контейнер для времени */
.clock-time-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Контейнер для даты */
.clock-date-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
}

/* Переписать позиционирование для цитат */
#quote-display {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  pointer-events: none;
  color: white;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s ease-in-out;
}

#quote-content {
  max-width: 98%;
  max-height: 80%;
  text-align: center;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 1;
  width: 100%;
  will-change: transform, opacity;
}

.quote-text {
  font-size: 2.5rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-weight: 700;
  padding: 0 10px;
  text-shadow: 
    0 0 10px rgba(255,255,255,0.3),
    0 0 20px rgba(255,255,255,0.2),
    0 0 30px rgba(255,255,255,0.1),
    2px 2px 4px rgba(0,0,0,0.5),
    4px 4px 8px rgba(0,0,0,0.3);
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
  letter-spacing: 0.02em;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.quote-author {
  font-size: 1.8rem;
  font-style: italic;
  opacity: 0.9;
  margin-top: 2rem;
  font-weight: 600;
  text-shadow: 
    0 0 8px rgba(255,255,255,0.2),
    0 0 16px rgba(255,255,255,0.1),
    1px 1px 3px rgba(0,0,0,0.4),
    2px 2px 6px rgba(0,0,0,0.2);
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.3));
  will-change: transform, opacity;
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Стили для анимации появления цитат */
.quote-text.quote-appear {
  opacity: 0;
  transform: scale(1.1) translateY(20px);
}

.quote-text.quote-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.quote-author.quote-appear {
  opacity: 0;
  transform: scale(1.1) translateY(20px);
}

.quote-author.quote-visible {
  opacity: 0.9;
  transform: scale(1) translateY(0);
}

/* Режим "только цитаты" */
.display-mode-quotes #clock-display {
  opacity: 0 !important;
  visibility: hidden !important;
}

.display-mode-quotes #quote-display {
  opacity: 1 !important;
  visibility: visible !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  align-items: center;
}

/* Режим "только часы" */
.display-mode-clock #quote-display {
  opacity: 0 !important;
  visibility: hidden !important;
}

.display-mode-clock #clock-display {
  opacity: 1 !important;
  visibility: visible !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Режим "оба" - исправлено позиционирование */
.display-mode-both #clock-display {
  opacity: 1 !important;
  visibility: visible !important;
  top: 15% !important;
  left: 50%;
  transform: translate(-50%, 0);
  transition: top 0.8s ease-in-out, opacity 0.5s ease-in-out;
}

.display-mode-both #quote-display {
  opacity: 1 !important;
  visibility: visible !important;
  top: 40% !important;
  left: 50%;
  transform: translate(-50%, 0);
  align-items: flex-start;
  transition: top 0.8s ease-in-out, opacity 0.5s ease-in-out;
  width: 95%;
  max-width: 1200px;
}

/* Стили часов - A: Минималистичный */
.clock-style-a .clock-time {
  font-size: 5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.clock-style-a .clock-date {
  font-size: 1.8rem;
  margin-top: 1rem;
  opacity: 0.9;
  font-weight: 500;
}

/* Стили часов - B: С датой */
.clock-style-b .clock-time {
  font-size: 4.5rem;
  font-weight: 600;
}

.clock-style-b .clock-date {
  font-size: 2rem;
  margin-top: 1.5rem;
  font-weight: 500;
}

/* Стили часов - C: Швейцарский стиль */
.clock-style-c .clock-time {
  font-size: 6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.clock-style-c .clock-seconds {
  font-size: 2.5rem;
  vertical-align: super;
  opacity: 0.8;
  margin-left: 0.5rem;
  font-weight: 500;
}

.clock-style-c .clock-date {
  font-size: 1.8rem;
  margin-top: 1rem;
  opacity: 0.8;
  font-weight: 500;
}

/* Стили часов - D: Неоновый */
.clock-style-d {
  border: 3px solid rgba(255,255,255,0.3);
  padding: 2rem 4rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
}

.clock-style-d .clock-time {
  font-size: 5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px currentColor, 2px 2px 15px rgba(0,0,0,0.4);
}

.clock-style-d .clock-date {
  font-size: 1.8rem;
  margin-top: 1.5rem;
  opacity: 0.9;
  font-weight: 500;
}

/* Меню - компактный стиль */
#menu {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  background: rgba(255, 244, 227, 0.98);
  backdrop-filter: blur(10px);
  padding: 10px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

#menu.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Стили для строк меню */
.menu-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px 0;
  gap: 3px;
}

.menu-btn {
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(0, 150, 79, 0.3);
  cursor: pointer;
  padding: 8px 10px;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  border-radius: 8px;
  color: #333;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-btn:hover {
  background: rgba(0, 150, 79, 0.2);
  transform: scale(1.05);
  border-color: #00964F;
}

.menu-btn.active {
  background: rgba(0, 150, 79, 0.3);
  border-color: #00964F;
}

.separator {
  margin: 0 3px;
  opacity: 0.3;
  color: #333;
  font-size: 1.2rem;
}

/* Cookie уведомление */
#cookie-notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 244, 227, 0.98);
  backdrop-filter: blur(10px);
  color: #333;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  max-width: 600px;
  text-align: center;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 2px solid #00964F;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

#cookie-notice.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

#cookie-close {
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
}

/* Модальные окна */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff4e3;
  padding: 2rem;
  border-radius: 20px;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 3px solid #00964F;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #E7344F;
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

.modal-close:hover {
  background: #c72a3f;
  transform: rotate(90deg);
}

.modal h2 {
  color: #00964F;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  font-weight: 700;
}

/* Редактор цитат */
.quote-form {
  margin-bottom: 2rem;
}

.quote-form textarea,
.quote-form input {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0;
  background: white;
  border: 2px solid #00964F;
  color: #333;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
}

.quote-form textarea {
  min-height: 80px;
  resize: vertical;
}

.quote-form textarea::placeholder,
.quote-form input::placeholder {
  color: rgba(0,0,0,0.4);
}

.quote-form button {
  padding: 0.8rem 2rem;
  background: #E7344F;
  border: none;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

.quote-form button:hover {
  background: #c72a3f;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(231, 52, 79, 0.3);
}

.quotes-list {
  max-height: 400px;
  overflow-y: auto;
}

.quote-item {
  background: white;
  padding: 1rem;
  margin: 0.8rem 0;
  border-radius: 10px;
  border-left: 4px solid #00964F;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quote-item-text {
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  font-size: 1rem;
  font-weight: 500;
}

.quote-item-author {
  color: #00964F;
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.quote-item-actions button {
  padding: 0.5rem 1rem;
  margin: 0.3rem;
  background: #E7344F;
  border: none;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.quote-item-actions button:hover {
  background: #c72a3f;
}

.quote-item.disabled {
  opacity: 0.5;
}

/* Настройки */
.settings-group {
  margin: 1.5rem 0;
  padding: 1rem;
  background: white;
  border-radius: 10px;
  border: 2px solid #00964F;
}

.settings-group h3 {
  color: #00964F;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.setting-item {
  margin: 1rem 0;
}

.setting-item label {
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.setting-item input[type="color"],
.setting-item input[type="range"],
.setting-item select {
  width: 100%;
  padding: 0.5rem;
  background: white;
  border: 2px solid #00964F;
  color: #333;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
}

.setting-item input[type="color"] {
  height: 50px;
  padding: 5px;
}

.setting-item input[type="range"] {
  height: 40px;
}

.setting-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  cursor: pointer;
  accent-color: #00964F;
}

.range-value {
  color: #E7344F;
  font-size: 1rem;
  margin-left: 0.5rem;
  font-weight: 700;
  min-width: 60px;
  text-align: right;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 150, 79, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #00964F;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #007a3f;
}

/* Адаптивность */
@media (max-width: 768px) {
  #logo {
    top: 10px;
    left: 10px;
    padding: 10px 15px;
  }

  #logo img {
    width: 70px;
  }

  #logo a div div {
    font-size: 11px !important;
  }

  .quote-text {
    font-size: 1.8rem;
    font-weight: 700;
  }

  .quote-author {
    font-size: 1.4rem;
    font-weight: 600;
  }

  .clock-style-a .clock-time {
    font-size: 3.5rem;
  }

  .clock-style-b .clock-time {
    font-size: 3rem;
  }

  .clock-style-c .clock-time {
    font-size: 4rem;
  }

  .clock-style-d .clock-time {
    font-size: 3rem;
    letter-spacing: 0.05em;
  }

  .clock-style-d {
    padding: 1.5rem 2.5rem;
  }

  #menu {
    top: 10px;
    right: 10px;
    padding: 8px;
  }

  .menu-btn {
    padding: 6px 8px;
    font-size: 1rem;
    min-width: 35px;
  }

  .modal-content {
    padding: 1.5rem;
    width: 95%;
  }

  #cookie-notice {
    bottom: 10px;
    left: 10px;
    right: 10px;
    transform: none;
    max-width: none;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
  }

  /* На мобильных увеличиваем отступы в режиме "оба" */
  .display-mode-both #clock-display {
    top: 18% !important;
  }

  .display-mode-both #quote-display {
    top: 45% !important;
  }
}

/* Улучшенные стили для мобильных устройств */
@media (max-width: 768px) {
  #logo {
    top: 10px;
    left: 10px;
    padding: 8px 12px;
    max-width: calc(100vw - 120px);
  }

  #logo img {
    width: 60px;
  }

  #logo a div div {
    font-size: 10px !important;
    line-height: 1.2;
  }

  #menu {
    top: 10px;
    right: 10px;
    left: 10px;
    padding: 6px;
    flex-wrap: wrap;
    gap: 2px;
  }

  .menu-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
  }

  .menu-btn {
    padding: 6px 8px;
    font-size: 0.9rem;
    min-width: 35px;
    flex: 0 0 auto;
  }

  .separator {
    display: none;
  }

  /* Улучшенное отображение цитат на мобильных */
  .quote-text {
    font-size: 1.4rem;
    line-height: 1.4;
    padding: 0 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .quote-author {
    font-size: 1.1rem;
    margin-top: 1rem;
  }

  /* Улучшенное отображение своего текста с изображением */
  .custom-text-with-image {
    flex-direction: column !important;
    gap: 1rem;
    padding: 0 10px;
  }

  .custom-text-image {
    max-width: 80vw !important;
    max-height: 30vh !important;
    width: auto !important;
    height: auto !important;
  }

  .custom-text-content {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .quote-text {
    font-size: 1.2rem;
    padding: 0 10px;
  }

  #logo {
    max-width: calc(100vw - 100px);
  }

  #logo img {
    width: 50px;
  }

  #logo a div div {
    font-size: 9px !important;
  }
}

/* Улучшенные стили для своего текста */
.custom-text-form textarea {
  width: 100%;
  padding: 1rem;
  margin: 0.5rem 0;
  background: white;
  border: 2px solid #00964F;
  color: #333;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  resize: vertical;
  min-height: 120px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.custom-text-form textarea:focus {
  outline: none;
  border-color: #E7344F;
  box-shadow: 0 4px 15px rgba(231, 52, 79, 0.2);
}

.custom-text-form textarea::placeholder {
  color: rgba(0,0,0,0.4);
  font-style: italic;
}

/* Адаптивное изображение в своем тексте */
.custom-text-image {
  max-width: 400px;
  max-height: 300px;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  object-fit: contain;
  transition: all 0.3s ease;
}

/* Улучшенные стили для модальных окон на мобильных */
@media (max-width: 768px) {
  body.ui-visible #logo,
  body.ui-visible #menu {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  .custom-text-form textarea {
    font-size: 16px; /* Предотвращает масштабирование в iOS */
  }
}

/* Гарантия что меню не перекрывается логотипом на мобильных */
/* Новые стили для мобильной структуры */
@media (max-width: 768px) {
  body.ui-visible #logo,
  body.ui-visible #menu {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  #logo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding: 10px 15px;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 2px solid #00964F;
    z-index: 102;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
  }

  #menu {
    position: fixed;
    top: 120px; /* Высота логотипа */
    left: 0;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 2px solid #00964F;
    justify-content: center;
    padding: 10px;
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
  }

  /* Улучшенное отображение в режиме "оба" на мобильных */
  .display-mode-both #clock-display {
    top: 10% !important;
    transform: translate(-50%, 0);
  }

  .display-mode-both #quote-display {
    top: 25% !important;
    transform: translate(-50%, 0);
    max-height: 60vh;
    overflow: hidden;
  }

  .display-mode-both .quote-text {
    font-size: 1.3rem !important;
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }

  .display-mode-both .quote-author {
    font-size: 1rem !important;
    margin-top: 0.5rem;
  }

  /* Компактное меню на мобильных */
  .menu-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 3px;
  }

  .menu-btn {
    padding: 8px 12px;
    font-size: 1rem;
    min-width: 44px; /* Минимальный размер для касания */
  }

  .separator {
    display: none;
  }
}

/* Фиксированная ширина для часов в стиле D */
.clock-style-d .clock-time {
  font-family: 'Courier New', monospace;
  min-width: 300px;
  text-align: center;
  display: inline-block;
}

.clock-style-d .clock-seconds {
  font-family: 'Courier New', monospace;
}

/* Адаптивная фиксированная ширина для мобильных */
/* Обновите мобильные стили для меню и логотипа */
@media (max-width: 768px) {
  #logo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding: 8px 12px;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 2px solid #00964F;
    z-index: 102;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    background: rgba(255, 244, 227, 0.98);
  }

  #menu {
    position: fixed;
    top: 80px; /* Уменьшено с 120px для приближения к логотипу */
    left: 0;
    width: 100%;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-bottom: 2px solid #00964F;
    justify-content: center;
    padding: 8px;
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    background: rgba(255, 244, 227, 0.98);
  }

  /* Компактный логотип для мобильных */
  #logo img {
    width: 50px;
  }

  #logo a div div {
    font-size: 9px !important;
    line-height: 1.2;
  }

  /* Еще более компактный логотип для очень маленьких экранов */
  @media (max-width: 480px) {
    #logo {
      padding: 6px 10px;
    }
    
    #menu {
      top: 70px; /* Еще ближе к логотипу на маленьких экранах */
      padding: 6px;
    }
    
    #logo img {
      width: 45px;
    }
    
    #logo a div div {
      font-size: 8px !important;
    }
  }

  @media (max-width: 360px) {
    #menu {
      top: 65px;
    }
  }
}

/* Убираем окантовку и фон у изображения в "своем тексте" */
.custom-text-image {
  max-width: 400px;
  max-height: 300px;
  width: auto;
  height: auto;
  border-radius: 0; /* Убираем скругление углов */
  box-shadow: none; /* Убираем тень */
  object-fit: contain;
  transition: all 0.3s ease;
  background: transparent; /* Прозрачный фон */
  border: none; /* Убираем границу если была */
}

/* Для мобильных - адаптируем размер изображения */
@media (max-width: 768px) {
  .custom-text-image {
    max-width: 80vw;
    max-height: 40vh;
  }
  
  .custom-text-with-image {
    gap: 1rem;
    padding: 0 10px;
  }
}

/* Убираем фон и окантовку у превью изображения в модальном окне */
#custom-image-preview-img {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  border: none;
  max-width: 200px;
  max-height: 150px;
}

/* Улучшаем отображение контейнера с изображением */
.custom-text-with-image {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 90%;
  max-height: 80%;
  background: transparent;
}

.custom-text-with-image.image-top {
  flex-direction: column;
}

.custom-text-content {
  text-align: center;
  flex: 1;
  background: transparent;
}

.custom-text-only {
  text-align: center;
  max-width: 90%;
  max-height: 80%;
  background: transparent;
}

/* Убираем возможные фоны у родительских элементов */
#quote-content {
  background: transparent !important;
}

#quote-display {
  background: transparent !important;
}