/* ----- Общие стили ----- */
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    font-weight: normal;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    /* Фон по умолчанию, если видео/картинка не загрузятся */
    background-color: #1a1a1a;
}

/* Фон */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#background-video,
#background-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Обертка контента */
.wrapper {
    perspective: 1000px;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center; /* Добавлено для выравнивания, если .container один */
    z-index: 1;
    padding-top: 60px; /* Отступ от тулбара */
}

/* Контейнер */
.container {
    width: 450px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37), 0 0 15px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transform-style: preserve-3d;
    transition: transform 0.05s linear, box-shadow 0.3s ease, border 0.3s ease;
    opacity: 0; /* Изначально скрыт, будет показан анимацией */
}

.container:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Анимация появления */
#main-container {
    animation: slideInCenter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInCenter { /* Общая анимация для одного контейнера */
    0% { transform: translateY(50px) scale(0.9) rotateX(-10deg); opacity: 0; }
    60% { transform: translateY(-10px) scale(1.02) rotateX(2deg); opacity: 0.7; }
    100% { transform: translateY(0) scale(1) rotateX(0deg); opacity: 1; }
}

/* Формы и элементы */
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { color: #ddd; font-size: 0.9rem; margin-bottom: 5px; display: block; }

.form-group input[type="number"],
.form-group select {
    width: calc(100% - 20px);
    margin: 5px auto;
    padding: 10px;
    border-radius: 10px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.2);
    display: block;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(50, 50, 50, 0.7); /* Темнее фон для select */
    color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff' width='18px' height='18px'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.price-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}
.price-group label { color: #ddd; font-size: 0.9rem; margin-bottom: 5px; }
.price-inputs { display: flex; align-items: center; gap: 10px; }
.price-inputs span { color: white; }
.price-inputs input[type="number"] { flex: 1; width: auto; margin: 0; }

.form-group input[type="date"] {
    width: calc(50% - 25px); margin: 5px 0; padding: 10px; border-radius: 10px; border: none;
    outline: none; font-size: 1rem; background: rgba(255, 255, 255, 0.15); color: #fff;
    box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.2); display: inline-block;
}
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}
.reset-button {
    padding: 5px 10px; margin-top: 5px; background: rgba(255, 0, 0, 0.5); color: #fff;
    border: none; border-radius: 10px; cursor: pointer; transition: background 0.3s ease;
    font-size: 0.8rem; width: auto;
}
.reset-button:hover { background: rgba(255, 0, 0, 0.7); }

/* Адаптивность */
@media (max-width: 768px) {
    body { overflow-y: auto; }
    #background-video { display: none; }
    .wrapper { padding-top: 80px; }
    .container { width: 90%; }
    .price-inputs { flex-direction: column; }
    .price-inputs input[type="number"]{ width: calc(100% - 20px); }
}

/* Глитч */
.glitch-container { width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.stack { display: grid; grid-template-columns: 1fr; color: #FFFFFF; text-align: center; font-size: 1.5rem; font-weight: 600; font-family: 'Unbounded', sans-serif; }
.stack span {
    font-weight: bold; grid-row-start: 1; grid-column-start: 1; --stack-height: calc(100% / var(--stacks) - 1px);
    --inverse-index: calc(calc(var(--stacks) - 1) - var(--index)); --clip-top: calc(var(--stack-height) * var(--index));
    --clip-bottom: calc(var(--stack-height) * var(--inverse-index)); clip-path: inset(var(--clip-top) 0 var(--clip-bottom) 0);
    animation: stack 340ms cubic-bezier(.46, .29, 0, 1.24) 1 backwards calc(var(--index) * 120ms), glitch 2s ease infinite 2s alternate-reverse;
}
.stack span:nth-child(odd) { --glitch-translate: 8px; }
.stack span:nth-child(even) { --glitch-translate: -8px; }
@keyframes stack { /* ... (остальные стили глитча без изменений) ... */ }
@keyframes glitch { /* ... (остальные стили глитча без изменений) ... */ }


/* Кнопки */
.button-group button,
.submit-button,
.reset-button { cursor: pointer; }

.button-group { display: flex; justify-content: space-between; margin-bottom: 15px; }
.date-button, .settings-button{ /* Объединил, т.к. api-button тут нет */
    padding: 10px 15px; background: rgba(255, 255, 255, 0.2); color: #fff; border: none;
    border-radius: 10px;  font-size: 0.9rem; width: 32%; /* Ширина для трех кнопок */
    transition: background-color 0.3s ease, transform 0.1s ease;
}
.date-button.active, .settings-button.active {
    background: rgba(255, 255, 255, 0.4); font-weight: bold;
    box-shadow: 0 0 8px rgba(255,255,255,0.2);
}
.date-button:hover, .settings-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}
.date-button:active, .settings-button:active { transform: translateY(0px); }


.submit-button {
  padding: 12px 15px; background: rgba(80, 150, 255, 0.5); color: #fff; border: none;
  border-radius: 10px;  font-size: 1rem;
  width: 100%; margin-top: 15px; font-weight: 500;
  transition: background-color 0.3s ease, transform 0.1s ease;
}
.submit-button:hover {
    background: rgba(80, 150, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(80, 150, 255, 0.3);
}
.submit-button:active { transform: translateY(0px); }

/* ----- Стили Модального окна УДАЛЕНЫ ----- */

/* ----- Site Switcher Toolbar Styles (копируем из style.css) ----- */
:root { /* Эти переменные уже могут быть в body, но для тулбара можно свои */
    --toolbar-bg: hsla(0,0%,10%,0.7);
    --toolbar-fg: hsl(0,0%,90%);
    --toolbar-highlight-color: hsl(210, 100%, 60%);
    --toolbar-font-size: 17px;
    --toolbar-height: calc(var(--toolbar-font-size) * 2.3);
    --trans-dur: 0.3s;
}

#site-switcher-toolbar {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    font-size: var(--toolbar-font-size);
    background-color: var(--toolbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1.1em;
    display: inline-flex;
    gap: 0.2em;
    align-items: center;
    padding: 0.2em;
    height: var(--toolbar-height);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.toolbar__button {
    font-size: 1em;
    background-color: transparent;
    color: var(--toolbar-fg);
    text-decoration: none;
    border: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0 0.5em;
    border-radius: calc((var(--toolbar-height) - 0.4em) / 2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: calc(var(--toolbar-height) - 0.4em);
    min-width: calc(var(--toolbar-height) - 0.4em);
    outline: transparent;
    transition: background-color var(--trans-dur), color var(--trans-dur), box-shadow var(--trans-dur);
}

.toolbar__button:hover {
    background-color: hsla(0,0%,70%,0.15);
}

.toolbar__button.active-tool {
    background-color: var(--toolbar-highlight-color);
    color: white;
    box-shadow: 0 0 10px var(--toolbar-highlight-color);
}
.toolbar__button.active-tool .toolbar__icon {
    color: white;
}

.toolbar__button-tip {
    background-color: var(--toolbar-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 0.5em;
    color: var(--toolbar-fg);
    font-size: 0.625em;
    line-height: 1.2;
    margin-top: 0.6em;
    opacity: 0;
    padding: 0.4em 0.7em;
    pointer-events: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -0.5em);
    transition:
        opacity var(--trans-dur) ease-out,
        transform var(--trans-dur) ease-out,
        visibility var(--trans-dur) ease-out;
    visibility: hidden;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.toolbar__button:hover .toolbar__button-tip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.toolbar__icon {
    display: block;
    margin: auto;
    width: 1.1em;
    height: 1.1em;
    transition: color var(--trans-dur);
}