:root {
    --primary-color: rgba(255, 255, 255, 0.9);
    --glass-bg: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #e0e0e0;
    --text-color: #ffffff;
    --font-family: "Microsoft YaHei", "Heiti SC", "PingFang SC", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    overflow: hidden;
    /* Prevent scrolling of the body */
    height: 100vh;
    width: 100vw;
}

/* Background Slideshow */
#bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.bg-slide.active {
    opacity: 1;
}

/* Main Content Layout */
#main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
}

/* Comment Board */
#comment-board {
    width: 100%;
    max-width: 600px;
    height: 100px;
    /* Approx 3 rows */
    overflow: hidden;
    margin-bottom: 30px;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    text-align: center;
}

.comment-track {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: scrollUp 20s linear infinite;
}

.comment-item {
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes scrollUp {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateY(-100%);
    }
}

/* Player Wrapper */
#player-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

#player-container {
    margin-bottom: 0;
    /* Reset margin */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#track-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 40px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    min-height: 1.5em;
}

.player-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.player-circle:hover {
    transform: scale(1.05);
}

#play-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    outline: none;
}

/* Comment Form */
#comment-form-container {
    width: 100%;
    max-width: 400px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

#message-input {
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 10px;
    color: white;
    font-family: inherit;
    resize: none;
    margin-bottom: 10px;
}

#message-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-row {
    display: flex;
    gap: 10px;
}

#name-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 10px;
    color: white;
}

button[type="submit"] {
    background: white;
    color: black;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

button[type="submit"]:hover {
    opacity: 0.9;
}

#form-message {
    margin-top: 10px;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.2em;
}

/* History Link */
#history-link {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

#history-link:hover {
    color: white;
}

/* Share FAB */
#share-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    color: black;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 100;
}

#share-fab:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 600px) {
    .player-circle {
        width: 120px;
        height: 120px;
    }

    #comment-form-container {
        width: 90%;
    }
}