#gakkyoku {
    position: relative;
    z-index: 3;
    background: #3a4f53;
    color: #ffffff;
    opacity: 1.0;
    margin: auto;
    width: 570px;
    height: 5em;
    line-height: normal;
    padding: 15px;
    font-size: 1.0em;
    font-weight: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* white-space: nowrap; */
}

#gakkyoku-inner {
}

#gakkyoku p .track-title {
    font-size: 1.375rem;
    font-weight: bold;
    line-height: 1.3;
}

#gakkyoku p .track-affiliation,
#gakkyoku p .track-team,
#gakkyoku p .track-year {
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.5;
}

#gakkyoku p .track-details {
    font-size: 0.6875rem;
    line-height: 1.5;
}

#gakkyoku p {
    margin: 0;
    opacity: 1;
    transition: opacity 2s cubic-bezier(0.42, 0, 0.58, 1);
    text-align: center;
}

#gakkyoku p.track-info-active {
    line-height: 1.1em;
}

#gakkyoku p.gakkyoku-hidden {
    opacity: 0;
    transition: opacity 0.1s cubic-bezier(0.42, 0, 0.58, 1);
}

/* text-animation.js で追加される animated-char クラス用 */
.animated-char {
    display: inline-block;
    opacity: 0;
    height: auto;
    transform: scale(5);
    animation: fadeInScale 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    animation-delay: calc(var(--char-index) * 0.012s);
    white-space: pre;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(5);
        filter: blur(2px);
    }

    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px);
    }
}

#waveform-container {
    background: transparent;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    text-align: center;
    position: relative;
    height: auto;
}

#waveform-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 0px;
    height: 60px;
}

#playPauseBtn {
    background: #ec0c1a;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28.8px;
    color: white;
    margin-right: 15px;
    flex-shrink: 0;
    transition: background 0.2s ease;
    z-index: 10;
}

#playPauseBtn .fa-play {
    transform: translateX(2px);
}

#playPauseBtn .fa-pause {
    font-size: 0.8em;
    transform: translateX(0px);
}

#playPauseBtn:hover {
    background: #b00913;
}

#waveform-canvas {
    flex-grow: 1;
    height: 60px;
    margin: 0;
    background: transparent;
    border-radius: 4px;
    z-index: 5;
    width: 100%;
}

#player-controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    background-color: #333;
    color: #fff;
    margin-left: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.left-controls-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 150px;
    border-radius: 18px;
    box-sizing: border-box;
}

#muteBtn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

#muteBtn:hover {
    color: #ec0c1a;
}

#volumeSlider {
    -webkit-appearance: none;
    width: 100px;
    height: 4px;
    background: #555;
    outline: none;
    border-radius: 2px;
    transition: background 0.2s ease;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #ec0c1a;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

#volumeSlider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #ec0c1a;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.time-display {
    font-size: 0.9em;
    white-space: nowrap;
    box-sizing: border-box;
    text-align: left;
}

.share-button-group {
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn {
    background-color: #494949;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.share-btn:hover {
    background-color: #555;
}

.share-btn i {
    font-size: 1.1em;
}

#wrapper {
    position: relative;
    z-index: 3;
    width: 600px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.8);
    text-align: left;
}

#wrapper a {
    text-decoration: none;
    color: #000000;
}

#playlist {
    height: 220px;
    overflow-y: auto;
}

#playlist::-webkit-scrollbar {
    width: 12px;
}

#playlist::-webkit-scrollbar-track {
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, .1);
}

#playlist::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .3);
}

#playlist ol {
    padding: 0;
    margin: 0px;
    list-style: none;
    counter-reset: playlist-counter;
    color: #333;
    width: 100%;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

#playlist ol li {
    position: relative;
    margin: 0px;
    padding: 0px;
    padding-left: 32px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    counter-increment: playlist-counter;
    transition: background-color 0.2s ease;
}

#playlist ol li::before {
    content: counter(playlist-counter, decimal-leading-zero) ". ";
    flex-shrink: 0;
    padding-top: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
    padding-left: 10px;
    color: #000000;
    font-size: 0.7rem;
    text-align: right;
}

