* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    overscroll-behavior: contain;
    height: 100%;
}


body {
    background-color: #1a1a2e;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#main-title {
    color: #d8aaff;
    font-size: 2.5em;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 8px rgba(216, 170, 255, 0.5);
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    transition: opacity 0.5s ease-out;
    opacity: 1;
}

#main-title.hidden {
    opacity: 0 !important;
    pointer-events: none;
}


.hidden {
    display: none !important;
}


#name-entry-screen,
#gender-selection-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #2a2a3e);
    padding: 20px;
    transition: opacity 0.5s ease-out;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    opacity: 0;
}

.name-entry-box,
.gender-selection-box {
    background-color: rgba(42, 42, 62, 0.9);
    padding: 40px 35px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
    max-width: 420px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.name-entry-box h1,
.gender-selection-box h1 {
    color: #d8aaff;
    margin-bottom: 15px;
    font-size: 2.1em;
    font-weight: 600;
}

.name-entry-box p,
.gender-selection-box p {
    margin-bottom: 25px;
    color: #c0c0e0;
    font-size: 1.1em;
    line-height: 1.5;
}

#name-input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 20px;
    border: 1px solid #5a5a7a;
    border-radius: 25px;
    background-color: #3a3a5a;
    color: #e0e0e0;
    font-size: 1.1em;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#name-input::placeholder {
    color: #8888a0;
}

#name-input:focus {
    border-color: #d8aaff;
    box-shadow: 0 0 15px rgba(216, 170, 255, 0.3);
}

#submit-name-button {
    padding: 13px 35px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(to right, #b388ff, #d8aaff);
    color: #331a4d;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 12px rgba(179, 136, 255, 0.35);
}

.gender-buttons button {
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(to right, #b388ff, #d8aaff);
    color: #331a4d;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(179, 136, 255, 0.3);
    display: block;
    width: 100%;
}


#submit-name-button:hover,
.gender-buttons button:hover {
    background: linear-gradient(to right, #d8aaff, #b388ff);
    box-shadow: 0 7px 18px rgba(179, 136, 255, 0.5);
}

#submit-name-button:active,
.gender-buttons button:active {
    transform: scale(0.97);
    box-shadow: 0 3px 8px rgba(179, 136, 255, 0.4);
}

.gender-buttons {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 20px;
}

.gender-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 120px;
}

.gender-option img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #d8aaff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}


.error-message {
    color: #ff8080;
    font-size: 0.95em;
    margin-top: 12px;
    height: 1.3em;
    font-weight: 500;
}

#chat-screen {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    transition: opacity 0.5s ease-in;
    opacity: 0;
    display: flex;
    flex-direction: column;
}


#chat-container {
    background-color: #1e1e30;
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


#chat-header {
    background: linear-gradient(to right, rgba(42, 42, 62, 0.85), rgba(58, 58, 90, 0.85));
    padding: 10px 15px;
    border-bottom: 1px solid rgba(90, 90, 122, 0.7);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    z-index: 10;
    position: relative;
}

#chat-header .header-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

#profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #d8aaff;
    margin-right: 15px;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(216, 170, 255, 0.45);
    flex-shrink: 0;
}

.header-title-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-right: 15px;
    overflow: hidden;
}


#chat-header h2 {
    margin: 0;
    font-size: 1.3em;
    color: #f0f0f5;
    font-weight: 600;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #70f080;
    border-radius: 50%;
    margin-left: 10px;
    box-shadow: 0 0 9px #70f080;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.header-signature {
    font-size: 0.7em;
    color: rgba(224, 224, 224, 0.7);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.signature-glow {
    color: #d8aaff;
    text-shadow: 0 0 5px #d8aaff, 0 0 8px #b388ff;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 4px #d8aaff, 0 0 6px #b388ff;
    }

    to {
        text-shadow: 0 0 7px #d8aaff, 0 0 12px #b388ff, 0 0 3px #e0e0e0;
    }
}

.header-buttons-container {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.header-button-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#reset-chat-button,
#clear-chat-button,
#background-button,
#help-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #c0c0e0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.1s ease;
    flex-shrink: 0;
}

#background-button i,
#help-button i {
    font-size: 16px;
}


#reset-chat-button:hover,
#clear-chat-button:hover,
#background-button:hover,
#help-button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

