body {
    font-family: 'Poppins', sans-serif, Arial;
    line-height: 1.6;
    color: #FFFFFF;
    max-width: 800px;
    margin: 0 auto;
    padding: 12px 20px 0px 20px;
    background-color: #101010;
    background-image: url('../images/EuphonicIntelligenceBackground.png');
    background-repeat: no-repeat;
    background-position: calc(50%) calc(50% - 60px);
    background-size: 100% auto;
    background-attachment: fixed;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
}

.container {
    background-color: #161616;
    border-radius: 15px;
    padding: 20px 17px 20px 20px;
    box-shadow: 1px 4px 8px rgba(0,0,0,0.4);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    will-change: opacity;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><defs><radialGradient id='g' cx='26%' cy='78%' r='200%' gradientTransform='rotate(-47.5 0.5 0.5) scale(2 0.6)'><stop offset='0%' stop-color='%23171717'/><stop offset='100%' stop-color='%23121212'/></radialGradient></defs><rect width='100%' height='100%' fill='url(%23g)'/></svg>");
    background-size: cover;
    pointer-events: none;
    z-index: -1;
}

/* Override due to appearance issues on Firefox */
@supports (-moz-appearance: none) {
    .container::before {
        background: #161616 !important;
    }
}

.container.loaded {
    visibility: visible;
    opacity: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
}

h1 {
    color: rgb(30, 200, 90);
    margin-top: 0;
    margin-bottom: 0px;
    margin-left: 20px;
}

h2, h3, h4, h5, h6 {
    font-size: 1.2em;
}

.musical-analysis-title {
    text-align: center;
    font-size: 1.5em;
}

.playlist-title {
    font-size: 1.2em;
    font-weight: 400;
    color: #e0e0e0;
    text-align: center;
    margin: 15px auto 21px auto;
    border: 2px solid rgb(30, 200, 90);
    border-radius: 15px;
    box-shadow: 0 0 18px rgba(30, 200, 90, 0.3);
    background: rgba(30, 200, 90, 0.02);
    width: fit-content;
    max-width: 90%;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 4.5px;
    padding-bottom: 4.5px;
    min-width: 30%;
}

.button {
    display: inline-block;
    background-color:rgb(30, 200, 90);
    color: #0C0C0C;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background-color 0.3s;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}

@media (min-width: 769px) {
    .button:hover {
        background-color: rgb(25, 160, 75);
    }
}

.button:disabled,
.button.disabled-no-hover {
    background-color: #464646;
    cursor: not-allowed;
    pointer-events: none;
}

#chat-container {
    background-color: transparent;
    border-radius: 5px;
    padding: 0px;
    display: flex;
    flex-direction: column;
    /* The heights below are overridden by Javascript and serve only as fallbacks */
    height: calc(100vh - 257px);
    height: calc((var(--vh, 1vh) * 100) - 257px);
    height: calc(100dvh - 257px);
    width: 100%;
}

#message-list {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 5px;
    padding-right: 17.5px;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
}

#message-list::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.legal-modal-content::-webkit-scrollbar {
    width: 9px;
}

#message-list::-webkit-scrollbar-track,
.legal-modal-content::-webkit-scrollbar-track {
    background: #232323;
    border-radius: 9px;
}

#message-list::-webkit-scrollbar-thumb,
.legal-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, rgba(40, 220, 100, 0.7), rgba(20, 180, 80, 0.7));
    border-radius: 9px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, rgba(44, 242, 110, 0.8), rgba(20, 180, 80, 0.8));
    border-radius: 9px;
}

.modal-body::-webkit-scrollbar-track {
    background: #141414;
    border-radius: 9px;
}

@media (min-width: 769px) {
    #message-list::-webkit-scrollbar-thumb:hover,
    .legal-modal-content::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(to bottom, rgba(45, 230, 110, 0.7), rgba(25, 190, 90, 0.7));
    }
}

@media (min-width: 769px) {
    .modal-body::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(to bottom, rgba(44, 242, 110, 1), rgba(20, 180, 80, 1));
    }
}

@supports not selector(::-webkit-scrollbar) {
    #message-list,
    .modal-body,
    .legal-modal-content {
        scrollbar-width: auto;
        scrollbar-color: rgb(30, 200, 90) #1D1D1D;
    }
}

.message {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 84%;
    word-wrap: break-word;
    width: fit-content;
}

.message p {
    margin: 0;
}

.message p + p {
    margin-top: 1em;
}

.message a {
    color:rgb(30, 200, 90);
    text-decoration: none;
}

@media (min-width: 769px) {
    .message a:hover {
        color: rgb(0, 120, 60);
    }
}

.ai-message {
    background-color: transparent;
    color: #e0e0e0;
    align-self: flex-start;
    font-size: 0.86em;
    font-weight: 400;
    min-width: 10%;
    margin-bottom: 18px;
    margin-top: 22px;
}

.ai-message:first-child {
    margin-top: 0;
    padding-top: 0px;
    padding-bottom: 10px;
    padding-right: 15px;
    padding-left: 15px;
    max-width: 93%;
}

.ai-message.has-playlist-button {
    padding-bottom: 22px;
    margin-left: auto;
    margin-right: auto;
    margin-top: -18px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.message.ai-message.has-playlist-button ul {
    width: fit-content;
    margin: 0 auto;
}

.message.ai-message.has-playlist-button ul li {
    padding: 1.25px 0px;
}

.ai-message.long-convo-termination-options {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 50%;
    row-gap: 3px;
    text-align: center;
}

.ai-message.long-convo-termination-options .button {
    padding-left: 15px;
    padding-right: 15px;
    min-width: 150px;
}

.ai-message.previous-termination-message {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: -35px;
}

.ai-message.music-collection-updated-message {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: -35px;
    margin-top: -5px;
}

.ai-message.has-playlist-button.previous-conversation {
    padding-bottom: 6px;
}

.ai-message.thinking-message {
	padding-top: 1px;
	padding-bottom: 1px;
}

.ai-message.thinking-message .thinking-message-contents {
	display: flex;
	align-items: center;
	gap: 12px;
}

body[data-chat-mode="analysis"] .ai-message.second-message {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    max-width: 85%;
}

.user-message {
    background-color: rgba(28.5, 190, 85.5, 0.95);
    color: #0C0C0C;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    font-size: 0.86em;
    font-weight: 500;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.45);
    text-shadow: 0.75px 0.75px 1.6px rgba(27, 112, 57, 0.4);
}

.user-message a {
    color: #0C0C0C;
    text-decoration: none;
}

#chat-input-area {
    display: flex;
    align-items: center;
    padding-top: 20px;
    position: relative;
}