#playlist ol li a {
    display: block;
    padding-top: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
    padding-left: 0px;
    background: rgba(0, 222, 0, 0.0);
    flex-grow: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#playlist li.playing {
    /* color: #ec0c1a; */
    text-shadow: none;
    /* font-size: 1.2em; */
    background: #fff;
}

#playlist li.playing a {
    /* color: #ec0c1a; */
    transition: 0.3s;
    font-size: 1em;
    background: rgba(0, 0, 0, 0.0);
    /* padding: 12px 0px; */
    text-align: left;
}

#playlist li.playing::before {
    height: 100%;
    /* content: '♬ '; */
    /* flex-shrink: 0; */
    /* padding: 12px 5px 12px 10px; */
    /* color: #ec0c1a; */
    /* text-align: right;
    font-size: 1em;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.0); */
}

.song-title {
    font-size: 1.0em;
}

.song-team-year {
    font-size: 1em;
}

#playlist-bottom {
    display: block;
    background: #eee;
    text-align: center;
    padding: 20px;
    font-size: 0.7em;
    line-height: 17px;
}

#playlist-bottom img {
    width: 25px;
    height: 11px;
    opacity: 0.5
}

#playlist-bottom a {
    color: #333;
}

#waveform-canvas {
    /* height: 80px; */
}

#analyser-canvas {
    width: 600px;
    height: 600px;
}

#gakkyoku,
.soundcloud-container #wrapper {
    opacity: 0;
    visibility: hidden;
    transform: translateY(80px);
}

#gakkyoku.animate-in {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 2.4s cubic-bezier(0.7, 0, 0.3, 1), transform 2.4s cubic-bezier(0.2, 0, 0.3, 1);
}

.soundcloud-container #wrapper.animate-in {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 2.4s cubic-bezier(0.7, 0, 0.3, 1), transform 2.4s cubic-bezier(0.5, 0, 0.3, 1);
}

#shareDialog {
    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;
}

.share-dialog-content {
    background-color: #333;
    /* background: url("../images/blacktex.jpg"); */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    color: #fff;
}

#shareLinkDisplay {
    width: 100%;
    padding: 8px 10px;
    margin: 35px 0;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box;
    background-color: #444;
    color: #fff;
}

#shareTimeInput {
    width: 70px;
    padding: 2px 5px;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box;
    background-color: #444;
    color: #fff;
    text-align: center;
}

#copyShareLinkBtn {
    background-color: #ec0c1a;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-family: "游明朝", "Yu Mincho", "MS 明朝", "ヒラギノ明朝 ProN W3", "Hiragino Mincho ProN", sans-serif;
    font-weight: 700;
    transition: background-color 0.2s ease;
}

#copyShareLinkBtn:hover {
    background-color: #b00913;
}

#closeShareDialogBtn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s ease;
}

#closeShareDialogBtn:hover {
    color: #ccc;
}

.share-dialog-options label {
    font-size: 0.9em;
    cursor: pointer;
}

.share-dialog-options input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

.share-dialog-options {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 10px;
}

.share-dialog-left-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1em;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.copy-notification.show {
    opacity: 1;
    visibility: visible;
}

#waveform-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    font-size: 1.2em;
    font-weight: bold;
    z-index: 15; /* waveform-canvas (z-index: 5) と playPauseBtn (z-index: 10) より上 */
    opacity: 1;
    transition: opacity 2.5s ease-out;
    pointer-events: none;
}

#waveform-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

#waveform-overlay h2 {
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 1em;
}

.share-dialog-content p {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 0px;
}

@media screen and (max-width:599px) {
    #gakkyoku {
        width: 100%;
        padding-left: 0px;
        padding-right: 0px;
        zoom : 0.9;
    }

    #wrapper {
        position: relative;
        width: 100%;
        margin-top: 10px;
    }
    
    #waveform-overlay h2 {
        font-size: 0.87em;
    }

    .soundcloud-container {
        width: 100%;
        height: 450px;
        margin: auto;
    }

    #analyser-canvas {
        width: 100%;
        height: auto;
    }
}

@media screen and (max-width:399px) {
    #gakkyoku {
        zoom: 0.74;
    }
}