body {
    font-family: 'Poppins', sans-serif, Arial;
    line-height: 1.6;
    color: #FFFFFF;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #121212;
}
.container {
    background-color: #181818;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
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 20px 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.05);
    width: fit-content;
    max-width: 90%;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 4.5px;
    padding-bottom: 4.5px;
    min-width: 30%;
    transform: translateX(10px);
}

.button {
    display: inline-block;
    background-color:rgb(30, 200, 90);
    color: #181818;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    /* Poppins SemiBold */
    font-weight: 600;
    font-size: 13px;
    transition: background-color 0.3s;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}
.button:hover {
    background-color: rgb(25, 160, 75);
}

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

#chat-container {
    margin-top: 20px;
    background-color: #282828;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 70vh;
}

#message-list {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 10px;
}

#message-list::-webkit-scrollbar {
    width: 11px;
}

#message-list::-webkit-scrollbar-track {
    background: #1D1D1D;
    border-radius: 10px;
}

#message-list::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, rgb(40, 220, 100), rgb(20, 180, 80));
    border-radius: 10px;
}

#message-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, rgb(45, 230, 110), rgb(25, 190, 90));
}

/* Scrollbar fallback */
@supports not selector(::-webkit-scrollbar) {
    #message-list {
        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;
}

.message a:hover {
    color: rgb(0, 120, 60);
}

.ai-message {
    background-color: #3a3a3a;
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    font-size: 0.875em;
    /* Poppins Regular */
    font-weight: 400;
    min-width: 10%;
    text-shadow: 0 0 2px #181818;
}

.ai-message.has-playlist-button {
    padding-bottom: 22px;
    border-bottom-left-radius: 15px;
    padding-right: 35px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 25px;
}

.ai-message.error-message {
    max-width: 69%;
}

.user-message {
    background-color:rgb(30, 200, 90);
    color:#1A1A1A;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    font-size: 0.875em;
    /* Poppins Medium */
    font-weight: 500;
}

#chat-input-area {
    display: flex;
    align-items: center;
    border-top: 1px solid #404040;
    padding-top: 15px;
}

#chat-input-area textarea {
    flex-grow: 1;
    margin-right: 10px;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #535353;
    background-color: #3a3a3a;
    color: #e0e0e0;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    overflow-y: auto;
    font-family: 'Poppins', sans-serif, Arial;
    font-size: 14px;
}

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

.custom-tooltip {
    visibility: hidden;
    position: fixed;
    z-index: 1;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    width: 155px;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    pointer-events: none;
}

.tooltip-container:hover .custom-tooltip {
    visibility: visible;
    opacity: 1;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-logo {
    margin-left: 5px;
    height: 40px;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.spotify-footer {
    text-align: center;
    margin-top: 17.5px;
    color: #B3B3B3;
    font-size: 13px;
    display: flex;
    align-items: center;
    flex-direction: column;
    opacity: 0.875;
}

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

.spotify-footer a:hover {
    text-decoration: underline;
}

.spotify-logo {
    display: block;
    height: 35px;
    margin-left: 5px;
    opacity: 1;
}

.save-playlist-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.additional-buttons-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    transform: translateX(10px);
}

.save-playlist-success {
    text-align: center;
}

.save-playlist-error {
    text-align: center;
}

.save-playlist-button {
    font-weight: 500;
    box-shadow: 0 0 9px rgba(30, 200, 90, 0.4);
    font-size: 13.5px;
    margin-top: 6px;
    transform: translateX(10px);
}

.secondary-button {
    background-color: #282828;
    border: 1px solid #e0e0e0;
    color: rgb(30, 200, 90);
    font-size: 0.9em;
    font-weight: 500;
    min-width: 120px;
}

.secondary-button:hover {
    background-color: #202020;
}

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

.conversation-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgb(30, 200, 90), transparent);
    margin: 30px 0;
    animation: pulse 2s ease-in-out infinite;
}

@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;
    margin-left: 12.5px;
}

/* Legal Modal Styles */
.legal-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0);
    overflow-y: auto;
}

.modal-content {
    background-color: #2a2a2a;
    margin: 2% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content::-webkit-scrollbar {
    width: 11px;
}

.modal-content::-webkit-scrollbar-track {
    background: #1D1D1D;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, rgb(40, 220, 100), rgb(20, 180, 80));
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, rgb(45, 230, 110), rgb(25, 190, 90));
}

/* Scrollbar fallback */
@supports not selector(::-webkit-scrollbar) {
    .modal-content {
        scrollbar-width: auto;
        scrollbar-color: rgb(30, 200, 90) #1D1D1D;
    }
}

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

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

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

.close-modal:hover {
    color: white;
}

.modal-body {
    line-height: 1.6;
    color: #e0e0e0;
    font-size: 0.9em;
}

.modal-body h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: rgb(30, 200, 90);
    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;
}

.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: #2a2a2a;
    border: 1px solid rgb(30, 200, 90);
    border-radius: 8px;
    padding: 7px;
    text-align: center;
    margin-bottom: 15px;
    margin-top: -5px;
}

.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: rgb(30, 200, 90);
    text-decoration: none;
}

.beta-notice a:hover {
    text-decoration: underline;
}