.music-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    width: 45%;
    margin: 10px auto;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

.record-player-container {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}


/* 以下、既存のレコードプレイヤーのCSSをそのまま追加 */
.turntable {
    width: 100%;
    height: 100%;
    background: #333;
    border-radius: 10px;
    position: relative;
    transform-style: preserve-3d;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    padding: 20px;
    box-sizing: border-box;
}

/* ... 既存のレコードプレイヤーのスタイルを全て追加 ... */
.platter {
    width: 80%;
    height: 80%;
    background: #222;
    border-radius: 50%;
    position: absolute;
    top: 10%;
    left: 10%;
    animation: rotate 3s linear infinite;
}

.record {
    width: 70%;
    height: 70%;
    background: #111;
    border-radius: 50%;
    position: absolute;
    top: 15%;
    left: 15%;
    overflow: hidden;
    transform-origin: center center;
    /* レコードの溝のパターン */
    background-image: 
        /* 中心のシルバーリング */
        radial-gradient(circle at center,
            transparent 18%,
            #C0C0C0 18%,
            #C0C0C0 20%,
            transparent 20%
        ),
        /* 外側のシルバーリング */
        radial-gradient(circle at center,
            transparent 95%,
            #C0C0C0 95%,
            #C0C0C0 97%,
            transparent 97%
        ),
        /* レコードの溝（白いリング） */
        repeating-radial-gradient(circle at center,
            transparent 20%,
            transparent 21%,
            rgba(255, 255, 255, 0.1) 21.5%,
            transparent 22%,
            transparent 24%
        ),
        /* ベースの黒色 */
        radial-gradient(circle at center,
            #111 0%,
            #111 100%
        );
}

.record-image {
    width: 36%;
    height: 36%;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 32%;
    left: 32%;
    background-image: url('https://www.narurea.com/images/Hutao_Fanart.jpeg');
    background-size: cover;
    transform-origin: center center;
}

.tone-arm-assembly {
    position: absolute;
    top: 20%;
    right: 10%;
    transform-origin: 90% 20%;
    transform: rotate(-80deg);
}

.tone-arm {
    width: 80px;
    height: 3px;
    background: #666;
    position: relative;
}

.tone-arm::before {
    content: '';
    position: absolute;
    right: -2px;
    top: -1px;
    width: 5px;
    height: 5px;
    background: #888;
    border-radius: 50%;
}

.tone-arm::after {
    content: '';
    position: absolute;
    left: 0;
    top: -4px;
    width: 10px;
    height: 10px;
    background: #777;
    border-radius: 50%;
}

.cartridge {
    position: absolute;
    left: -2px;
    bottom: -2px;
    width: 6px;
    height: 8px;
    background: #555;
    transform: rotate(15deg);
}

.needle {
    position: absolute;
    bottom: -5px;
    left: 2px;
    width: 1px;
    height: 5px;
    background: #999;
    transform: rotate(-15deg);
}

.controls {
    position: absolute;
    left: 5px;
    top: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 8px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.power {
    background: #ff4444;
}

.volume, .tone {
    background: #222;
    border: 2px solid #333;
    transform: rotate(-45deg);
    &::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 6px;
        width: 1px;
        height: 7px;
        background: #444;
    }
}

.headphone-jack {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 15px;
    height: 15px;
    background: #555;
    border-radius: 50%;
    border: 2px solid #444;
}

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

.power.active { box-shadow: 0 0 10px #ff4444; }
.volume.active { box-shadow: 0 0 10px #4CAF50; }
.tone.active { box-shadow: 0 0 10px #2196F3; }

/* recordplayer.cssに以下のスタイルを追加 */

/* ビジュアライザーのコンテナ */
#visualizer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    z-index: 1;
}

/* ビジュアライザーのバー */
.bar {
    width: 12px;
    background: rgba(76, 175, 80, 0.3);
    margin: 0 2px;
    transition: height 0.1s ease;
}

/* レコードプレイヤーが明確に見えるようにz-indexを調整 */
.record-player {
    width: 250px;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(30deg);
    z-index: 2;  /* ビジュアライザーの上に表示 */
}



@media (max-width: 767px) {
    .music-card {
        width: 70%; /* モバイルでは画面幅の90%に */
        padding: 15px;
        margin: 10px auto;
    }

    .record-player-container {
        height: 300px; /* 高さを少し小さく */
    }

    .record-player {
        width: 200px; /* レコードプレイヤーを更にコンパクトに */
        height: 200px;
        transform: rotateX(30deg) scale(0.9);
    }

    #visualizer {
        gap: 1px; /* バーの間隔を更に狭く */
    }

    .bar {
        width: 6px; /* バーを更に細く */
    }

    /* コントロール類も小さく */
    .controls {
        left: 3px;
        top: 3px;
        gap: 8px;
    }

    .control {
        width: 12px;
        height: 12px;
        font-size: 6px;
    }

    .headphone-jack {
        right: 10px;
        bottom: 10px;
        width: 12px;
        height: 12px;
    }

    /* トーンアームの調整 */
    .tone-arm {
        width: 60px; /* トーンアームを短く */
        height: 2px;
    }
}

@media (max-width: 767px) {
    .music-card {
        width: 75%;
    }
}