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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-image: url('/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    background-color: #f0f0f0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    flex-shrink: 0;
    margin-bottom: 20px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.header-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.main-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.chat-container {
    display: flex;
    flex-direction: column;
    background: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    height: auto;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin: 0;
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    min-height: 100px;
    max-height: calc(100vh - 300px);
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

.chat-toggle {
    display: none !important;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 12px;
    word-wrap: break-word;
}

.user-message {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
}

.bot-message {
    background-color: #f1f1f1;
    color: #333;
    align-self: flex-start;
}

.chat-input {
    flex-shrink: 0;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    width: 100%;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.chat-input button {
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
}

.chat-input button:hover {
    background-color: #0056b3;
}

.gift-list-container {
    background: none;
    box-shadow: none;
    padding: 0;
    margin: 0 0 30px 0;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 10px;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10px,
        black calc(100% - 10px),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10px,
        black calc(100% - 10px),
        transparent 100%
    );
}

.gift-items {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px;
    scroll-behavior: smooth;
    padding-right: 20px;
    padding-left: 20px;
}

.gift-item {
    flex: 0 0 300px;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    background: white;
    position: relative;
}

.gift-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.gift-link:hover {
    text-decoration: none;
}

.remove-gift {
    position: absolute;
    top: 10px;
    right: 10px;
    color: red;
    cursor: pointer;
    font-weight: bold;
    font-size: 24px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    z-index: 1;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-details {
    display: flex;
    gap: 15px;
    flex: 1;
}

.gift-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-right: 25px;
    min-height: 200px;
}

.gift-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #2c3e50;
}

.gift-description {
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    flex: 1;
}

.gift-reason {
    color: #2196f3;
    font-style: italic;
}

.gift-price {
    font-weight: bold;
    color: #4caf50;
    margin-top: auto;
}

.gift-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 5px;
    flex-shrink: 0;
}

.gift-details a {
    color: inherit;
    text-decoration: none;
}

.gift-details a:hover {
    text-decoration: none;
}

.typing-indicator {
    align-self: flex-start;
    background-color: #f1f1f1;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 8px 0;
    display: none;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #666;
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

.boxes-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.info-box {
    flex: 1;
    height: 200px; /* Adjust height as needed */
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.gift-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* Add responsive styles for mobile devices */
@media screen and (max-width: 768px) {
    .gift-item {
        flex: 0 0 250px;  /* Smaller width on mobile */
    }

    .gift-image {
        width: 150px;  /* Smaller image on mobile */
        height: 150px;
    }

    .gift-text {
        min-height: 150px;
    }
}