.chat-input-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    color: #989898;
    font-family: 'Poppins', sans-serif, Arial;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    left: calc(50% - 175px);
}

.chat-input-overlay.visible {
    opacity: 1;
}

#chat-input-area textarea {
    flex-grow: 1;
    border-radius: 20px;
    border: 1px solid #535353;
    background-color: transparent;
    color: #e0e0e0;
    resize: none;
    overflow-y: auto;
    font-family: 'Poppins', sans-serif, Arial;
    font-size: 14px;
    box-shadow: 0 0 6px rgba(30, 200, 90, 0.3), 0 0 10px rgba(30, 200, 90, 0.1), 0 0 13px rgba(30, 200, 90, 0.06);
    margin-right: 25px;
    margin-left: 5px;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 8px;
    padding-bottom: 9px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    transition: box-shadow 0.35s ease;
}

#chat-input-area.overlay-active textarea {
    box-shadow: none;
}

#chat-input-area textarea::-webkit-scrollbar {
    display: none;
}

#chat-input-area textarea:focus {
    outline: none;
}

#chat-input-area textarea::placeholder {
    color: #989898;
}

#send-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0px;
    opacity: 0.85;
    margin-right: 5px;
}

#send-button.no-text {
    cursor: default;
    pointer-events: none;
}

#send-button svg {
    display: block;
    pointer-events: none;
    fill: #161616;
    margin-left: 3.25px;
    transform: scaleY(0.8);
    height: 20px;
    transform-origin: center;
}

.header-row {
    display: flex;
    align-items: center;
    width: 96%;
    margin-bottom: 20px;
    gap: 26px;
}

.header-logo {
    height: 39px;
    filter: drop-shadow(0px 0px 2px rgba(30, 200, 90, 0.8)) opacity(0.9) brightness(1.15);
    transform: translateX(-3px);
    margin-left: 3px;
}

.header-buttons {
    display: flex;
    align-items: center;
}

.spotify-footer {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 17px;
    color: #B3B3B3;
    font-size: 13px;
    display: flex;
    align-items: center;
    flex-direction: column;
    opacity: 0.875;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    will-change: opacity;
}

.spotify-footer.loaded {
    visibility: visible;
    opacity: 0.875;
}

.spotify-footer a {
    color:rgb(30, 200, 90);
    text-decoration: none;
}

@media (min-width: 769px) {
    .spotify-footer a:hover {
        text-decoration: underline;
    }
}

.spotify-logo {
    display: block;
    height: 34px;
    opacity: 0.9;
    margin-left: 2px;
}

.ei-logo {
    display: block;
    height: 34px;
    margin-left: 9px;
    opacity: 1;
}

.save-playlist-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    transform: translateX(-1px); /* Adding this slight shift because the Spotify logo creates an optical illusion of misalignment */
}

.message-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #464646;
    border-radius: 10px;
    margin-bottom: 7px;
    margin-top: 5px;
    width: fit-content;
}

.message-container p + p {
    margin-top: 9px;
    margin-bottom: 10px;
}

.create-playlist-success {
    text-align: center;
    padding: 10px 15px 0px 15px;
}

.create-playlist-instructions {
    text-align: center;
    padding: 0px 15px 0px 15px;
}

.spotify-save-icon{
    width: 21px;
    padding-left: 2.5px;
    padding-right: 2.5px;
    vertical-align: middle;
    transform: translateY(-1.1px);
}

.additional-buttons-container {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.save-playlist-button-wrapper {
    height: 55.8px;
    overflow: visible;
}

.save-playlist-button {
    font-weight: 600;
    font-size: 13.5px;
    margin-top: 10px;
    margin-bottom: 5px;
    color: #0C0C0C;
    background: rgb(30, 200, 90);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.35), 1.5px 2px 3px rgba(0, 0, 0, 0.2);
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: padding, opacity, box-shadow, margin;
    position: relative;
    opacity: 0.9;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    padding: 10px 17px;
}

@media (min-width: 769px) {
    .save-playlist-button:hover {
        background: rgb(30, 200, 90);
        padding: 10.95px 19px;
        opacity: 1.0;
        box-shadow: inset 0 0 0px rgba(0, 0, 0, 0.0), 0px 0px 0px rgba(0, 0, 0, 0.0), 0 0 15px rgba(30, 200, 90, 0.4);
        margin-top: 9.05px;
        margin-bottom: 4.05px;
    }
}

.save-playlist-button:disabled {
    background-color: transparent;
    opacity: 1.0;
    box-shadow: none;
    pointer-events: none;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    transform: translateY(-1.6px);
}

.secondary-playlist-button {
    background-color: #121212;
    border: 1px solid rgba(224,224,224,0.55);
    color: rgba(224,224,224,0.9);
    font-size: 0.9em;
    font-weight: 400;
    min-width: 120px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
    transition: 0.2 ease-in-out;
    padding: 8px 0px;
    margin-top: 10px;
}

@media (min-width: 769px) {
    .secondary-playlist-button:hover {
        color: rgb(224,224,224);
        background-color: #181818;
        opacity: 1;
        border: 1px solid rgba(224,224,224,0.8);
    }
}

.secondary-button {
    font-weight: 400;
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: 5px;
    min-width: 130px;
    background-color: #141414;
    color: rgba(224,224,224,0.85);
    padding: 10px 20px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5), 2.5px 3.33px 5px rgba(0, 0, 0, 0.2);
    max-height: 40px;
    min-height: 40px;
}

@media (min-width: 769px) {
    .secondary-button:hover {
        background-color: #171717;
    }
}

.secondary-button:disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.previous-conversation {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

@media (min-width: 769px) {
    .previous-conversation:hover {
        opacity: 0.7;
    }
}

.conversation-divider {
    position: relative;
    height: 2.4px;
    margin: 30px 0;
    border: 0;
}

.conversation-divider::before {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, rgba(30, 200, 90, 0), rgba(30, 200, 90, 1), rgba(30, 200, 90, 0));
    animation: pulse 2s ease-in-out infinite;
    will-change: opacity;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

.legal-links {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 9px;
}

.powered-by-container {
    display: flex;
    align-items: center;
}

.general-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
}

.general-modal:not(#legalModal) {
    transition:
        background-color 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 220ms ease-out;
}

.general-modal.open {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.65);
    pointer-events: auto;
}

#legalModal.open {
    background-color: #0B0B0B;
}

.legal-modal-content {
    background-color: #161616;
    padding: 30px;
    border-radius: 10px;
    overflow-y: auto;
    position: relative;
    margin: 3% auto;
    height: calc(100vh - 5vw);
    width: 94%;
    box-sizing: border-box;
    max-width: 800px;
    margin-top: 2%;
}

