body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #a8c4e5;
    overscroll-behavior: none;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.chat-container {
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
    width: 100%;
}

.chat-area {
    height: calc(100vh - 126px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    background: #fff;
}

.bot-message {
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 6px;
    max-width: 85%;
    padding: 8px 12px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.user-message {
    background-color: #cce4ff;
    border-radius: 8px;
    margin-bottom: 6px;
    max-width: 85%;
    margin-left: auto;
    padding: 6px 12px !important;
    min-height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-message > div:first-child {
    padding: 0;
    margin: 0;
    font-size: 15px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.option-button {
    background-color: #f2f3f5;
    border-radius: 10px;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.option-button:hover, .option-button.selected {
    background-color: #5181b8;
    color: white;
}

.typing-indicator {
    display: flex;
    padding: 12px 16px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: bounce 1.3s linear infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

.chat-input {
    border-top: 1px solid #e7e8ec;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.bot-message, .user-message {
    animation: fadeIn 0.3s ease-out;
}

.submit-btn {
    background-color: #5181b8;
    color: white;
    border-radius: 4px;
    padding: 12px 48px;
    width: auto;
    text-align: center;
    margin-top: 20px;
    margin-left: auto;
    margin-right: 15%;
    display: block;
}

.emoji {
    font-size: 1.2rem;
}

.iti {
    width: 100%;
}

.iti__flag {
    background-image: url("../images/flags.png");
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .iti__flag {
        background-image: url("../images/flags%402x.png");
    }
}

.error {
    border-color: #f44336 !important;
}

#phoneInputContainer {
    border-top: 1px solid #e7e8ec;
}

.iti__selected-flag {
    padding: 0 12px 0 12px;
}

.iti--separate-dial-code .iti__selected-flag {
    background-color: #f5f5f5;
    border-radius: 8px 0 0 8px;
}

#tempPhoneInput {
    height: 42px;
    border-radius: 0 8px 8px 0;
    padding-left: 10px;
}

.header {
    background-color: #5181b8;
    padding: 8px 16px;
}

.chat-input input {
    border-radius: 16px;
}

.chat-input .text-gray-500,
.chat-input .text-blue-500 {
    color: #9aa0a6 !important;
}

.message-time {
    font-size: 0.7rem;
    color: rgba(142, 154, 163, 0.6);
    text-align: right;
    margin-top: 2px;
    position: absolute;
    bottom: 4px;
    right: 8px;
}

.user-message, .bot-message {
    position: relative;
    padding-bottom: 18px !important;
}

.hidden {
    display: none !important;
}

#tempPhoneInput {
    height: 36px;
    padding-left: 5px;
}

.iti__flag-container {
    margin-top: -2px;
}

#phoneInputContainer .submit-btn {
    padding: 6px 20px;
    font-size: 14px;
    margin-top: 5px;
}

.dropdown {
    position: relative;
    display: inline-block;
    margin-left: auto;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 8px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
    color: #5181b8;
}

.dropdown-content.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-content a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-content a:last-child {
    border-radius: 0 0 8px 8px;
}

/* Адаптивные стили для мобильных устройств */
@media screen and (max-width: 480px) {
    .chat-container {
        max-width: 100%;
    }

    .header {
        padding: 8px 12px;
    }

    .avatar {
        width: 32px !important;
        height: 32px !important;
    }

    .header .font-medium {
        font-size: 14px;
    }

    .header .text-xs {
        font-size: 11px;
    }

    .chat-area {
        height: calc(100vh - 110px);
        padding: 8px;
    }

    .bot-message, .user-message {
        max-width: 90%;
        font-size: 14px;
    }

    .option-button {
        padding: 8px;
        font-size: 13px;
    }

    .chat-input {
        padding: 8px;
    }

    .chat-input input {
        font-size: 14px;
        padding: 8px 12px;
    }

    .submit-btn {
        padding: 8px 24px;
        font-size: 14px;
    }

    /* Адаптивный футер */
    footer {
        padding: 16px;
    }

    footer .grid {
        gap: 24px;
    }

    footer h3 {
        font-size: 16px;
    }

    footer p, footer li {
        font-size: 14px;
    }

    footer .space-y-2 {
        gap: 8px;
    }
}

/* Адаптивные стили для планшетов */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .chat-container {
        max-width: 100%;
    }

    .header {
        padding: 12px 16px;
    }

    .chat-area {
        height: calc(100vh - 120px);
    }

    .bot-message, .user-message {
        max-width: 85%;
    }

    footer {
        padding: 24px;
    }
}

/* Улучшения для больших экранов */
@media screen and (min-width: 769px) {
    .chat-container {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }

    footer {
        padding: 32px;
    }
}

/* Улучшения для очень маленьких экранов */
@media screen and (max-width: 320px) {
    .header .font-medium {
        font-size: 13px;
    }

    .bot-message, .user-message {
        max-width: 95%;
        font-size: 13px;
    }

    .option-button {
        padding: 6px;
        font-size: 12px;
    }

    .chat-input input {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Улучшения для ландшафтной ориентации на мобильных */
@media screen and (max-height: 480px) and (orientation: landscape) {
    .chat-area {
        height: calc(100vh - 90px);
    }

    .header {
        padding: 6px 12px;
    }

    .chat-input {
        padding: 6px;
    }
}

/* Улучшения для устройств с высоким DPI */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .bot-message, .user-message {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Улучшения для устройств с поддержкой hover */
@media (hover: hover) {
    .option-button:hover {
        transform: translateY(-1px);
    }

    .chat-input button:hover {
        opacity: 0.8;
    }
}

/* Улучшения для устройств с тачскрином */
@media (hover: none) {
    .option-button:active {
        transform: scale(0.98);
    }

    .chat-input button:active {
        opacity: 0.7;
    }
} 