html {
    background: radial-gradient(at bottom, var(--border-light), black 80%);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    height: 100vh;
}

* {
    font-family: "Inter";
    font-weight: 500;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
}

#particles-container {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
}

.hometitle {
    font-size: 110px;
    font-weight: 900;
    padding: 20px;
    display: flex;
    justify-content: center;
    margin-bottom: -35px;
    margin-top: 0;
}

.hometitle>span {
    display: inline-block;
    margin-left: 0px;
    font-weight: 900;
    position: relative;
    color: transparent;
    background: linear-gradient(to bottom, var(--accent) 0%, var(--border-light) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    transform-style: preserve-3d;
    animation: letterfloat 3s infinite ease-in-out backwards;
    backface-visibility: hidden;
}

.hometitle>span:nth-child(2) {
    animation-delay: 0.3s;
}

.hometitle>span:nth-child(3) {
    animation-delay: 0.6s;
}

.hometitle>span:nth-child(4) {
    animation-delay: 0.9s;
}

@keyframes letterfloat {

    0%,
    100% {
        transform: translateY(-5px);
    }

    50% {
        transform: translateY(5px);
    }
}

#splash {
    color: white;
    opacity: 0.3;
}

.homeinput {
    background: rgba(35, 35, 35, 0.3);
    backdrop-filter: blur(4px);
    padding: 13.5px 10px;
    color: rgb(146, 146, 146);
    border: none;
    border-radius: 20px;
    max-width: 500px;
    width: 500px;
    min-width: 400px;
    margin: 0 auto;
    margin-top: 20px;
    display: block;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 15px 25px rgba(0, 0, 0, 0.4);
    outline: none;
    transition: 0.2s;
}

.homeinput:has(input:focus) {
    background: rgba(70, 70, 70, .308);
}

.homeinput input {
    background: none;
    outline: none;
    border: none;
    padding: 10px 20px;
    width: 80%;
    color: white;
    font-size: 16px;
    margin-left: -10px;
}

@keyframes pageIn {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: translate(-50%, -40%) scale(0.9);
    }

    50% {
        opacity: 1;
        filter: blur(0px);
        transform: translate(-50%, -51%) scale(1.02);
    }

    100% {
        opacity: 1;
        filter: blur(0px);
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes pageOut {
    0% {
        opacity: 1;
        filter: blur(0px);
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        filter: blur(10px);
        transform: translate(-50%, -40%) scale(0.9);
    }
}

.contentcontainer {
    display: none;
    position: absolute;
    transition: 0.25s cubic-bezier(.34, 2, .84, 1);
    transform-origin: center center;
    text-align: center;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.contentcontainer.pageshown {
    display: block;
    animation: 0.35s ease-out pageIn forwards;
}

.contentcontainer.pagehidden {
    display: none;
    animation: 0.35s ease-out pageOut forwards;
}

h1 {
    font-size: 50px;
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.256));
    font-weight: 900;
    color: transparent;
    background: linear-gradient(to bottom, white, var(--border-light));
    background-clip: text;
}

#games-container {
    width: 950px;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
}

.game-card {
    background: rgb(15, 15, 15);
    border: rgba(255, 255, 255, 0.08) 1px solid;
    border-radius: 20px;
    height: 150px;
    width: 145px;
    padding: 0;
    transition: 0.25s cubic-bezier(.34, 1.5, .84, 1);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.267);
    cursor: default;
}

.game-card:hover {
    scale: 1.1;
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.467);
}

.game-card img {
    height: 105px;
    width: 145px;
    object-fit: cover;
    overflow: hidden;
    background: rgba(62, 62, 62, 0.256);
    border-radius: 20px 20px 0 0;
    border-bottom: rgba(255, 255, 255, 0.08) 1px solid;
    margin-bottom: -5px;
}