#reset-chat-button:active,
#clear-chat-button:active,
#background-button:active,
#help-button:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.9);
}

#reset-chat-button svg,
#clear-chat-button svg {
    display: block;
}

.header-button-label {
    font-size: 0.65em;
    color: #a0a0c0;
    margin-top: 2px;
    font-weight: 500;
}

#chat-log {
    flex-grow: 1;
    padding: 15px;
    padding-bottom: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: rgba(26, 26, 46, 0.85);
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
}


#chat-log::-webkit-scrollbar {
    width: 8px;
}

#chat-log::-webkit-scrollbar-track {
    background: rgba(42, 42, 62, 0.5);
    border-radius: 10px;
}

#chat-log::-webkit-scrollbar-thumb {
    background-color: rgba(142, 106, 201, 0.7);
    border-radius: 10px;
    border: 2px solid rgba(42, 42, 62, 0.5);
}

#chat-log::-webkit-scrollbar-thumb:hover {
    background-color: rgba(160, 124, 224, 0.8);
}

.message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 75%;
    width: fit-content;
    line-height: 1.45;
    word-wrap: break-word;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(10px);
    animation: messageSlideIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    position: relative;
    font-size: 1.0em;
    margin-bottom: 2px;
    display: flex;
    align-items: flex-start;
    z-index: 2;
}

.message-inner-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.message-content {}

.message-content img.sent-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    margin-top: 5px;
    display: block;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.message-signature {
    font-size: 0.7em;
    color: rgba(224, 224, 224, 0.7);
    margin-top: 5px;
    align-self: flex-start;
    display: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.elaina-message .message-signature {
    display: block;
}


.edit-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0 0 0 8px;
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: 5px;
    line-height: 1.45;
    align-self: center;
    flex-shrink: 0;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

.message:hover .edit-button {
    opacity: 1;
}

.message.editing .edit-button {
    display: none;
}

.editing-input {
    flex-grow: 1;
    padding: 8px 10px;
    border: 1px solid #8e6ac9;
    border-radius: 15px;
    background-color: rgba(63, 63, 106, 0.9);
    color: #e0e0e0;
    outline: none;
    font-size: 1em;
    line-height: 1.4;
    margin-right: 5px;
    width: 100%;
    resize: none;
    min-height: 30px;
    overflow-y: auto;
}

.edit-controls {
    display: flex;
    align-items: center;
    margin-left: 5px;
    gap: 5px;
    flex-shrink: 0;
}

.save-edit-button,
.cancel-edit-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    padding: 3px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

.save-edit-button {
    color: #70f080;
}

.cancel-edit-button {
    color: #ff8080;
}

.save-edit-button:hover {
    color: #afffb7;
}

.cancel-edit-button:hover {
    color: #ffabab;
}


@keyframes messageSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.9), rgba(0, 86, 179, 0.9));
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    margin-left: auto;
}

.elaina-message {
    background: linear-gradient(135deg, rgba(179, 136, 255, 0.9), rgba(138, 43, 226, 0.9));
    color: #ffffff;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    margin-right: auto;
}

.elaina-message img {
    display: block;
    border-radius: 12px;
    margin-top: 8px;
    max-width: 100%;
    width: 320px;
    height: 320px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    vertical-align: bottom;
}

.elaina-message.photo-message {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border-radius: 12px;
    overflow: visible;
    width: fit-content;
    max-width: 320px;
    height: auto;
    background-image: none;
    display: block;
}

.elaina-message.photo-message .message-inner-wrapper {
    display: contents;
}

.elaina-message.photo-message .message-content {
    display: contents;
}

.elaina-message.photo-message .message-signature {
    display: none;
}

.elaina-message.photo-message img {
    margin-top: 0;
    border: 3px solid #d8aaff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.elaina-message em {
    font-style: italic;
    color: #ffe0ff;
    opacity: 0.9;
}

.elaina-message strong {
    font-weight: bold;
    color: #fff;
}

.elaina-message code {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.1em 0.3em;
    border-radius: 4px;
    font-family: monospace;
}