.import-modal-content {
    background-color: #161616;
    padding: 18px 81px 25px 81px;
    border-radius: 10px;
    position: fixed;
    top: var(--import-top, 6%);
    left: var(--import-left, 50%);
    width: var(--import-width, 90%);
    height: var(--import-height, auto);
    max-width: var(--import-max-width, 600px);
    max-height: var(--import-max-height, 84vh);
    margin: var(--import-margin, initial);
    transform: var(--import-transform, translateX(-50%) translateY(10px) scale(0.98));
    opacity: 0;
    transition:
        transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 180ms ease-out;
    will-change: transform, opacity;
    overflow-y: auto;
    backface-visibility: hidden;
    box-sizing: border-box;
    background-image: radial-gradient(
        ellipse 300% 70% at 50% 48%,
        rgba(30, 200, 90, 0.11) 0%,
        rgba(30, 200, 90, 0.08) 38%,
        rgba(30, 200, 90, 0.04) 58%,
        rgba(30, 200, 90, 0.01) 88%,
        transparent 100%
    );
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    display: flex;
    flex-direction: column;
}

.import-modal-content .modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0px;
    padding-bottom: 4px;
    padding-right: 22px;
}

.legal-modal-content.has-scrollbar {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.general-modal.open .import-modal-content {
    transform: var(--import-transform-open, translateX(-50%) translateY(0) scale(1));
    opacity: 1;
}

.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    padding-bottom: 11px;
    margin-bottom: 16px;
    margin-top: -10px;
}

.legal-modal-header h2 {
    color: rgb(30, 200, 90);
    margin: 0;
}

.import-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    margin-bottom: 12px;
    padding-top: 12px;
    position: relative;
    top: auto;
}

.import-modal-header h2 {
    color: rgb(33, 220, 99);
    margin: 0;
    font-weight: 500;
}

.close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -12px;
    margin-right: -12px;
}

@media (min-width: 769px) {
    .close-modal:hover {
        color: white;
    }
}

.modal-body {
    line-height: 1.6;
    color: #e0e0e0;
    font-size: 0.9em;
	flex: 1 1 auto;
    overflow-y: auto;
}

.modal-body h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: rgb(27, 180, 81);
    font-size: 1.1em;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

.modal-body a {
    color: rgb(30, 200, 90);
    text-decoration: none;
}

@media (min-width: 769px) {
    .modal-body a:hover {
        text-decoration: underline;
    }
}

.modal-body .last-updated {
    font-size: inherit;
    margin-bottom: 20px;
}

.modal-body .section-content ul {
    padding-left: 40px;
}

.modal-body .restrictions-header {
    margin-bottom: 0;
}

.modal-body .restrictions-list {
    margin-top: 0;
}

.beta-notice {
    background-color: #161616;
    border: 1px solid rgb(24, 160, 72);
    border-radius: 8px;
    padding: 7px;
    text-align: center;
    margin-bottom: 14px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    box-shadow: 1px 4px 8px rgba(0, 0, 0, 0.4);
    will-change: opacity;
}

.beta-notice.loaded {
    visibility: visible;
    opacity: 1;
}

.beta-notice h3 {
    color: rgb(30, 200, 90);
    margin: 0 0 0 0;
    font-size: 0.925em;
    font-weight: 600;
    margin-top: -2px;
}

.beta-notice p {
    margin: 0 0;
    font-size: 0.825em;
    line-height: 1.35;
    color: #e0e0e0;
}

.beta-notice a {
    color: rgba(30, 200, 90, 0.95);
    text-decoration: none;
}

@media (min-width: 769px) {
    .beta-notice a:hover {
        text-decoration: underline;
    }
}

.import-buttons {
	position: relative;
	bottom: auto;
	border-top: 1px solid #444;
	padding-top: 19px;
    display: flex;
    justify-content: flex-end;
	gap: 0;
	margin-top: 12px;
}

.import-cancel-button {
    min-width: 0px;
}

.import-playlist-button {
    margin-right: calc(50% - 174px);
    color: #0C0C0C;
    background: rgb(30, 200, 90);
    font-weight: 600;
    font-size: 13.5px;
    min-width: 175px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5), 1.5px 2px 3px rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.import-playlist-button--active {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 769px) {
    .import-playlist-button:hover {
        background: rgb(30, 200, 90);
        opacity: 1.0;
        box-shadow: inset 0 0 0px rgba(0, 0, 0, 0.0), 0px 0px 0px rgba(0, 0, 0, 0.0), 0 0 15px rgba(30, 200, 90, 0.4);
    }
}

.import-playlist-button:disabled {
    background-color: transparent;
    opacity: 1.0;
    box-shadow: none;
    pointer-events: none;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 13.5px;
    gap: 8px;
}

.playlist-input-group {
    margin-bottom: 1.25rem;
}

.playlist-input-container {
    position: relative;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.2s;
    background-color: transparent;
    overflow: hidden;
    z-index: 1;
}

.playlist-input-container:focus-within {
    box-shadow: 0 0 10px rgba(30, 200, 90, 0.3);
}

.playlist-input-field {
    width: 100%;
    outline: none;
    border: none;
    color: #e0e0e0;
    padding: 0.75rem;
    font-family: 'Poppins', sans-serif, Arial;
    font-size: 14px;
    background: none;
}

.playlist-input-field::placeholder {
    color: #989898;
}

.playlist-loading-state {
    display: flex;
    align-items: center;
    color: #e0e0e0;
    padding: 0.75rem;
    font-size: 0.875rem;
    transform: translateX(-18px);
    gap: 6px;
}

.playlist-error-state {
    display: flex;
    align-items: center;
    color: #ff6b6b;
    padding: 0.75rem;
    text-align: center;
    font-size: 13.5px;
}

.playlist-success-state {
    position: relative;
    background: #1B1B1B;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 5px 5px;
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: #e5e5e5;
    margin: 0px 0px 0px 0px;
    width: fit-content;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    justify-content: flex-start;
    align-items: center;
    max-width: calc(100% - 20px);
    will-change: transform;
}

.playlist-success-content {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 32px);
}

.playlist-success-info {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.5rem;
}

.playlist-success-state .icon {
    filter: hue-rotate(240deg) brightness(1.2) contrast(1.2) saturate(1.65);
    margin-left: 11px;
    margin-right: 1px;
    margin-bottom: 2px;
    width: 20px;
    height: 20px;
}