.game-card h3 {
    color: white;
    text-align: center;
    margin: 13px 0;
    font-size: clamp(14px, 5cqw, 14px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

input.input {
    padding: 15px 20px;
    background: rgba(35, 35, 35, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 15px;
    width: 400px;
    margin-bottom: 40px;
    outline: none;
    transition: 0.5s;
    color: white;
}

input.input:focus {
    width: 440px;
}

a {
    text-decoration: none;
}

.app-header {
    padding: 15px 25px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--accent);
}

.messages-container {
    flex: 1;
    overflow-y: scroll;
    padding: 40px 20px 120px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    height: 450px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    scrollbar-width: none;
}

.messages-container::-webkit-scrollbar {
    width: 5px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 32948734px;
}

.messages-container::-webkit-scrollbar-thumb {
    border-radius: 2398432px;
    background: rgba(255, 255, 255, 0.307);
}

.message {
    display: flex;
    flex-direction: column;
    animation: tab-open 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.user-message {
    align-items: flex-end;
}

.message-content {
    padding: 14px 20px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.6;
    max-width: 85%;
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease;
}

.user-message .message-content {
    background: white;
    color: black;
    border-color: var(--border-light);
    border-bottom-right-radius: 4px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.user-message .message-content.show {
    opacity: 1;
    transform: translateY(0);
}

.ai-message {
    justify-content: flex-start;
    align-items: flex-start;

}

.ai-message .message-content {
    background-color: rgba(0, 0, 0, 0);
    max-width: 100%;
    width: 100%;
    line-height: 1.6;
    text-align: left;
    max-width: 85%;
    border: 0px solid var(--border-light);
    transition: transform 0.3s ease;
    display: flex;
    border-bottom-left-radius: 4px;
    color: white;
    flex-direction: column;
}

.ai-message .message-content>.ai-block {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    width: 100%;
    display: block;
}

.ai-message .message-content li .li-content {
    flex-grow: 1;
    word-break: break-word;
    display: block;
}

.ai-block:last-child {
    margin-bottom: 10px;
}

.ai-block p {
    margin: 0;
    line-height: 1.6;
}

.ai-block ul,
.ai-block ol {
    margin: 0;
    padding-left: 20px;
}

.ai-block li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.ai-block li:last-child {
    margin-bottom: 0;
}

.animatable-word {
    display: inline;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.input-bar-container {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    z-index: 200;
}

.input-bar-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 8px;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 700px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.input-bar-content:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--accent);
}

.input-bar {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.input-bar i {
    color: rgba(255, 255, 255, 0.3);
    margin-right: 10px;
    font-size: 1.2rem;
}

input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 15px;
    width: 100%;
    padding: 10px 0;
}

.fixed-model-button,
.send-button {
    width: 45px;
    height: 45px;
    border-radius: 18px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.03);
    color: rgb(0, 0, 0);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-button {
    background: var(--accent);
    border: none;
    color: rgb(0, 0, 0);
    box-shadow: 0 4px 15px rgba(78, 78, 78, 0.3);
}

.send-button:hover {
    transform: scale(1.05);
    background: #9c9c9c;
}

.send-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fixed-model-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

#scroll-to-bottom-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: black;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 150;
}

#scroll-to-bottom-btn.show {
    display: flex;
}

@keyframes tab-open {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 650px) {
    .input-bar-container {
        bottom: 15px;
    }

    .message-content {
        max-width: 95%;
    }
}

.message-actions {
    text-align: left;
    margin-top: -10px;
}

.action-button {
    background: transparent;
    border-radius: 10px;
    border: none;
    color: rgba(255, 255, 255, 0.307);
    opacity: 0.5;
    font-size: 18px;
}

.action-button:hover {
    color: white;
}

.code-block-top-bar {
    border-radius: 15px 15px 0 0;
    background: rgb(16, 16, 16);
    padding: 15px;
    margin-bottom: -15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.code-block-language {
    font-weight: bold;
    font-size: 14px;
}

.code-block-pre {
    font-family: monospace;
    border-radius: 15px;
}

.code-block-code > * {
    font-family: monospace;
}

code {
    font-family: monospace !important;
    border-radius: 0 0 15px 15px;
    overflow: auto;
}

code::-webkit-scrollbar {
    border-radius: 0 0 15px 15px;
    background: rgb(199, 199, 199);
    height: 15px;
    overflow: hidden;
}

code::-webkit-scrollbar-thumb {
    background: rgb(146, 146, 146);
    border-radius: 0 0 15px 15px;
}

.code-block-copy-button {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.273);
    background: none;
    padding: 5px;
    transition: 0.2s;
    color: #9c9c9c;
    position: absolute;
    right: 10px;
}

.code-block-copy-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Structural Container --- */
.liquid-glass {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    border-radius: 25px;
    background: rgba(29, 29, 29, 0.525);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

/* --- Search Input Styling --- */
.input-wrapper.liquid-glass {
    background: var(--fourth-bg) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 15px !important;
    border-radius: 14px !important;
    height: 48px;
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 15px;
}

.input-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: var(--button-hover) !important;
}

/* --- Results List --- */
#results {
    overflow-y: auto;
    height: 90%;
    padding-right: 10px;
    scrollbar-width: none;
}

#results::-webkit-scrollbar {
    display: none;
}

.result {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.result:hover {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.result img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-left: 0 !important;
    /* Fixed the negative margin */
}

.result .title {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.result .artist {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Player Section --- */
#cover-img {
    width: 260px;
    height: 260px;
    border-radius: 20px;
    background: var(--fourth-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

#cover-img i {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.2);
}

.player-pane h1 {
    margin-top: 25px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    width: 100%;
    left: 0;
    transform: none;
}

.player-pane p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 4px;
    width: 100%;
    left: 0;
    transform: none;
}

/* --- Progress Bar --- */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 25px;
}

.progress-inner {
    background: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    height: 100%;
    border-radius: 10px;
}

/* --- Control Buttons --- */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.controls button.liquid-glass {
    width: 50px;
    height: 50px;
    padding: 0;
    justify-content: center;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    backdrop-filter: none;
}

.controls button.liquid-glass:hover {
    background: var(--button-hover);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.controls button i {
    font-size: 20px;
    color: white;
}