/* components.css */

/* =========== Экран запуска (landing) ======== */
.landing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--landing-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--landing-color);
    text-align: center;
    padding: 20px;
    z-index: 200;
    animation: fadeIn 1s ease forwards;
  }
  .landing h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  }
  .landing p {
    font-size: 1.1rem;
    margin-bottom: 16px;
    max-width: 600px;
    line-height: 1.5;
  }
  .landing ul {
    list-style-type: disc;
    margin: 12px 0 24px 20px;
    text-align: left;
    display: inline-block;
  }
  .landing .btn-landing {
    background-color: var(--user-bubble);
    color: var(--text-user);
    border: none;
    border-radius: var(--border-radius);
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition:
      background-color var(--transition-speed) ease,
      transform var(--transition-speed) ease,
      box-shadow var(--transition-speed) ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  .landing .btn-landing:hover {
    background-color: #3d4298;
    transform: translateY(-2px);
  }
  .landing .btn-landing:active {
    transform: translateY(0);
  }
  
  /* =========== Шапка сайта (header) ======= */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    color: var(--header-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    backdrop-filter: blur(10px);
    z-index: 100;
  }
  .site-header .logo {
    font-size: 1.5rem;
    font-weight: 600;
  }
  .site-header .tagline {
    font-size: 1rem;
    opacity: 0.8;
    margin-left: 10px;
  }
  
  /* =========== Кнопка очистки истории в заголовке окна ======= */
  .chat-header .clear-history {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--header-text);
    opacity: 0.7;
    transition: opacity var(--transition-speed) ease,
                color var(--transition-speed) ease;
  }
  .chat-header .clear-history:hover {
    opacity: 1;
    color: var(--user-bubble);
  }
  .chat-header .clear-history:active {
    opacity: 0.9;
  }
  .chat-header .clear-history .icon-trash {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    /* svg использует stroke="currentColor" */
  }
  
  /* =========== Футер сайта (footer) ======= */
  .site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    box-shadow: none;
    color: var(--footer-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    backdrop-filter: blur(10px);
    z-index: 100;
    font-size: 0.9rem;
  }
  .site-footer a {
    color: var(--footer-text);
    text-decoration: none;
    margin: 0 8px;
    transition: color var(--transition-speed) ease;
  }
  .site-footer a:hover {
    color: var(--user-bubble);
  }
  
  /* =========== Навигация между окнами ======= */
  .chat-nav {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: calc(100% - 32px);
    max-width: 900px;
    height: var(--nav-height);
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    z-index: 100;
  }
  .nav-button {
    flex: 1;
    background-color: var(--nav-button-bg);
    color: var(--nav-button-color);
    border: none;
    border-radius: var(--border-radius);
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition:
      background-color var(--transition-speed) ease,
      transform var(--transition-speed) ease;
    text-align: center;
  }
  .nav-button[aria-selected='true'] {
    background-color: var(--nav-button-active);
    color: var(--nav-button-color-active);
  }
  .nav-button:hover:not([aria-selected='true']) {
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
  }
  
  /* =========== Модальные окна ======= */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  .modal-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
  }
  .modal-content {
    position: relative;
    background: white;
    padding: 1rem;
    max-width: 80%;
    max-height: 80%;
    overflow-y: auto;
    border-radius: 4px;
  }
  .modal-content .close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
  }
  
  /* Специально для превью окна (Window 3) */
  #preview-container-3.modal .modal-content {
    background: rgba(20,20,30,0.95) !important;
    color: #e0e0e0 !important;
  }
  #preview-container-3.modal .modal-content h3 {
    color: #fff !important;
  }
  #preview-container-3.modal #preview-text-3 {
    background: rgba(30,30,50,0.9) !important;
    color: #e0e0e0 !important;
    font-family: monospace !important;
    font-size: 0.9rem !important;
    padding: 0.5rem !important;
    border-radius: var(--border-radius) !important;
    max-height: 60vh !important;
    overflow: auto !important;
  }
  #preview-container-3.modal .close-btn {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
  }
  
  /* =========== Window 6: AI Settings ======= */
#chat-7 .chat-content form#settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;                  /* отступы между полями */
  }
  
  #chat-7 .settings-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  #chat-7 .settings-group label {
    font-weight: 600;
    color: #e0e0e0;
    font-size: 0.95rem;
  }
  
  #chat-7 .settings-group textarea,
  #chat-7 .settings-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    background-color: #2a2a2e;
    color: #ddd;
    font-size: 0.9rem;
    transition: border-color var(--transition-speed) ease;
  }
  
  #chat-7 .settings-group textarea:focus,
  #chat-7 .settings-group input[type="text"]:focus {
    border-color: var(--user-bubble);
    outline: none;
  }
  
  #chat-7 .toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
  }
  
  #chat-7 .toggle-switch label {
    margin: 0; /* чтобы лейбл не нёс лишних отступов */
  }
  
  #chat-7 #settings-form button[type="submit"] {
    align-self: flex-start;
    background-color: var(--nav-button-active);
    color: var(--nav-button-color-active);
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color var(--transition-speed) ease,
                transform var(--transition-speed) ease;
  }
  
  #chat-7 #settings-form button[type="submit"]:hover {
    background-color: var(--user-bubble);
    transform: translateY(-2px);
  }
  
  #chat-7 #settings-form button[type="submit"]:active {
    transform: translateY(0);
  }
  