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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 0;
}

.chat-container {
    max-width: 900px;
    margin: 0 auto;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255, 182, 193, 0.3), 0 0 0 1px rgba(255, 182, 193, 0.2);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.chat-header {
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    color: white;
    padding: 20px 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.chat-header h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 0.95em;
    opacity: 0.95;
    margin-bottom: 15px;
}

/* Language and Controls */
.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.language-selector-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9em;
}

.language-dropdown {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid white;
    color: #ff69b4;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.language-dropdown:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.clear-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: white;
    color: #ff69b4;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 250, 250, 0.5), rgba(255, 235, 238, 0.3));
    scroll-behavior: smooth;
}

.message {
    display: flex;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

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

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    flex-shrink: 0;
    margin-right: 12px;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.3);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #ffc0cb, #ffb6c1);
    margin-right: 0;
    margin-left: 12px;
}

.message-content {
    max-width: 70%;
    padding: 15px 18px;
    border-radius: 15px;
    line-height: 1.6;
    word-wrap: break-word;
}

.bot-message .message-content {
    background: white;
    border: 1px solid rgba(255, 182, 193, 0.3);
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.15);
    color: #333;
}

.user-message .message-content {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.3);
}

.message-content p {
    margin-bottom: 10px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

.typing-indicator {
    padding: 0 20px 20px 20px;
}

.typing-dots {
    display: flex;
    gap: 5px;
    padding: 10px 0;
}

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

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

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

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.chat-input-container {
    padding: 20px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 2px solid rgba(255, 182, 193, 0.3);
    box-shadow: 0 -4px 15px rgba(255, 182, 193, 0.1);
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#messageInput {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ffc0cb;
    border-radius: 12px;
    font-size: 1em;
    font-family: inherit;
    resize: none;
    max-height: 150px;
    min-height: 45px;
    background: white;
    transition: all 0.3s ease;
}

#messageInput:focus {
    outline: none;
    border-color: #ff69b4;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

.send-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

.send-btn:active {
    transform: translateY(0);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.char-counter {
    text-align: right;
    font-size: 0.85em;
    color: #ff69b4;
    margin-top: 5px;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 182, 193, 0.1);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff1493, #ff69b4);
}

/* Copy button for lyrics */
.copy-btn {
    background: rgba(255, 105, 180, 0.1);
    border: 1px solid #ff69b4;
    color: #ff69b4;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #ff69b4;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        height: 100vh;
        border-radius: 0;
        margin: -20px;
    }

    .chat-header {
        padding: 15px 20px;
    }

    .chat-header h1 {
        font-size: 1.4em;
    }

    .header-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .language-selector-compact {
        justify-content: space-between;
    }

    .clear-btn {
        width: 100%;
    }

    .message-content {
        max-width: 85%;
    }

    .chat-messages {
        padding: 15px;
    }

    .chat-input-container {
        padding: 15px;
    }

    body {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .chat-header h1 {
        font-size: 1.2em;
    }

    .subtitle {
        font-size: 0.85em;
    }

    .message-avatar {
        width: 35px;
        height: 35px;
        font-size: 1.2em;
    }

    .message-content {
        max-width: 80%;
        padding: 12px 15px;
        font-size: 0.95em;
    }

    .language-dropdown {
        font-size: 0.85em;
        padding: 5px 10px;
    }
}