.playlist-name {
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.playlist-track-count {
    font-size: 0.75rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.playlist-remove-btn {
    background: none;
    border: none;
    color: rgba(224,224,224,0.7);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -3px;
    margin-right: 3px;
}

@media (min-width: 769px) {
    .playlist-remove-btn:hover {
        background-color: rgba(24, 24, 24, 0.5);
    }
}

@keyframes rotate-clockwise {
    0% {transform: rotate(0deg);}
    100% {transform: rotate(360deg);}
}
@keyframes rotate-counter-clockwise {
    0% {transform: rotate(0deg);}
    100% {transform: rotate(-360deg);}
}

.thinking-spinner {
    width: 40px;
    height: 40px;
    display: block;
    filter: drop-shadow(0px 0px 2px rgba(30, 200, 90, 0.8)) opacity(0.9) brightness(1.15);
}

.thinking-spinner .spin-cw,
.thinking-spinner .spin-ccw {
    transform-origin: 11.90625px 11.90625px;
    will-change: transform;
}

.thinking-spinner .spin-cw {
    animation: rotate-clockwise 1s linear infinite;
}

.thinking-spinner .spin-ccw {
    animation: rotate-counter-clockwise 1s linear infinite;
}

.thinking-spinner .delay-33 {animation-delay: -0.33s;}
.thinking-spinner .delay-67 {animation-delay: -0.67s;}

.spinner-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.3rem;
    margin-left: -0.55rem;
    filter: drop-shadow(0px 0px 1px rgba(30, 200, 90, 0.5)) opacity(0.9) brightness(1.15);
}

.spinner-small-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: block;
}

.spinner-rotator {
    animation: spinner-rotate 1.3s linear infinite;
    transform-origin: 11.90625px 11.90625px;
    will-change: transform;
}

.spinner-small-svg .spinner-dot,
.spinner-small-svg .spinner-ring {
    fill: rgb(39,260,117);
}

@keyframes spinner-rotate {
    from {transform: rotate(0deg);}
    to {transform: rotate(360deg);}
}

body[data-chat-mode="analysis"] .ai-message.analysis-first-message {
    margin-bottom: 8px;
    margin-top: 9px;
    max-width: 93.5%;
}

body[data-chat-mode="analysis"] .ai-message.analysis-second-message {
    margin-top: 8px;
    margin-bottom: 8px;
}

body[data-chat-mode="analysis"] .ai-message.analysis-third-message {
    margin-top: 8px;
    max-width: 87.5%;
}

.conversation-divider.analysis-divider-before {
    margin-top: 15px;
    margin-bottom: 10px;
}

.conversation-divider.analysis-divider-after {
    margin-top: 15px;
    margin-bottom: 15px;
}

.message.fade-in-analysis-message {
    opacity: 0;
    animation: fadeInAnalysisMessage 1.2s ease forwards;
}

@keyframes fadeInAnalysisMessage {
    to { opacity: 1; }
}

.blur-fade-container {
    position: relative;
}

.blur-fade-combo {
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.95);
    z-index: 1;
    transition:
        opacity 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        /* Using 0.725s instead of 0.75s for transform fixes an issue with text snapping at the end of the animation */
        transform 0.725s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, filter, transform;
}

.blur-fade-combo.focused {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
}

.aria-intro-splash {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    pointer-events: none;
    text-align: center;
}

.aria-intro-splash .aria-intro-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aria-intro-text {
    font-size: 1.4em;
    color: #e0e0e0;
    font-weight: 400;
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.95);
    transition:
        opacity 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, filter, transform;
}

.aria-intro-splash .aria-intro-text:first-child {
    font-size: 1.6em;
    letter-spacing: 0.25px;
    word-spacing: 0.6px;
}

.aria-intro-text.show {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
}

.aria-intro-text.hide {
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.95);
}

.burst-multilayer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 1px;
    pointer-events: none;
    z-index: 1;
    will-change: transform, opacity, filter;
}

.burst-multilayer::before,
.burst-multilayer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0;
    will-change: transform, opacity, filter;
}

.burst-multilayer::before {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(33, 220, 99, 1);
    background: rgba(33, 220, 99, 0.25);
}

.burst-multilayer.animate::before {
    animation: multiLayerBurst1 1.2s ease-out;
}

.burst-multilayer.animate {
    animation: multiLayerCore 0.6s ease-out;
}

@keyframes multiLayerBurst1 {
    0% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(var(--burst-scale, 140));
        border-width: 0px;
    }
}

@keyframes multiLayerCore {
    0% {
        filter: brightness(1);
    }
    20% {
        filter: brightness(1.5) drop-shadow(0 0 8px rgba(30, 200, 90, 0.8));
    }
    100% {
        filter: brightness(1);
    }
}

.playlist-add-btn {
    background: none;
    border: none;
    color: #D2D2D2;
    cursor: pointer;
    font-size: 13.5px;
    font-family: 'Poppins', sans-serif, Arial;
    font-weight: 400;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0px 0px 0px 4px;
    margin-top: -1px;
}

@media (min-width: 769px) {
    .playlist-add-btn:hover {
        color: #ffffff;
    }
}

.playlist-add-btn svg {
    width: 16px;
    height: 16px;
    padding-top: 0.5px;
    stroke: #D2D2D2;
    transition: stroke 0.2s ease;
}

@media (min-width: 769px) {
    .playlist-add-btn:hover svg {
        stroke: #ffffff;
    }
}

.modal-body p.import-instructions-one {
    font-size: 0.825rem;
    margin-bottom: 13px;
    margin-top: 0px;
}

.modal-body p.import-instructions-two {
    font-size: 0.825rem;
    margin-bottom: 15px;
    margin-top: 0px;
}

.import-help-icon {
    transform: translateY(-1px) translateX(-3px);
}

@media (min-width: 769px) {
    .import-help-icon:hover circle {
        stroke: white;
    }
}

@media (min-width: 769px) {
    .import-help-icon:hover text {
        fill: white;
    }
}

.import-help-icon-error {
    height: 16px;
    width: 16px;
    display: inline-block;
    margin-left: 1px;
    margin-right: 1px;
    vertical-align: middle;
    transform: translateY(-1px);
}

.import-help-button {
    background: transparent;
    border: none;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    cursor: pointer;
    box-sizing: content-box;
    position: relative;
    padding: 12px 18px 12px 18px;
    margin: -12px -18px -9.75px -12px;
}

.import-help-panel {
	font-size: 0.825rem;
	margin-bottom: 19.1px;
    max-width: 468px;
}

.import-help-panel ol {
    list-style-position: inside;
	padding-left: 30px;
}

.playlist-limit-message {
    padding: 12px 16px 13px 16px;
    border: 1px solid #A3A3A3;
    border-radius: 20px;
    color: #A3A3A3;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 5px;
    max-width: 358px;
}

.segmented-control-container {
    display: flex;
    justify-content: flex-start;
    width: auto;
    margin: 0;
    flex: 1;
    gap: 22.5px;
}

