body {
    font-family: system-ui, sans-serif;
    min-height: 100vh;
    height: 100vh;
    background-color: #1e1e2e;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    overflow-y: auto;
}

h3 {
    color: #cdd6f4;
    font-size: 20px;
    margin-top: -10px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 400;
}

nav {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
}

nav a {
    text-decoration: none;
    color: #bac2de;
    font-size: 16px;
    padding: 10px 16px;
    border: 1px solid #45475a;
    border-radius: 4px;
    transition: all 0.2s;
}

nav a:hover {
    color: #cdd6f4;
    border-color: #585b70;
    background-color: #313244;
}

h1 {
    color: #cdd6f4;
    font-size: 32px;
    margin-bottom: 10px;
    margin-top: 60px;
    text-align: center;
    font-weight: 600;
}

.logo {
    width: 220px;
    display: block;
    margin: 0 auto 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
}

.chat-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.demo-button {
    background-color: #313244;
    border: 1px solid #45475a;
    color: #cdd6f4;
    padding: 30px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 450px;
}

.demo-button:hover {
    background-color: #45475a;
    border-color: #585b70;
}

.demo-page {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    overflow: hidden;
}

.demo-page #chat {
    background-color: #313244;
    border: 1px solid #45475a;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    flex: 1;
    min-height: 300px;
}

.demo-page > div {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    min-height: 0;
}

.demo-page .message {
    background-color: #45475a;
    padding: 14px 18px;
    border-radius: 8px;
    display: block;
    color: #cdd6f4;
    text-align: left;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.5;
    cursor: auto;
}

.demo-page .user {
    text-align: right;
}

.demo-page .user p {
    background-color: #89b4fa;
    color: #1e1e2e;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
    margin: 0;
}

.demo-page .bot p {
    background-color: #585b70;
    color: #cdd6f4;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
    margin: 0;
}

.demo-page form {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
}

.demo-page input {
    padding: 10px;
    border: 1px solid #45475a;
    border-radius: 4px;
    outline: none;
    font-size: 14px;
    background-color: #313244;
    color: #cdd6f4;
    flex: 1;
}

.demo-page input:focus {
    border-color: #89b4fa;
}

.demo-page button[type="submit"] {
    background-color: #89b4fa;
    border: none;
    color: #1e1e2e;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
}

.demo-page button[type="submit"]:hover {
    background-color: #b4befe;
}

.back-button {
    background-color: #585b70;
    border: none;
    color: #cdd6f4;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
}

.back-button:hover {
    background-color: #6c7086;
}

.about-container {
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
}

.about-content {
    background-color: #313244;
    border: 1px solid #45475a;
    border-radius: 12px;
    padding: 30px;
    color: #cdd6f4;
    line-height: 1.6;
}

.about-content p {
    font-size: 18px;
    margin-bottom: 20px;
}

.about-content h2 {
    color: #cba6f7;
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.about-content h2:first-of-type {
    margin-top: 0;
}

.about-content a {
    color: #89b4fa;
    text-decoration: none;
}

.about-content a:hover {
    text-decoration: underline;
    color: #b4befe;
}

@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");

.lastfm-thread {
    background-color: #585b70;
}

.lastfm-thread-message {
    font-family: Lato, sans-serif;
    color: #fff;
}

footer {
    width: 100%;
    text-align: center;
    padding: 30px 20px;
    color: #a6adc8;
    font-size: 18px;
    margin-top: auto;
}

footer a {
    color: #cdd6f4;
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
    color: #b4befe;
}

.text {
    color: #cdd6f4;
    font-size: 1.2rem;
    font-family: sans-serif;
    margin: 5;
    padding: 40px;
}

.about-text-box {
    background-color: #585b70;
    border-radius: 15px;
}

.bonk-emoji {
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s ease;
    filter: drop-shadow(0 0 4px rgba(137, 180, 250, 0.5));
    animation: bob 1.5s ease-in-out infinite;
}

.bonk-emoji:hover {
    transform: scale(1.3) rotate(10deg);
    filter: drop-shadow(0 0 8px rgba(137, 180, 250, 0.8)) brightness(1.2);
}

.bonk-emoji:active {
    transform: scale(1.1) rotate(-5deg);
}

@keyframes bob {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-4px);
    }
}

#popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.popup-image {
    position: fixed;
    width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.popup-image-spin {
    position: fixed;
    width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: popInSpin 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.popup-image-bounce {
    position: fixed;
    width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: popInBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.popup-image-slide {
    position: fixed;
    width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: popInSlide 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.popup-image:hover,
.popup-image-spin:hover,
.popup-image-bounce:hover,
.popup-image-slide:hover {
    transform: scale(1.05) rotate(var(--rotation, 0deg));
}

.popup-image.fade-out {
    animation: popOut 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.popup-image.pop-out-left {
    animation: popOutLeft 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.popup-image.pop-out-right {
    animation: popOutRight 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.popup-image.pop-out-up {
    animation: popOutUp 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.popup-image.pop-out-down {
    animation: popOutDown 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.popup-image.pop-out-spin {
    animation: popOutSpin 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes popIn {
    0% {
        transform: scale(0) rotate(var(--rotation, 0deg));
        opacity: 0;
    }
    60% {
        transform: scale(1.15) rotate(var(--rotation, 0deg));
    }
    100% {
        transform: scale(1) rotate(var(--rotation, 0deg));
        opacity: 1;
    }
}

@keyframes popInSpin {
    0% {
        transform: scale(0) rotate(var(--rotation, 0deg) - 180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.15) rotate(var(--rotation, 0deg) + 90deg);
    }
    100% {
        transform: scale(1) rotate(var(--rotation, 0deg));
        opacity: 1;
    }
}

@keyframes popInBounce {
    0% {
        transform: scale(0) translateY(100px);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) translateY(-20px);
    }
    75% {
        transform: scale(0.95) translateY(5px);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes popInSlide {
    0% {
        transform: scale(0.5) translateX(-200px);
        opacity: 0;
    }
    60% {
        transform: scale(1.1) translateX(20px);
    }
    100% {
        transform: scale(1) translateX(0);
        opacity: 1;
    }
}

@keyframes popOut {
    0% {
        transform: scale(1) rotate(var(--rotation, 0deg));
        opacity: 1;
    }
    100% {
        transform: scale(0) rotate(var(--rotation, 0deg));
        opacity: 0;
    }
}

@keyframes popOutLeft {
    0% {
        transform: translateX(0) scale(1) rotate(var(--rotation, 0deg));
        opacity: 1;
    }
    100% {
        transform: translateX(-300px) scale(0)
            rotate(var(--rotation, 0deg) - 45deg);
        opacity: 0;
    }
}

@keyframes popOutRight {
    0% {
        transform: translateX(0) scale(1) rotate(var(--rotation, 0deg));
        opacity: 1;
    }
    100% {
        transform: translateX(300px) scale(0)
            rotate(var(--rotation, 0deg) + 45deg);
        opacity: 0;
    }
}

@keyframes popOutUp {
    0% {
        transform: translateY(0) scale(1) rotate(var(--rotation, 0deg));
        opacity: 1;
    }
    100% {
        transform: translateY(-300px) scale(0) rotate(var(--rotation, 0deg));
        opacity: 0;
    }
}

@keyframes popOutDown {
    0% {
        transform: translateY(0) scale(1) rotate(var(--rotation, 0deg));
        opacity: 1;
    }
    100% {
        transform: translateY(300px) scale(0) rotate(var(--rotation, 0deg));
        opacity: 0;
    }
}

@keyframes popOutSpin {
    0% {
        transform: scale(1) rotate(var(--rotation, 0deg));
        opacity: 1;
    }
    100% {
        transform: scale(0) rotate(var(--rotation, 0deg) + 720deg);
        opacity: 0;
    }
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
        margin-top: 40px;
    }

    h3 {
        font-size: 16px;
        margin-bottom: 20px;
    }

    nav {
        position: static;
        width: 100%;
        justify-content: center;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    nav a {
        font-size: 14px;
        padding: 8px 12px;
    }

    .logo {
        width: 150px;
        margin-bottom: 20px;
    }

    .chat-container {
        gap: 20px;
    }

    .demo-button {
        min-width: unset;
        width: 100%;
        padding: 40px 30px;
        font-size: 22px;
        font-weight: 600;
    }

    .demo-page {
        max-width: 100%;
    }

    .demo-page > div {
        gap: 15px;
    }

    .demo-page #chat {
        padding: 15px;
        min-height: 200px;
        max-height: 500px;
    }

    .demo-page .message {
        font-size: 14px;
        padding: 12px 14px;
    }

    .demo-page form {
        gap: 8px;
    }

    .demo-page input {
        font-size: 16px;
        padding: 12px;
    }

    .demo-page button[type="submit"] {
        padding: 12px 20px;
        font-size: 16px;
    }

    .text {
        font-size: 1rem;
        padding: 20px;
    }

    .about-container {
        padding: 0 10px;
    }

    .about-content {
        padding: 20px;
    }

    .about-content p {
        font-size: 16px;
    }

    .about-content h2 {
        font-size: 20px;
    }

    .popup-image,
    .popup-image-spin,
    .popup-image-bounce,
    .popup-image-slide {
        width: 200px;
        max-width: 80vw;
    }

    footer {
        font-size: 16px;
        padding: 20px 10px;
        margin-top: 0;
    }

    .back-button {
        padding: 12px 24px;
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 20px;
        margin-top: 30px;
    }

    h3 {
        font-size: 14px;
    }

    nav {
        gap: 10px;
    }

    nav a {
        font-size: 12px;
        padding: 6px 10px;
    }

    .logo {
        width: 120px;
    }

    .chat-container {
        gap: 18px;
    }

    .demo-button {
        padding: 35px 25px;
        font-size: 20px;
        font-weight: 600;
    }

    .demo-page #chat {
        padding: 10px;
        gap: 10px;
    }

    .demo-page .message {
        font-size: 13px;
        padding: 10px 12px;
    }

    .text {
        font-size: 0.9rem;
        padding: 15px;
    }

    .about-content {
        padding: 15px;
    }

    .about-content p {
        font-size: 14px;
    }

    .about-content h2 {
        font-size: 18px;
    }

    .popup-image,
    .popup-image-spin,
    .popup-image-bounce,
    .popup-image-slide {
        width: 150px;
    }

    footer {
        font-size: 14px;
    }
}
