/* OTTAVA Now Playing - 一定速度スクロール対応版 */
#ottava-nowplaying-ticker {
    --duration: 10s;            /* JSで動的に設定 */
    --content-width: 0px;        /* JSで動的に設定 */
    width: 94%;
    max-width: 1060px;
    margin: 20px auto -40px;
    background: transparent;
    position: relative;
    z-index: 100;
}

.ottava-nowplaying-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 152, 83, 0.3);
    border-radius: 50px;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.ottava-nowplaying-container:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(197, 152, 83, 0.5);
}

.ottava-nowplaying-label {
    color: #C59853;
    font-size: 14px;
    font-weight: 600;
    margin-right: 15px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    letter-spacing: 0.08em;
    font-family: "游明朝", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
}

.ottava-nowplaying-icon {
    margin-right: 6px;
    font-size: 16px;
    animation: ottava-bounce 3s ease-in-out infinite;
}

.ottava-nowplaying-separator {
    width: 1px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, #C59853, transparent);
    margin-right: 15px;
    flex-shrink: 0;
}

.ottava-nowplaying-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

/* 新しいトラック構造 */
.ottava-nowplaying-track {
    display: inline-flex;
    will-change: transform;
    animation: ottava-marquee var(--duration) linear infinite;
}

.ottava-nowplaying-text {
    display: inline-block;
    font-size: 15px;
    color: #333;
    letter-spacing: 0.02em;
    line-height: 1.5;
    font-family: "游明朝", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
    white-space: nowrap;
}

/* 複製されたテキストのパディングはJSで設定 */
.ottava-nowplaying-text:not(:first-child) {
    padding-left: 50px;
}

/* 新しいマーキーアニメーション */
@keyframes ottava-marquee {
    from { 
        transform: translateX(0); 
    }
    to { 
        transform: translateX(calc(var(--content-width) * -1)); 
    }
}

/* バウンスアニメーション */
@keyframes ottava-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-2px);
    }
    75% {
        transform: translateY(1px);
    }
}

/* ホバー時にアニメーション停止 */
#ottava-nowplaying-ticker:hover .ottava-nowplaying-track {
    animation-play-state: paused;
}

/* ステータス表示 */
.ottava-nowplaying-loading .ottava-nowplaying-text {
    opacity: 0.6;
}

.ottava-nowplaying-error .ottava-nowplaying-text {
    color: #999;
}

/* アニメーション無効化設定への配慮 */
@media (prefers-reduced-motion: reduce) {
    .ottava-nowplaying-track {
        animation: none !important;
        transform: none !important;
    }
    
    .ottava-nowplaying-icon {
        animation: none !important;
    }
}

/* レスポンシブ対応 */
@media screen and (max-width: 1120px) {
    #ottava-nowplaying-ticker {
        width: 94%;
    }
}

@media screen and (max-width: 768px) {
    #ottava-nowplaying-ticker {
        width: 94%;
    }
    
    .ottava-nowplaying-container {
        border-radius: 30px;
        padding: 8px 20px;
    }
    
    .ottava-nowplaying-label {
        font-size: 13px;
        margin-right: 12px;
    }
    
    .ottava-nowplaying-separator {
        margin-right: 12px;
        height: 18px;
    }
    
    .ottava-nowplaying-text {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .ottava-nowplaying-container {
        padding: 7px 15px;
        border-radius: 25px;
    }
    
    .ottava-nowplaying-label {
        font-size: 12px;
        margin-right: 10px;
    }
    
    .ottava-nowplaying-icon {
        font-size: 14px;
        margin-right: 4px;
    }
    
    .ottava-nowplaying-separator {
        margin-right: 10px;
        height: 16px;
    }
    
    .ottava-nowplaying-text {
        font-size: 13px;
    }
}