:root {
    --vh: 1vh; /* Will be set by JavaScript to actual viewport height */
    --theme-background-color: #000000;
    --action-message-bg: #48576166;
    --border-radius-messages: 20px;
    --font-weight-semibold: 600;
    --color-white: #ffffff;
    --gift-block-width: 223px;
    --gift-block-height: 258px;
    --gift-details-scale: 1;
    --gift-action-button-height: auto;
    --gift-stars-container-scale: 1;
    --gift-star-size: 1rem;
    --gift-icon-size: 47px;
    /* Selected pattern URL - один паттерн для всех 12 позиций */
    --gift-selected-pattern-url: '';
    
    /* Individual pattern parameters */
    --pattern-0-size: 40px;
    --pattern-0-opacity: 0.3;
    --pattern-0-scale: 1;
    --pattern-0-top: 10%;
    --pattern-0-left: 5%;
    
    --pattern-1-size: 40px;
    --pattern-1-opacity: 0.3;
    --pattern-1-scale: 1;
    --pattern-1-top: 15%;
    --pattern-1-right: 10%;
    
    --pattern-2-size: 40px;
    --pattern-2-opacity: 0.3;
    --pattern-2-scale: 1;
    --pattern-2-top: 30%;
    --pattern-2-left: 8%;
    
    --pattern-3-size: 40px;
    --pattern-3-opacity: 0.3;
    --pattern-3-scale: 1;
    --pattern-3-top: 35%;
    --pattern-3-right: 15%;
    
    --pattern-4-size: 40px;
    --pattern-4-opacity: 0.3;
    --pattern-4-scale: 1;
    --pattern-4-top: 50%;
    --pattern-4-left: 12%;
    
    --pattern-5-size: 40px;
    --pattern-5-opacity: 0.3;
    --pattern-5-scale: 1;
    --pattern-5-top: 55%;
    --pattern-5-right: 8%;
    
    --pattern-6-size: 40px;
    --pattern-6-opacity: 0.3;
    --pattern-6-scale: 1;
    --pattern-6-bottom: 30%;
    --pattern-6-left: 10%;
    
    --pattern-7-size: 40px;
    --pattern-7-opacity: 0.3;
    --pattern-7-scale: 1;
    --pattern-7-bottom: 25%;
    --pattern-7-right: 12%;
    
    --pattern-8-size: 40px;
    --pattern-8-opacity: 0.3;
    --pattern-8-scale: 1;
    --pattern-8-bottom: 15%;
    --pattern-8-left: 15%;
    
    --pattern-9-size: 40px;
    --pattern-9-opacity: 0.3;
    --pattern-9-scale: 1;
    --pattern-9-bottom: 10%;
    --pattern-9-right: 18%;
    
    --pattern-10-size: 40px;
    --pattern-10-opacity: 0.3;
    --pattern-10-scale: 1;
    --pattern-10-top: 45%;
    --pattern-10-left: 50%;
    
    --pattern-11-size: 40px;
    --pattern-11-opacity: 0.3;
    --pattern-11-scale: 1;
    --pattern-11-bottom: 20%;
    --pattern-11-left: 50%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow: hidden;
    width: 100%;
}

body {
    background-color: #000000;
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Roboto", "Apple Color Emoji", "Helvetica Neue", sans-serif;
    font-weight: 500;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Header bar with avatar and name */
.header-bar {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 9px 14px 7px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    position: fixed;
    top: 40px;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-back {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 4px;
}

.header-back-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
    margin-left: auto;
}

.header-call {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.header-call-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.header-others {
    width: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.header-others-icon {
    width: 57px;
    object-fit: contain;
    display: block;
}

.header-more {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.header-more-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.header-status {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.2;
}

/* Mobile phone view - no size restrictions */
.dialog-container {
    padding: 0 12px;
    padding-top: 64px; 
    padding-bottom: 20px;
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 40px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    /* Background will be set dynamically via JavaScript */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-color: #000000;
}


.message {
    display: flex;
    width: 100%;
    animation: fadeIn 0.3s ease-in;
    margin-top: 2px;
}

/* Больший отступ между сообщениями разных ролей */
.message.different-role-spacing {
    margin-top: 8px !important;
}

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