.intro-message {
    background-color: rgba(42, 42, 62, 0.85);
    color: #c0c0e0;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 0.95em;
    line-height: 1.6;
    border: 1px solid #4a4a6a;
    text-align: center;
    margin: 5px auto 15px auto;
    max-width: 90%;
    align-self: center;
    opacity: 0;
    transform: translateY(10px);
    animation: messageSlideIn 0.6s ease-out forwards;
    animation-delay: 0.2s;
    display: block;
    z-index: 2;
}

.intro-message strong {
    color: #d8aaff;
    font-weight: 600;
}

#typing-indicator {
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 5px 15px !important;
    opacity: 0;
    transform: translateY(10px);
    animation: messageSlideIn 0.5s ease-out forwards;
    align-self: flex-start;
    margin-right: auto;
    margin-left: 0;
    margin-bottom: 2px;
    display: block;
    z-index: 2;
}

#typing-indicator p {
    margin: 0;
    display: flex;
    align-items: center;
    background-color: rgba(179, 136, 255, 0.4);
    padding: 8px 15px;
    border-radius: 20px;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dot-flashing {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #d8aaff;
    color: #d8aaff;
    animation: dotFlashing 1.2s infinite linear;
    margin: 0 3px;
}

.dot-flashing:nth-child(1) {
    animation-delay: 0s;
}

.dot-flashing:nth-child(2) {
    animation-delay: 0.2s;
}

.dot-flashing:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotFlashing {

    0%,
    60%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    30% {
        transform: scale(1);
        opacity: 1;
    }
}

#input-wrapper {
    position: relative;
    flex-shrink: 0;
    background-color: #2a2a3e;
}

#image-preview-area {
    background-color: rgba(42, 42, 62, 0.95);
    padding: 5px 15px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 90;
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    border-bottom: 1px solid #3a3a5a;
}

#image-preview-area:not(.hidden) {
    max-height: 60px;
    opacity: 1;
}

#image-preview {
    height: 40px;
    width: 40px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    margin: 5px 0;
}

#remove-image-button {
    background: rgba(255, 80, 80, 0.8);
    border: none;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    font-weight: bold;
    flex-shrink: 0;
}

#remove-image-button:hover {
    background: rgba(255, 50, 50, 0.9);
}

#input-area {
    display: flex;
    padding: 10px 15px;
    border-top: 1px solid #5a5a7a;
    background-color: #2a2a3e;
    align-items: center;
    position: relative;
    z-index: 95;
}

#emoji-button,
#image-upload-button {
    background: none;
    border: none;
    color: #d8aaff;
    font-size: 1.6em;
    cursor: pointer;
    padding: 5px 8px;
    margin-right: 5px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

#image-upload-button {
    font-size: 1.2em;
    padding: 5px 10px 5px 5px;
}

#emoji-button:hover,
#image-upload-button:hover {
    transform: scale(1.1);
}

#user-input {
    flex-grow: 1;
    padding: 12px 18px;
    border: 1px solid #5a5a7a;
    border-radius: 22px;
    background-color: #3a3a5a;
    color: #e0e0e0;
    margin-right: 10px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-size: 1em;
    resize: none;
    line-height: 1.4;
    max-height: 120px;
    overflow-y: hidden;
}

#user-input::placeholder {
    color: #8888a0;
}

#user-input:focus {
    border-color: #b388ff;
    box-shadow: 0 0 10px rgba(179, 136, 255, 0.2);
}

#send-button {
    padding: 10px;
    border: none;
    border-radius: 50%;
    background-color: #b388ff;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.1s ease;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
}

#send-button:hover {
    background-color: #d8aaff;
}

#send-button:active {
    background-color: #8A2BE2;
    transform: scale(0.92);
}

#send-button svg {
    width: 22px;
    height: 22px;
    fill: white;
}

#emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 10px;
    background-color: #33334d;
    border: 1px solid #5a5a7a;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.4);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
    gap: 10px;
    width: calc(100% - 20px);
    max-width: 400px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, bottom 0.3s ease;
    pointer-events: none;
    margin-bottom: 5px;
}

#emoji-picker.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#emoji-picker span {
    font-size: 1.6em;
    cursor: pointer;
    padding: 3px;
    transition: transform 0.1s ease;
    text-align: center;
    line-height: 1;
}

#emoji-picker span:hover {
    transform: scale(1.2);
}

#reset-modal-overlay,
#clear-modal-overlay,
#help-modal-overlay,
#brightness-control-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