.segmented-control {
    display: flex;
    background-color: transparent;
    border: 1px solid #535353;
    box-shadow: 0 0 4px rgba(30, 200, 90, 0.3), 0 0 8px rgba(30, 200, 90, 0.1), 0 0 12px rgba(30, 200, 90, 0.06);
    width: 100%;
    border-radius: 20px;
    align-items: center;
    position: relative;
    overflow: visible;
    gap: 12px;
    max-height: 40px;
}

body.aria-intro-active .segmented-control {
    pointer-events: none;
}

.segmented-control.is-animating .segment-button.active,
.segmented-control.is-animating .segment-button.was-active {
    border-color: transparent;
    height: var(--segmented-control-height);
}

.segment-button {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: 'Poppins', sans-serif, Arial;
    background-color: transparent;
    font-weight: 500;
    position: relative;
    width: 0;
    flex-grow: 1;
    white-space: nowrap;
    border-radius: 20px;
    padding: 6px 0px;
    font-size: 15px;
    color: #e0e0e0;
    word-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border: 2px solid transparent;
    margin-top: -1px;
    margin-bottom: -1px;
    opacity: 0.6;
}

@media (min-width: 769px) {
    .segment-button:hover {
        background-color: #1D1D1D;
        padding: 5px 0px;
        opacity: 0.8;
    }
}

.segment-button.active {
    background-color: transparent;
    border: 2px solid rgb(30,200,90);
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 0 4px rgba(30,200,90,0.6);
    opacity: 1;
    height: var(--segmented-control-height);
}

.segment-button:focus {
    outline: none;
}

#segment-animation-svg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
    shape-rendering: geometricPrecision;
}

#segment-animation-svg path,
#segment-animation-svg circle {
    vector-effect: non-scaling-stroke;
}

.hamburger-menu-container {
    position: relative;
    display: inline-block;
}

.hamburger-button {
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s;
    outline: none;
    background-color: transparent;
    border: none;
    padding: 9.5px;
    display: flex;
    align-items: center;
}

@media (min-width: 769px) {
    .hamburger-button:hover {
        background-color: #232323;
    }
}

body.aria-intro-active .hamburger-menu-container {
    pointer-events: none;
}

.hamburger-icon {
    width: 1.25rem;
    height: 1.25rem;
    filter: drop-shadow(0px 0px 2px rgba(30, 200, 90, 0.8)) opacity(0.9);
    transform: scale(1.2);
}

.dropdown-panel {
    display: none;
    position: absolute;
    z-index: 1000;
    width: 19rem;
    background-color: #141414;
    border: 1px solid #535353;
    border-radius: 12px;
    box-shadow: 0px 3px 7.5px rgba(0, 0, 0, 0.3), 0px 3px 15px rgba(0,0,0,0.15);
    right: 0;
    overflow: hidden;
    margin-top: 0.8rem;
    margin-right: 0.4rem;
}

.dropdown-panel.show {
    display: block;
}

.dropdown-link {
    display: block;
    padding: 0.5rem 0.75rem 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: rgba(27,180,81,0.95);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    position: relative;
    font-family: 'Poppins', sans-serif, Arial;
    font-weight: 500;
    background: radial-gradient(ellipse 100% 100% at 43% 50%, rgba(255,255,255,0.03) 0%, transparent 90%);
}

.dropdown-link-text {
    display: block;
    margin-bottom: 0.25rem;
}

.dropdown-tooltip {
    display: block;
    font-size: 0.75rem;
    color: #AAAAAA;
    font-weight: 400;
    line-height: 1.3;
}

.divider {
    border-top: 1px solid #535353;
}

@media (min-width: 769px) {
    .dropdown-link:hover {
        border-radius: 0px;
        background-color: #191919;
    }
}

.segment-icon {
    margin-left: 10px;
    overflow: visible;
}

.segment-icon--new {
    width: 12px;
    margin-left: 9px;
}

.segment-icon--saved {
    width: 16px;
    margin-left: 12px;
}

.segment-icon--analysis {
    width: 12.5px;
}

@media (min-width: 769px) {
    .mobile-only { display: none; }
}

@media (min-width: 769px) {
    #hamburger-dropdown #import-music-link .dropdown-icon,
    #hamburger-dropdown .reset-link .dropdown-icon {
        display: none;
    }
}

