@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

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

:root {
    --bg-color: #171717;
    --nav-bg-color: #1f1f1f;
    --card-bg-color: #1e1e1e;
    --text-color: #ffffff;
    --heading-color: #ffffff;
    --primary-color: #99c4d5;
    --secondary-color: #1d1d1d;
    --icon-color: #b0b0b0;
    --icon-hover-color: #99c4d5;
    --link-hover-color: #99c4d5;
    --border-color: #333333;
    --input-bg: #2c2c2c;
    --input-text: #e0e0e0;
    --button-bg: #99c4d5;
    --button-text: #000000;
    --button-hover-bg: #99a8bf;
    --scroll-track: #1f1f1f;
    --scroll-thumb: #444444;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --typing-dot: #b0b0b0;
    --message-bot-bg: #1e1e1e;
    --message-user-bg: #99c4d5;
    --message-bot-text: #ffffff;
    --message-user-text: #000000;
    --rgb-primary: 3, 218, 198;
    --aqua-color: #99c4d5;
    --my-rgba: rgba(153, 196, 213, 0.5);
    --sky-dark: #8c98bb;
}

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


body {
    background-color: var(--bg-color);
    color: #ffffff;
    font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif, 'Poppins';
    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: var(--aqua-color);
    font-size: 2.5em;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 8px rgba(153, 196, 213, 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: #1d1d1d;
    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(23, 23, 23, 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 #99c4d5;
}

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

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

#name-input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 20px;
    border: 1px solid var(--sky-dark);
    border-radius: 25px;
    background-color: #1d1d1d;
    color: #ffffff;
    font-size: 1.1em;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#name-input::placeholder {
    color: #ffffff;
}

#name-input:focus {
    border-color: var(--aqua-color);
    box-shadow: 0 0 15px rgba(153, 196, 213, 0.3);
}

#submit-name-button {
    padding: 13px 35px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(to right, #6d758e, #8c98bb);
    color: var(--text-color);
    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(140, 152, 187, 0.35);
}

.gender-buttons button {
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(to right, #6d758e, #8c98bb);
    color: var(--text-color);
    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(149, 152, 187, 0.3);
    display: block;
    width: 100%;
}


#submit-name-button:hover,
.gender-buttons button:hover {
    background: linear-gradient(to right, #8c98bb, #6d758e);
    box-shadow: 0 7px 18px rgba(149, 152, 187, 0.5);
}

#submit-name-button:active,
.gender-buttons button:active {
    transform: scale(0.97);
    box-shadow: 0 3px 8px rgba(140, 152, 187, 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 var(--sky-dark);
    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: var(--bg-color);
    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(138, 145, 183, 0.85), rgba(140, 152, 187, 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 #8c98bb;
    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: var(--aqua-color);
    text-shadow: 0 0 5px #8c98bb, 0 0 8px #8a91b7;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 4px #8c98bb, 0 0 6px #8a91b7;
    }
    to {
        text-shadow: 0 0 7px #8c98bb, 0 0 12px #8a91b7, 0 0 3px #99a8bf;
    }
}

.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: #f0f0f5;
    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: #f0f0f5;
    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(29, 29, 29, 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(23, 23, 23, 0.5);
    border-radius: 10px;
}

#chat-log::-webkit-scrollbar-thumb {
    background-color: rgba(29, 29, 29, 0.7);
    border-radius: 10px;
    border: 2px solid rgba(23, 23, 23, 0.5);
}

#chat-log::-webkit-scrollbar-thumb:hover {
    background-color: rgba(53, 53, 53, 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 #99c4d5;
    border-radius: 15px;
    background-color: rgba(23, 23, 23, 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(140, 152, 187, 0.9), rgba(153, 168, 191, 0.9));
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    margin-left: auto;
}

.elaina-message {
    background: linear-gradient(135deg, rgba(23, 23, 23, 0.9), rgba(23, 23, 23, 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 #8c98bb;
     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(23, 23, 23, 0.9);
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 0.95em;
    line-height: 1.6;
    border: 1px solid #99a8bf;
    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: #99c4d5;
    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(23, 23, 23, 0.9);
    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: #99c4d5; color: #99c4d5;
    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: #171717;
}


#image-preview-area {
    background-color: rgba(23, 23, 23, 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 #1d1d1d;
    background-color: #1d1d1d;
    align-items: center;
    position: relative;
    z-index: 95;
}

#emoji-button, #image-upload-button {
    background: none;
    border: none;
    color: #ffffff;
    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 #99c4d5;
    border-radius: 22px;
    background-color: #171717;
    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: #353535;
}

#user-input:focus {
    border-color: #99c4d5;
    box-shadow: 0 0 10px rgba(140, 152, 187, 0.2);
}

#send-button {
    padding: 10px;
    border: none;
    border-radius: 50%;
    background-color: #171717;
    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: #353535;
}

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

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

#emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 10px;
    background-color: #171717;
    border: 1px solid #99c4d5;
    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: #171717;
    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 #99c4d5;
    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: #99c4d5;
    margin-bottom: 15px;
    font-size: 1.4em;
}

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

.help-content {
    text-align: left;
    color: #ffffff;
    margin-bottom: 25px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}
.help-content h4 {
    color: #99a8bf;
    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: #ffffff;
    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: #99c4d5;
     box-shadow: 0 4px 10px rgba(140, 152, 187, 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: #99a8bf;
    box-shadow: 0 6px 15px rgba(153, 168, 191, 0.4);
}

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

.modal-button.cancel {
    background-color: #8c98bb;
    color: white;
    box-shadow: 0 4px 10px rgba(153, 169, 213, 0.3);
}

.modal-button.cancel:hover {
    background-color: #99a8bf;
    box-shadow: 0 6px 15px rgba(140, 152, 187, 0.4);
}

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

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

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

.music-results-container {
    background: linear-gradient(135deg, rgba(23, 23, 23, 0.9), rgba(23, 23, 23, 0.9));
    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(53, 53, 53, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.music-results-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(23, 23, 23, 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(23, 23, 23, 0.9), rgba(23, 23, 23, 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);
}