#reset-modal-overlay.visible,
#clear-modal-overlay.visible,
#help-modal-overlay.visible,
#brightness-control-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: #2a2a3e;
    padding: 30px 35px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 1px solid #4a4a6a;
    transform: scale(0.9);
    transition: transform 0.3s ease-out;
}

#reset-modal-overlay.visible .modal-box,
#clear-modal-overlay.visible .modal-box,
#help-modal-overlay.visible .modal-box,
#brightness-control-overlay.visible .modal-box {
    transform: scale(1);
}

.modal-box h3 {
    color: #d8aaff;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.modal-box p {
    color: #c0c0e0;
    margin-bottom: 25px;
    line-height: 1.6;
}

.help-content {
    text-align: left;
    color: #c0c0e0;
    margin-bottom: 25px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.help-content h4 {
    color: #d8aaff;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.help-content ul,
.help-content ol {
    margin-left: 20px;
    line-height: 1.7;
}

.help-content li {
    margin-bottom: 8px;
}

.help-content code,
.help-content i {
    color: #f0f0f5;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-family: monospace;
    font-style: normal;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-top: 25px;
}

.modal-button {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    flex-grow: 1;
}

.modal-button.confirm {
    background-color: #ff6b6b;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.modal-button.confirm.blue {
    background-color: #6b95ff;
    box-shadow: 0 4px 10px rgba(107, 149, 255, 0.3);
}

.modal-button.confirm:hover {
    background-color: #ff4d4d;
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

.modal-button.confirm.blue:hover {
    background-color: #4d7eff;
    box-shadow: 0 6px 15px rgba(107, 149, 255, 0.4);
}

.modal-button.confirm:active {
    background-color: #e03e3e;
    transform: scale(0.95);
}

.modal-button.confirm.blue:active {
    background-color: #3e6ae0;
    transform: scale(0.95);
}

.modal-button.cancel {
    background-color: #5a5a7a;
    color: #e0e0e0;
    box-shadow: 0 4px 10px rgba(90, 90, 122, 0.2);
}

.modal-button.cancel:hover {
    background-color: #707090;
    box-shadow: 0 6px 15px rgba(90, 90, 122, 0.3);
}

.modal-button.cancel:active {
    background-color: #4a4a6a;
    transform: scale(0.95);
}

.brightness-control-box label {
    display: block;
    margin-bottom: 10px;
    color: #c0c0e0;
    font-weight: 500;
}

#brightness-slider {
    width: 100%;
    cursor: pointer;
    accent-color: #b388ff;
    margin-bottom: 5px;
}

.music-results-container {
    background: linear-gradient(135deg, rgba(179, 136, 255, 0.8), rgba(138, 43, 226, 0.8));
    border-radius: 15px;
    padding: 10px 5px 10px 15px;
    margin-top: 5px;
    max-height: 150px;
    overflow-y: auto;
    border-bottom-left-radius: 5px;
    width: 100%;
    max-width: calc(100% - 10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.music-results-container::-webkit-scrollbar {
    width: 6px;
}

.music-results-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin-right: 5px;
}

.music-results-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.music-results-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

.music-result-item {
    padding: 8px 10px 8px 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: background-color 0.2s ease;
    color: #ffffff;
}

.music-result-item:last-child {
    border-bottom: none;
}

.music-result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.music-result-item .title {
    font-weight: 600;
    font-size: 0.95em;
    display: block;
}

.music-result-item .artist {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-top: 2px;
}

#mini-music-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(160, 124, 224, 0.9), rgba(110, 40, 180, 0.9));
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    margin-top: 8px;
    max-width: 75%;
    width: fit-content;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    font-size: 0.9em;
    align-self: flex-start;
    margin-right: auto;
    animation: messageSlideIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
    transform: translateY(10px);
}

#mini-music-player .player-info {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
}

#mini-music-player .player-title {
    font-weight: 600;
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
}

#mini-music-player .player-artist {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.85);
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
}

#mini-music-player button#player-play-pause {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
    padding: 0;
}

#mini-music-player button#player-play-pause:hover {
    background: rgba(255, 255, 255, 0.3);
}

#mini-music-player button#player-play-pause:active {
    transform: scale(0.9);
}