/* Mobile overrides for display widths ≤ 768px */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    body.keyboard-open #chat-container {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.keyboard-open #message-list {
        overscroll-behavior: auto;
        overscroll-behavior-y: auto;
    }

    .container::before {
        background: #161616 !important;
    }

    .dropdown-panel {
        position: fixed;
        top: 62px;
        right: 0;
        height: 383px;
        width: 274px;
        margin: 0;
        border-radius: 12px 0 0 12px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
        display: block;
        box-shadow: none;
        border: none;
        background-color: #181818;
        padding: 9px;
    }

    .dropdown-panel.show {
        transform: translateX(0);
        box-shadow: -3px 0 10px rgba(0,0,0,0.5);
    }

    .hamburger-backdrop {
        position: fixed;
        inset: 0;
        opacity: 0;
        background: rgba(0,0,0,0.6);
        pointer-events: none;
        transition: opacity 220ms ease-out;
        z-index: 999;
    }

    #hamburger-dropdown.show + #hamburger-backdrop {
        opacity: 1;
        pointer-events: auto;
        -webkit-backdrop-filter: blur(1px);
        backdrop-filter: blur(1px);
    }
    
    .dropdown-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        border-radius: 8px;
        text-decoration: none;
        background: transparent;
        font-size: 0.875rem;
        position: relative;
        overflow: hidden;
        will-change: transform;
        transition:
            background-color 140ms ease,
            transform 140ms cubic-bezier(0.2, 0, 0.2, 1);
    }

    .dropdown-link.is-tapping {
        background-color: #1e1e1e;
        animation: tap-bounce 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    @keyframes tap-bounce {
        0%   { transform: scale(1); }
        45%  { transform: scale(0.985); }
        100% { transform: scale(1); }
    }

    .dropdown-link::after {
        content: "";
        position: absolute;
        top: var(--tap-y, 50%);
        left: var(--tap-x, 50%);
        width: 24px;
        height: 24px;
        transform: translate(-50%, -50%) scale(0);
        border-radius: 50%;
        pointer-events: none;
        background: radial-gradient(
            circle,
            rgba(255,255,255,0.10) 0%,
            rgba(255,255,255,0.08) 40%,
            rgba(255,255,255,0.00) 60%
        );
        opacity: 0.9;
    }

    .dropdown-link.is-tapping::after {
        animation: ripple 500ms ease-out forwards;
    }

    @keyframes ripple {
        to {
            transform: translate(-50%, -50%) scale(16);
            opacity: 0;
        }
    }

    .dropdown-link.is-tapping .dropdown-icon {
        transform: translateX(1px) scale(0.98);
        transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .dropdown-link--coffee {
        padding-top: 11px;
        padding-bottom: 11px;
    }

    .dropdown-link--contact {
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .dropdown-icon {
        width: 20px;
        height: 20px;
        flex: 0 0 20px;
        color: #e0e0e0;
        stroke: #e0e0e0;
    }

    .dropdown-icon.eula-icon {
        fill: #e0e0e0;
		stroke: #e0e0e0;
		stroke-width: 0;
		width: 16px;
    }

    .dropdown-icon.privacy-icon {
        width: 20px;
        height: 20px;
    }

    .dropdown-icon.coffee-icon {
        width: 22px;
        height: 22px;
    }

    .dropdown-icon.contact-icon {
        width: 18px;
        height: 18px;
        scale: 0.95;
    }

    .dropdown-icon.import-icon {
        color: rgb(30, 200, 90);
        stroke: rgb(30, 200, 90);
        width: 18px;
        height: 18px;
    }

    .dropdown-icon.reset-icon {
        color: #ff6b6b;
        stroke: #ff6b6b;
    }

    .dropdown-text-block {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .dropdown-link-text {
        display: block;
        margin: 0;
        font-weight: 400;
        color: #F0F0F0;
        font-size: 0.875rem;
        line-height: 1.1;
    }

    .dropdown-tooltip {
        display: block;
        margin: 0;
        font-size: 0.75rem;
        color: #878D97;
        line-height: 1.2;
    }

    .dropdown-tooltip.desktop-only {
        display: none;
    }

    .divider.desktop-only {
        display: none;
    }

    .divider {
        border-top: 1px solid rgba(255,255,255,0.1);
        margin: 6px 4px;
    }

    .mobile-menu-logos {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        padding: 14px 10px 10px 10px;
    }

    .mobile-menu-logos .spotify-logo {
        height: 30px;
        opacity: 0.85;
        margin: 0;
    }

    .mobile-menu-logos .ei-logo {
        height: 30px;
        opacity: 0.9;
        margin: 0;
    }

    .spotify-footer,
    .spotify-footer.loaded {
        display: none !important;
    }

    .beta-notice,
    .beta-notice.loaded {
        display: none !important;
    }

    .segmented-control .segment-icon {
        display: none !important;
    }

    .segmented-control {
        display: flex;
        background-color: transparent;
        border: 1px solid #535353;
        box-shadow: 0 0 4px rgba(30, 200, 90, 0.3), 0 0 8px rgba(30, 200, 90, 0.1), 0 0 12px rgba(30, 200, 90, 0.06);
        width: 100%;
        border-radius: 20px;
        align-items: center;
        position: relative;
        overflow: visible;
        gap: 5px;
        margin-left: 10px;
    }

    .header-logo {
        display: none !important;
    }

    body {
        font-family: 'Poppins', sans-serif, Arial;
        line-height: 1.6;
        color: #FFFFFF;
        max-width: 800px;
        margin: 0;
        padding-top: 0;
        padding-right: 0;
        padding-bottom: 0;
        padding-left: 0;
        background-color: #161616;
        background-image: none;
    }

    .container {
        background-color: #161616;
        border-radius: 0px;
        padding: 0px 0px 0px 0px;
        box-shadow: none;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
        will-change: opacity;
        position: fixed;
        inset: env(safe-area-inset-top, 0)
               env(safe-area-inset-right, 0)
               env(safe-area-inset-bottom, 0)
               env(safe-area-inset-left, 0);
        overflow: hidden;
    }

    .container.loaded {
        visibility: visible;
        opacity: 1;
        display: flex;
        align-items: center;
        flex-direction: column;
        max-height: 100vh;
    }

    #chat-container {
        background-color: transparent;
        border-radius: 5px;
        padding: 0px;
        display: flex;
        flex-direction: column;
        width: 100%;
        /* The heights below are overridden by Javascript and serve only as fallbacks */
        height: calc(100vh - 72px);
        height: calc((var(--vh, 1vh) * 100) - 72px);
        height: calc(100dvh - 72px);
    }

    #message-list {
        flex-grow: 1;
        overflow-y: auto;
        margin-bottom: 0px;
        padding-right: 0px;
        -webkit-overflow-scrolling: touch;
    }

    #message-list::-webkit-scrollbar,
    .modal-body::-webkit-scrollbar,
    .legal-modal-content::-webkit-scrollbar {
        width: 7px;
    }

    #message-list::-webkit-scrollbar-track,
    .legal-modal-content::-webkit-scrollbar-track {
        background: #232323;
        border-radius: 7px;
    }

    #message-list::-webkit-scrollbar-thumb,
    .legal-modal-content::-webkit-scrollbar-thumb {
        background: linear-gradient(to bottom, rgba(40, 220, 100, 0.8), rgba(20, 180, 80, 0.8));
        border-radius: 7px;
    }

    .modal-body::-webkit-scrollbar-thumb {
        background: linear-gradient(to bottom, rgba(44, 242, 110, 0.8), rgba(20, 180, 80, 0.8));
        border-radius: 7px;
    }

    .modal-body::-webkit-scrollbar-track {
        background: #141414;
        border-radius: 7px;
    }

    .conversation-divider {
        position: relative;
        height: 2.4px;
        margin: 8px 0;
        border: 0;
    }

    .message {
        border-radius: 15px;
        word-wrap: break-word;
        width: fit-content;
        max-width: 100%;
        line-height: 23px;
    }

    .ai-message {
        background-color: transparent;
        color: #e0e0e0;
        align-self: center;
        font-size: 14.75px;
        font-weight: 400;
        min-width: 10%;
        margin-bottom: 0px;
        margin-top: 0px;
        padding-top: 13px;
        padding-bottom: 13px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .ai-message:first-child {
        margin-top: 0;
        padding-top: 0px;
        padding-bottom: 10px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 340px;
    }

    .ai-message.thinking-message {
        padding-top: 13px;
        padding-bottom: 19px;
    }

    .ai-message.has-playlist-button.previous-conversation {
        padding-bottom: 13px;
    }

    .ai-message.long-convo-termination-options {
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 275px;
        row-gap: 3px;
        text-align: center;
    }

    .ai-message.previous-termination-message {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: -21px;
    }
    
    .ai-message.long-convo-termination-options .button {
        padding-left: 13px;
        padding-right: 13px;
        min-width: 150px;
    }

    .message-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        border: 1px solid #464646;
        border-radius: 10px;
        margin-bottom: 5px;
        margin-top: 5px;
        width: fit-content;
    }

    body[data-chat-mode="new_songs"] .ai-message:first-child ul {
        padding-left: 25px;
    }

    body[data-chat-mode="saved_songs"] .ai-message:first-child ul {
        padding-left: 18px;
    }

    body[data-chat-mode="analysis"] .ai-message.analysis-first-message {
        margin-bottom: 8px;
        margin-top: 9px;
        max-width: 100%;
        padding-left: 20px;
        font-size: 15px;
    }

    body[data-chat-mode="analysis"] .ai-message.analysis-second-message {
        margin-top: 8px;
        margin-bottom: 8px;
        font-size: 15px;
    }

    body[data-chat-mode="analysis"] .ai-message.analysis-second-message ul {
        padding-left: 20px;
    }

    body[data-chat-mode="analysis"] .ai-message.analysis-third-message {
        margin-top: 8px;
        max-width: 100%;
        padding-left: 18px;
        font-size: 15px;
    }

    body[data-chat-mode="analysis"] .ai-message.analysis-third-message ul {
        padding-left: 25px;
    }

    .ai-message.music-collection-updated-message {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: -20px;
        margin-top: -5px;
    }

    .user-message {
        background-color: rgba(28.5, 190, 85.5, 0.95);
        color: #0C0C0C;
        align-self: flex-end;
        margin-left: auto;
        border-bottom-right-radius: 5px;
        font-size: 14.75px;
        font-weight: 500;
        box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.45);
        text-shadow: 0.75px 0.75px 1.6px rgba(27, 112, 57, 0.4);
        margin-right: 7px;
        max-width: 77%;
        padding-top: 8px;
        padding-bottom: 8px;
        padding-left: 13px;
        padding-right: 13px;
        margin-top: 13px;
        margin-bottom: 13px;
    }

    #chat-input-area {
        display: flex;
        align-items: center;
        margin-top: 14px;
        margin-bottom: 14px;
        margin-left: 14px;
        padding-top: 0px;
        margin-right: 14px;
        box-shadow: 0 0 6px rgba(30, 200, 90, 0.3), 0 0 10px rgba(30, 200, 90, 0.1), 0 0 13px rgba(30, 200, 90, 0.06);
        border: 1px solid #535353;
        border-radius: 26px;
        transition: box-shadow 0.35s ease;
    }

    #chat-input-area.overlay-active {
        box-shadow: none;
    }

    #chat-input-area textarea {
        flex-grow: 1;
        border-radius: 0px;
        border: none;
        background-color: transparent;
        color: #e0e0e0;
        resize: none;
        overflow-y: auto;
        font-family: 'Poppins', sans-serif, Arial;
        font-size: 0.88em;
        box-shadow: none;
        margin-right: 0px;
        margin-left: 0px;
        padding-left: 22px;
        padding-right: 8px;
        padding-top: 8px;
        padding-bottom: 9px;
        -ms-overflow-style: none;
        scrollbar-width: none;
        transition: none;
    }

    .chat-input-overlay {
        position: absolute;
        display: flex;
        align-items: center;
        color: #989898;
        font-family: 'Poppins', sans-serif, Arial;
        font-size: 13px;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease-in-out;
        left: calc(50% - 83px);
        width: 152px;
        text-align: center;
    }

    #send-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 35px;
        height: 35px;
        opacity: 0.85;
        transform: scale(1.07);
        padding: 0px;
        margin-left: 0px;
        margin-right: 12px;
    }

    #send-button svg {
        display: block;
        pointer-events: none;
        fill: #161616;
        margin-left: 3.25px;
        transform: scaleY(0.8);
        transform-origin: center;
        height: 18px;
    }

    .header-row {
        display: flex;
        align-items: center;
        width: 100%;
        gap: 0px;
        padding-top: 14px;
        padding-bottom: 14px;
        padding-left: 12px;
        padding-right: 0px;
        box-sizing: border-box;
        margin-bottom: 0px;
    }

    .segmented-control-container {
        display: flex;
        justify-content: flex-start;
        width: auto;
        flex: 1;
        gap: 2px;
        margin: 0;
    }

    .hamburger-button {
        border-radius: 9999px;
        cursor: pointer;
        transition: background-color 0.3s;
        outline: none;
        background-color: transparent;
        border: none;
        display: flex;
        align-items: center;
        padding-left: 14px;
        padding-right: 19px;
        padding-top: 18px;
        padding-bottom: 18px;
        margin-top: -10px;
        margin-bottom: -10px;
    }

    .hamburger-icon {
        width: 1.25rem;
        height: 1.25rem;
        filter: drop-shadow(0px 0px 2px rgba(30, 200, 90, 0.8)) opacity(0.9);
        transform: rotate(90deg) scale(1.2);
        transform-origin: center;
    }

    .segment-button {
        transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    padding-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        font-family: 'Poppins', sans-serif, Arial;
        background-color: transparent;
        font-weight: 600;
        position: relative;
        width: auto;
        white-space: nowrap;
        border-radius: 20px;
        padding: 6px 0px;
        font-size: 14.75px;
        color: #e0e0e0;
        word-spacing: 1px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: visible;
        border: 2px solid transparent;
        margin-top: -1px;
        margin-bottom: -1px;
        opacity: 0.6;
    }
    
    .segment-button.active {
        background-color: transparent;
        border: 2px solid rgb(30,200,90);
        pointer-events: none;
        z-index: 1;
        box-shadow: 0 0 4px rgba(30,200,90,0.6);
        opacity: 1;
        height: var(--segmented-control-height);
    }

    .segment-button.tap-target {
        opacity: 1;
    }

    .header-buttons {
        display: flex;
        align-items: center;
        margin-right: 0px;
    }

    .close-modal {
        border-radius: 9999px;
    }

    .close-modal:active {
        color: transparent;
        background-color: rgba(255,255,255,0.05);
    }

    .general-modal.open .import-modal-content {
        transform: var(--import-transform-open, translateY(0) scale(1));
        opacity: 1;
    }

	.import-modal-content {
        background-color: #161616;
        padding: 11px 22px 13px 22px;
        position: fixed;
        top: calc(env(safe-area-inset-top, 0) + 3vw);
        right: calc(env(safe-area-inset-right, 0) + 3%);
        bottom: calc(env(safe-area-inset-bottom, 0) + 3vw);
        left: calc(env(safe-area-inset-left, 0) + 3%);
        margin: 0;
        width: auto;
        height: auto;
        transform: var(--import-transform, translateY(10px) scale(0.98));
        opacity: 0;
        transition:
            transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
            opacity 180ms ease-out;
        will-change: transform, opacity;
        overflow-y: auto;
        backface-visibility: hidden;
        background-image: radial-gradient(
            ellipse 300% 70% at 50% 48%,
            rgba(30, 200, 90, 0.11) 0%,
            rgba(30, 200, 90, 0.08) 38%,
            rgba(30, 200, 90, 0.04) 58%,
            rgba(30, 200, 90, 0.01) 88%,
            transparent 100%
        );
        background-repeat: no-repeat;
        background-size: 100% 100%;
        background-position: center;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        position: fixed;
        max-width: none;
        max-height: none;
        border-radius: 10px;
    }

    #importModal.open {
        background-color: #0B0B0B;
    }
    
	.import-modal-header {
	    display: flex;
	    justify-content: space-between;
	    align-items: center;
	    border-bottom: 1px solid #444;
	    margin-bottom: 12px;
	    padding-top: 0px;
	    position: relative;
	    top: auto;
	}

	.import-buttons {
	    position: relative;
	    bottom: auto;
	    border-top: 1px solid #444;
	    padding-top: 8px;
	    display: flex;
        justify-content: center;
	    gap: 0;
	    margin-top: 12px;
        min-height: 55.8px;
	}
	
	.modal-body {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
	
    .modal-body::-webkit-scrollbar {
		display: none;
	}

	.import-modal-content .modal-body {
	    flex: 1;
	    display: flex;
	    flex-direction: column;
	    padding-top: 0px;
	    padding-bottom: 0px;
	    padding-right: 0px;
	}

    .modal-body p.import-instructions-two {
        font-size: 0.825rem;
        margin-bottom: 15px;
        margin-top: 0px;
    }

    .import-help-panel {
		font-size: 0.825rem;
		margin-bottom: 6px;
	}

    .import-help-panel ol {
        list-style-position: inside;
        padding-left: 15px;
    }

	#import-cancel-btn {
        display: none !important;
        pointer-events: none;
    }

    .import-playlist-button {
        margin-right: 0;
        color: #0C0C0C;
        background: rgb(30, 200, 90);
        font-weight: 600;
        font-size: 13.5px;
        min-width: 165px;
        box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5), 1.5px 2px 3px rgba(0, 0, 0, 0.2);
        padding: 10px 15px;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .import-playlist-button--active {
        opacity: 1;
        pointer-events: auto;
    }

    .import-playlist-button:disabled {
        background-color: transparent;
        opacity: 1.0;
        box-shadow: none;
        pointer-events: none;
        color: #e0e0e0;
        font-weight: 600;
        font-size: 13.5px;
        gap: 8px;
    }

    .playlist-remove-btn {
        background: none;
        border: none;
        color: rgba(224, 224, 224, 0.7);
        cursor: pointer;
        border-radius: 50%;
        transition: background-color 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: -10px -7px -10px -13px;
        padding: 14px 14px 14px 14px;
    }

    .playlist-loading-state {
        display: flex;
        align-items: center;
        color: #e0e0e0;
        padding: 0.75rem;
        font-size: 0.875rem;
        transform: translateX(-3px);
        gap: 6px;
    }

    .aria-intro-splash {
        position: absolute;
        top: 42%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        pointer-events: none;
        text-align: center;
        max-width: 275px;
    }

    .legal-modal-content {
        background-color: #161616;
        padding: 18px;
        border-radius: 10px;
        overflow-y: auto;
        position: fixed;
        top: calc(env(safe-area-inset-top, 0) + 2vw);
        right: calc(env(safe-area-inset-right, 0) + 2%);
        bottom: calc(env(safe-area-inset-bottom, 0) + 2vw);
        left: calc(env(safe-area-inset-left, 0) + 2%);
        margin: 0;
        width: auto;
        height: auto;
        box-sizing: border-box;
        max-width: none;
    }

	.legal-modal-content.has-scrollbar {
	    border-top-right-radius: 4px;
	    border-bottom-right-radius: 4px;
	}
	
	.legal-modal-header {
	    display: flex;
	    justify-content: space-between;
	    align-items: center;
	    border-bottom: 1px solid #444;
	    padding-bottom: 0px;
	    margin-bottom: 0px;
	    margin-top: -12px;
	    margin-right: -6px;
	}

	.modal-body h3 {
	    margin-top: 0px;
	    margin-bottom: 0px;
	    color: rgb(27, 180, 81);
	    font-size: 1.1em;
	}

    .musical-analysis-title {
        text-align: center;
        font-size: 1.4em;
    }
    
    .pwa-modal {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1100;
        background-color: rgba(0, 0, 0, 0);
        opacity: 0;
        pointer-events: none;
        transition:
            background-color 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
            opacity 180ms ease-out;
    }

    .pwa-modal.open {
        background-color: rgba(0, 0, 0, 0.65);
        opacity: 1;
        pointer-events: auto;
    }

    .pwa-modal-content {
        position: absolute;
        top: 50%;
        left: 50%;
        background-color: #161616;
        border: 1px solid #535353;
        border-radius: 12px;
        box-shadow: 1px 4px 8px rgba(0,0,0,0.4);
        transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease-out;
        will-change: transform, opacity;
        background-image: radial-gradient(
            ellipse 300% 70% at 50% 48%,
            rgba(30, 200, 90, 0.11) 0%,
            rgba(30, 200, 90, 0.08) 38%,
            rgba(30, 200, 90, 0.04) 58%,
            rgba(30, 200, 90, 0.01) 88%,
            transparent 100%);
        background-repeat: no-repeat;
        background-size: 100% 100%;
        background-position: center;
        width: 260px;
        padding: 13px 25px 15px 25px;
    }

    .pwa-modal.open .pwa-modal-content {
        transform: translate(-50%, -59%);
        opacity: 1;
    }

    .pwa-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #444;
        padding-bottom: 8px;
        margin-bottom: 12px;
    }

    .pwa-modal-header h2 {
        color: rgb(30, 200, 90);
        margin: 0;
        font-weight: 600;
        font-size: 1rem;
    }

    .pwa-close {
        background: transparent;
        border: none;
        color: #aaa;
        line-height: 1;
        cursor: pointer;
        border-radius: 9999px;
        font-size: 23px;
        padding: 6px 10px;
    }

    .pwa-modal-body {
        color: #e0e0e0;
        font-size: 0.9rem;
    }

    .pwa-modal-body p {
        margin-top: 0px;
        margin-bottom: 8px;
    }

    .pwa-modal-body ul {
        margin: 8px;
        margin-left: -15px;
    }

    #pwa-ios-section:not([hidden]) {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #pwa-android-section:not([hidden]) {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #pwa-install-btn {
        margin-top: 8px;
        margin-bottom: 8px;
    }

    #pwa-ios-section svg {
        margin-left: 4px;
        margin-bottom: -2px;
    }
}