/* 共通スタイルシート */
body {
    background-color: #000;
    color: #fff;
    font-family: "MS PGothic", "MS Gothic", "Osaka", "Courier New", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 160px;
    border-right: 1px solid #fff;
    padding: 20px 10px;
    text-align: left;
    flex-shrink: 0;
}

.main {
    flex-grow: 1;
    padding: 40px;
    text-align: center;
}

h1 {
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #fff;
    display: inline-block;
    padding: 0 30px 5px 30px;
}

.nav-item {
    margin-bottom: 10px;
}

.nav-item a {
    display: block;
    padding: 5px;
    text-decoration: none;
    color: #00ffff;
}

.nav-item a:hover {
    background-color: #333;
    text-decoration: underline;
}

a {
    color: #00ffff;
    text-decoration: underline;
}

a:visited {
    color: #ff00ff;
}

.content {
    margin-top: 30px;
}

/* サイトマップ用（ツリー表示） */
.tree {
    font-family: "MS Gothic", monospace;
    line-height: 1.6;
    white-space: pre;
    text-align: left;
    display: inline-block;
}

/* カスタム音楽プレイヤー */
.player {
    border: 2px solid #fff;
    padding: 15px;
    width: 320px;
    margin: 20px auto;
    text-align: left;
    background-color: #000;
}

.player-title {
    font-size: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dotted #fff;
    padding-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
}

.player-title span {
    display: inline-block;
}

.is-playing .player-title span {
    padding-left: 100%;
    animation: marquee 10s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

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

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* 再生・停止ボタン */
.play-btn {
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    font-family: "MS PGothic", sans-serif;
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
    min-width: 45px;
}

.play-btn:hover {
    background: #fff;
    color: #000;
}

/* シークバー・音量バー共通 */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    height: 15px;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #333;
    border: 1px solid #fff;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 12px;
    width: 8px;
    background: #fff;
    border: 1px solid #000;
    margin-top: -5px;
}

.seek-bar {
    flex-grow: 1;
}

.volume-bar {
    width: 60px;
}

/* プレイリスト */
.playlist {
    border: 2px solid #fff;
    width: 320px;
    margin: 10px auto;
    background-color: #000;
    text-align: left;
}

.playlist-item {
    padding: 8px 10px;
    border-bottom: 1px dotted #333;
    cursor: pointer;
    font-size: 12px;
}

.playlist-item:last-child {
    border-bottom: none;
}

.playlist-item:hover {
    background-color: #222;
    color: #00ffff;
}

.playlist-item.active {
    background-color: #fff;
    color: #000;
}

/* ビジュアライザー & ディスク */
.player-visual {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 60px;
    margin-bottom: 15px;
    background: #111;
    border: 1px solid #444;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.visualizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100%;
    flex-grow: 1;
}

.v-bar {
    width: 6px;
    height: 10%;
    background: #0f0;
    /* Winampグリーン */
    border-top: 1px solid #fff;
}

/* 再生中のアニメーション */
.is-playing .v-bar {
    animation: bar-jump 0.5s infinite ease-in-out;
}

.is-playing .v-bar:nth-child(2n) {
    animation-duration: 0.4s;
}

.is-playing .v-bar:nth-child(3n) {
    animation-duration: 0.6s;
}

.is-playing .v-bar:nth-child(4n) {
    animation-duration: 0.3s;
}

.is-playing .v-bar:nth-child(5n) {
    animation-duration: 0.7s;
}

@keyframes bar-jump {

    0%,
    100% {
        height: 10%;
    }

    50% {
        height: 90%;
    }
}

.disc-container {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.disc {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, #333 0deg 30deg, #555 30deg 60deg);
    border: 1px solid #fff;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.disc-inner {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #000;
    border: 1px solid #fff;
}

.is-playing .disc {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* キラキラ（おまけ） */
.is-playing .player-visual::after {
    content: "NOW PLAYING...";
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: 8px;
    color: #ff00ff;
    animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
    to {
        visibility: hidden;
    }
}

/* アクセスカウンター */
.counter-box {
    margin-top: 30px;
    border: 2px outset #666;
    background: #000;
    padding: 5px;
    text-align: center;
    width: 100px;
    margin-left: auto;
    margin-right: auto;
}

.counter-label {
    font-size: 9px;
    color: #00ffff;
    margin-bottom: 4px;
    font-family: "MS Gothic", monospace;
    letter-spacing: 1px;
}

.counter-display {
    background: #111;
    border: 1px solid #444;
    padding: 0;
    display: inline-block;
    width: 88px;
    height: 26px;
    overflow: hidden;
}

.counter-image {
    display: block;
    width: 88px;
    height: 26px;
    border: 0;
}
